diff options
author | Explorer09 <explorer09@gmail.com> | 2017-01-02 00:38:37 +0800 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2017-01-12 18:02:24 -0500 |
commit | bb92951c022ea135d2f9dbc51dd9803ac7cd97ad (patch) | |
tree | 2256ee55521f3fae5e7d29961070536d8283f863 /src/Makefile.am | |
parent | 8db5267af4dfe10b0059c16d2b728bfb43146f63 (diff) |
build: Fix 'make indent' target
This 'make indent' target has not been working since the directories
reorganization in flex 2.6.0. Now make it work again.
Note that the current indent profile breaks many styles of existing
code. The indent target should not be used until the .indent.pro
options are reviewed for desireability.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 3b5e362..18aeec3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -135,12 +135,14 @@ indentfiles = \ tables_shared.h \ tblcmp.c -indent: - if [ -f .indent.pro ] ; then \ - for f in $(indentfiles);\ - do\ - echo indenting $$f ;\ - f='$(srcdir)'/$$f; \ - $(indent) < $$f >/dev/null && indent $$f || echo $$f FAILED to indent ;\ - done \ - fi +indent: $(top_srcdir)/.indent.pro + cd $(top_srcdir) && \ + for f in $(indentfiles); do \ + f=src/$$f; \ + echo indenting $$f; \ + INDENT_PROFILE=.indent.pro $(INDENT) <$$f >/dev/null && \ + INDENT_PROFILE=.indent.pro $(INDENT) $$f || \ + echo $$f FAILED to indent; \ + done; + +.PHONY: indent |