From: <ssm...@us...> - 2006-08-24 16:02:22
|
Revision: 1992 Author: ssmalley Date: 2006-08-24 09:01:45 -0700 (Thu, 24 Aug 2006) ViewCVS: http://svn.sourceforge.net/selinux/?rev=1992&view=rev Log Message: ----------- Author: Caleb Case Email: cc...@tr... Subject: make indent target update Date: Thu, 17 Aug 2006 16:43:22 -0400 The current make indent invokes the distclean target which removes generated files. This approach instead pushes the decision of which files to indent down into the respective makefiles and does not force a distclean. Tests are not indented. Acked-by: Stephen Smalley <sd...@ty...> Acked-by: Karl MacMillan <kma...@me...> Modified Paths: -------------- trunk/Makefile trunk/checkpolicy/Makefile trunk/libselinux/Makefile trunk/libselinux/include/Makefile trunk/libselinux/src/Makefile trunk/libselinux/utils/Makefile trunk/libsemanage/Makefile trunk/libsemanage/include/Makefile trunk/libsemanage/src/Makefile trunk/libsepol/Makefile trunk/libsepol/include/Makefile trunk/libsepol/src/Makefile trunk/libsepol/utils/Makefile trunk/policycoreutils/Makefile trunk/policycoreutils/audit2allow/Makefile trunk/policycoreutils/audit2why/Makefile trunk/policycoreutils/load_policy/Makefile trunk/policycoreutils/newrole/Makefile trunk/policycoreutils/po/Makefile trunk/policycoreutils/restorecon/Makefile trunk/policycoreutils/restorecond/Makefile trunk/policycoreutils/run_init/Makefile trunk/policycoreutils/scripts/Makefile trunk/policycoreutils/secon/Makefile trunk/policycoreutils/semanage/Makefile trunk/policycoreutils/semodule/Makefile trunk/policycoreutils/semodule_deps/Makefile trunk/policycoreutils/semodule_expand/Makefile trunk/policycoreutils/semodule_link/Makefile trunk/policycoreutils/semodule_package/Makefile trunk/policycoreutils/sestatus/Makefile trunk/policycoreutils/setfiles/Makefile trunk/policycoreutils/setsebool/Makefile Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -31,5 +31,7 @@ (cd $$subdir && $(MAKE) $@) || exit 1; \ done -indent: distclean # do not indent the generated files - find . -name "*.[ch]" -exec sh ./Lindent {} \; +indent: + @for subdir in $(SUBDIRS); do \ + (cd $$subdir && $(MAKE) $@) || exit 1; \ + done Modified: trunk/checkpolicy/Makefile =================================================================== --- trunk/checkpolicy/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/checkpolicy/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -18,6 +18,8 @@ LDLIBS=$(LIBDIR)/libsepol.a -lfl +GENERATED=lex.yy.c y.tab.c y.tab.h + all: $(TARGETS) $(MAKE) -C test @@ -55,3 +57,5 @@ -rm -f $(TARGETS) $(CHECKPOLOBJS) $(CHECKMODOBJS) y.tab.c y.tab.h lex.yy.c $(MAKE) -C test clean +indent: + ../Lindent $(filter-out $(GENERATED),$(wildcard *.[ch])) Modified: trunk/libselinux/Makefile =================================================================== --- trunk/libselinux/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libselinux/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -21,4 +21,9 @@ $(MAKE) -C src $@ $(MAKE) -C utils clean -test: \ No newline at end of file +indent: + $(MAKE) -C src $@ + $(MAKE) -C utils $@ + $(MAKE) -C include $@ + +test: Modified: trunk/libselinux/include/Makefile =================================================================== --- trunk/libselinux/include/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libselinux/include/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -5,3 +5,7 @@ install: test -d $(INCDIR) || install -m 755 -d $(INCDIR) install -m 644 $(wildcard selinux/*.h) $(INCDIR) + +indent: + ../../Lindent $(wildcard selinux/*.h) + Modified: trunk/libselinux/src/Makefile =================================================================== --- trunk/libselinux/src/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libselinux/src/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -31,6 +31,8 @@ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ +GENERATED=$(SWIGCOUT) + all: $(LIBA) $(LIBSO) pywrap: all $(SWIGSO) @@ -80,3 +82,7 @@ distclean: clean rm -f $(SWIGCOUT) $(SWIGFILES) + +indent: + ../../Lindent $(filter-out $(GENERATED),$(wildcard *.[ch])) + Modified: trunk/libselinux/utils/Makefile =================================================================== --- trunk/libselinux/utils/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libselinux/utils/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -18,5 +18,8 @@ clean: rm -f $(TARGETS) *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: Modified: trunk/libsemanage/Makefile =================================================================== --- trunk/libsemanage/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libsemanage/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -19,4 +19,8 @@ $(MAKE) -C src $@ $(MAKE) -C tests $@ +indent: + $(MAKE) -C src $@ + $(MAKE) -C include $@ + test: Modified: trunk/libsemanage/include/Makefile =================================================================== --- trunk/libsemanage/include/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libsemanage/include/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -5,3 +5,6 @@ install: test -d $(INCDIR) || install -m 755 -d $(INCDIR) install -m 644 $(wildcard semanage/*.h) $(INCDIR) + +indent: + ../../Lindent $(wildcard semanage/*.h) Modified: trunk/libsemanage/src/Makefile =================================================================== --- trunk/libsemanage/src/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libsemanage/src/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -37,6 +37,8 @@ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ +GENERATED=$(SWIGCOUT) $(wildcard conf-*.[ch]) + all: $(LIBA) $(LIBSO) pywrap: all $(SWIGLOBJ) $(SWIGSO) @@ -96,4 +98,7 @@ distclean: clean rm -f $(SWIGCOUT) $(SWIGFILES) +indent: + ../../Lindent $(filter-out $(GENERATED),$(wildcard *.[ch])) + .PHONY: all clean pywrap swigify install install-pywrap distclean Modified: trunk/libsepol/Makefile =================================================================== --- trunk/libsepol/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libsepol/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -16,6 +16,11 @@ $(MAKE) -C utils clean $(MAKE) -C tests clean +indent: + $(MAKE) -C src $@ + $(MAKE) -C include $@ + $(MAKE) -C utils $@ + test: $(MAKE) -C tests test Modified: trunk/libsepol/include/Makefile =================================================================== --- trunk/libsepol/include/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libsepol/include/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -7,3 +7,6 @@ test -d $(INCDIR)/policydb || install -m 755 -d $(INCDIR)/policydb install -m 644 $(wildcard sepol/*.h) $(INCDIR) install -m 644 $(wildcard sepol/policydb/*.h) $(INCDIR)/policydb + +indent: + ../../Lindent $(wildcard sepol/*.h) Modified: trunk/libsepol/src/Makefile =================================================================== --- trunk/libsepol/src/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libsepol/src/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -42,3 +42,6 @@ clean: -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) +indent: + ../../Lindent $(wildcard *.[ch]) + Modified: trunk/libsepol/utils/Makefile =================================================================== --- trunk/libsepol/utils/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/libsepol/utils/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -17,5 +17,8 @@ clean: -rm -f $(TARGETS) *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: Modified: trunk/policycoreutils/Makefile =================================================================== --- trunk/policycoreutils/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -1,6 +1,6 @@ SUBDIRS=setfiles semanage load_policy newrole run_init restorecon restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po -all install relabel clean: +all install relabel clean indent: @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done Modified: trunk/policycoreutils/audit2allow/Makefile =================================================================== --- trunk/policycoreutils/audit2allow/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/audit2allow/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -21,4 +21,6 @@ clean: +indent: + relabel: Modified: trunk/policycoreutils/audit2why/Makefile =================================================================== --- trunk/policycoreutils/audit2why/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/audit2why/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -24,4 +24,7 @@ clean: -rm -f $(TARGETS) *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: Modified: trunk/policycoreutils/load_policy/Makefile =================================================================== --- trunk/policycoreutils/load_policy/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/load_policy/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -21,5 +21,8 @@ clean: -rm -f $(TARGETS) *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: /sbin/restorecon $(SBINDIR)/load_policy Modified: trunk/policycoreutils/newrole/Makefile =================================================================== --- trunk/policycoreutils/newrole/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/newrole/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -52,5 +52,8 @@ clean: rm -f $(TARGETS) *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: install /sbin/restorecon $(BINDIR)/newrole Modified: trunk/policycoreutils/po/Makefile =================================================================== --- trunk/policycoreutils/po/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/po/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -64,6 +64,8 @@ @rm -fv *mo *~ .depend @rm -rf tmp +indent: + install: $(MOFILES) @for n in $(MOFILES); do \ l=`basename $$n .mo`; \ Modified: trunk/policycoreutils/restorecon/Makefile =================================================================== --- trunk/policycoreutils/restorecon/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/restorecon/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -21,5 +21,8 @@ clean: -rm -f restorecon *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: install /sbin/restorecon $(SBINDIR)/restorecon Modified: trunk/policycoreutils/restorecond/Makefile =================================================================== --- trunk/policycoreutils/restorecond/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/restorecond/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -30,3 +30,6 @@ clean: -rm -f restorecond *.o *~ +indent: + ../../Lindent $(wildcard *.[ch]) + Modified: trunk/policycoreutils/run_init/Makefile =================================================================== --- trunk/policycoreutils/run_init/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/run_init/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -45,5 +45,8 @@ clean: -rm -f $(TARGETS) *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: install /sbin/restorecon $(SBINDIR)/run_init $(SBINDIR)/open_init_pty Modified: trunk/policycoreutils/scripts/Makefile =================================================================== --- trunk/policycoreutils/scripts/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/scripts/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -21,4 +21,6 @@ clean: +indent: + relabel: Modified: trunk/policycoreutils/secon/Makefile =================================================================== --- trunk/policycoreutils/secon/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/secon/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -29,6 +29,9 @@ clean: rm -f *.o core* secon *~ *.bak +indent: + ../../Lindent $(wildcard *.[ch]) + bare: clean .PHONY: clean bare Modified: trunk/policycoreutils/semanage/Makefile =================================================================== --- trunk/policycoreutils/semanage/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/semanage/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -20,4 +20,6 @@ clean: +indent: + relabel: Modified: trunk/policycoreutils/semodule/Makefile =================================================================== --- trunk/policycoreutils/semodule/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/semodule/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -23,4 +23,8 @@ relabel: clean: - -rm -f semodule *.o + -rm -f semodule *.o + +indent: + ../../Lindent $(wildcard *.[ch]) + Modified: trunk/policycoreutils/semodule_deps/Makefile =================================================================== --- trunk/policycoreutils/semodule_deps/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/semodule_deps/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -22,4 +22,8 @@ relabel: clean: - -rm -f semodule_deps *.o + -rm -f semodule_deps *.o + +indent: + ../../Lindent $(wildcard *.[ch]) + Modified: trunk/policycoreutils/semodule_expand/Makefile =================================================================== --- trunk/policycoreutils/semodule_expand/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/semodule_expand/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -22,4 +22,8 @@ relabel: clean: - -rm -f semodule_expand *.o + -rm -f semodule_expand *.o + +indent: + ../../Lindent $(wildcard *.[ch]) + Modified: trunk/policycoreutils/semodule_link/Makefile =================================================================== --- trunk/policycoreutils/semodule_link/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/semodule_link/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -22,4 +22,8 @@ relabel: clean: - -rm -f semodule_link *.o + -rm -f semodule_link *.o + +indent: + ../../Lindent $(wildcard *.[ch]) + Modified: trunk/policycoreutils/semodule_package/Makefile =================================================================== --- trunk/policycoreutils/semodule_package/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/semodule_package/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -22,4 +22,8 @@ relabel: clean: - -rm -f semodule_package *.o + -rm -f semodule_package *.o + +indent: + ../../Lindent $(wildcard *.[ch]) + Modified: trunk/policycoreutils/sestatus/Makefile =================================================================== --- trunk/policycoreutils/sestatus/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/sestatus/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -24,4 +24,7 @@ clean: rm -f sestatus *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: Modified: trunk/policycoreutils/setfiles/Makefile =================================================================== --- trunk/policycoreutils/setfiles/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/setfiles/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -28,5 +28,8 @@ clean: rm -f setfiles *.o +indent: + ../../Lindent $(wildcard *.[ch]) + relabel: install /sbin/restorecon $(SBINDIR)/setfiles Modified: trunk/policycoreutils/setsebool/Makefile =================================================================== --- trunk/policycoreutils/setsebool/Makefile 2006-08-24 15:57:08 UTC (rev 1991) +++ trunk/policycoreutils/setsebool/Makefile 2006-08-24 16:01:45 UTC (rev 1992) @@ -23,4 +23,8 @@ relabel: clean: - -rm -f setsebool *.o + -rm -f setsebool *.o + +indent: + ../../Lindent $(wildcard *.[ch]) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |