summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2002-08-22 01:49:18 +0000
committerJohn Millaway <john43@users.sourceforge.net>2002-08-22 01:49:18 +0000
commit8e323958653406b3e26154a0f8aec26e95a4b8d5 (patch)
tree1e0401995f364f9cf8d01b79c65d837aa5eb83cd /Makefile.am
parent15b258ae547fa43cbfd0645c8774ff161bd0d503 (diff)
Created 'indent' target and added .indent.pro.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am26
1 files changed, 25 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index b4abd89..b302a6a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -162,4 +162,28 @@ tags:
ChangeLog:
-rcs2log -l 72 -u "vern Vern vern@ee.lbl.gov" -u "wlestes W. L. Estes wlestes@uncg.edu" -u "millaway John Millaway millaway@acm.org" | sed s:/usr/local/cvsroot/flex/::g >ChangeLog
-.PHONY: ChangeLog tags
+# Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
+#
+# Whole idea:
+# 1. Check for .indent.pro, otherwise indent will use unknown
+# settings, or worse, the GNU defaults.)
+# 2. Check that this is GNU indent.
+# 3. Make sure to process only the NON-generated .c and .h files.
+# 4. Run indent twice per file. The first time is a test.
+# Otherwise, indent overwrites your file even if it fails!
+indentfiles = buf.c ccl.c dfa.c ecs.c flexdef.h gen.c libmain.c \
+ libyywrap.c main.c misc.c nfa.c options.c options.h \
+ scanopt.c scanopt.h sym.c tables.c tables_shared.h \
+ tblcmp.c yylex.c
+
+indent:
+ echo "indent target is not activated."; exit 1
+ test -f .indent.pro
+ indent --version | grep GNU
+ for f in $(indentfiles);\
+ do\
+ echo indenting $$f ;\
+ indent < $$f >/dev/null && indent $$f || echo $$f FAILED ;\
+ done
+
+.PHONY: ChangeLog tags indent