What about a indent target?

Emmanuel Saracco <[email protected]>
Newsgroups gmane.comp.audio.jamin.devel
Message-ID <1179124506.2936.20.camel@localhost>
Hi,

I saw that "indent" was used after the dynamic creation of "state.h".

What about a "indent" target for all the source code, automatically used
on "dist-all" target call before application packaging?

If you are ok, just apply the following tiny patch (change the
".indent.pro" content to fit your coding rules):

* Added "indent" target in "Makefile.am"

* Added ".indent.pro" for "indent" options

Yes, "esthetic" only, again... :-)

Bye

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Jamin-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jamin-devel
jamin-0.96.03-indent_target.patch (text/x-patch, 953 B)
diff -ruN -x '*~' jamin_orig/Makefile.am jamin/Makefile.am
--- jamin_orig/Makefile.am	2004-12-29 05:25:28.000000000 +0100
+++ jamin/Makefile.am	2007-05-14 08:17:13.000000000 +0200
@@ -24,3 +24,8 @@
 
 files-test: src/jamin
 	find test/files/ -name '*.jam' -exec ./src/jamin -f \{\} \;
+
+dist-hook: indent
+
+indent:
+	(cd src && make indent)
diff -ruN -x '*~' jamin_orig/src/.indent.pro jamin/src/.indent.pro
--- jamin_orig/src/.indent.pro	1970-01-01 01:00:00.000000000 +0100
+++ jamin/src/.indent.pro	2007-05-14 08:17:41.000000000 +0200
@@ -0,0 +1 @@
+-kr
diff -ruN -x '*~' jamin_orig/src/Makefile.am jamin/src/Makefile.am
--- jamin_orig/src/Makefile.am	2007-05-05 13:51:52.000000000 +0200
+++ jamin/src/Makefile.am	2007-05-14 08:31:52.000000000 +0200
@@ -63,3 +63,8 @@
 	./mk-stateh.pl
 
 EXTRA_DIST = mk-stateh.pl state-vars.txt $(man_MANS)
+
+indent:
+	if [ `which indent` ]; then \
+		for f in `echo $(srcdir)/*.{c,h}`; do indent $$f; done \
+	fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.