INN commit: trunk (Makefile doc/Makefile site/Makefile)

INN Commit Russ_Allbery at isc.org
Sun Apr 12 11:58:22 UTC 2009


    Date: Sunday, April 12, 2009 @ 04:58:22
  Author: iulius
Revision: 8413

Fix a bug when "make -j" is used with a non-GNU make.
In a GNU make, the "cd" command is in effect only for
the current command, which is not the case with for
instance a BSD-based make.

Modified:
  trunk/Makefile
  trunk/doc/Makefile
  trunk/site/Makefile

---------------+
 Makefile      |   19 +++++++++++--------
 doc/Makefile  |    8 ++++----
 site/Makefile |    2 +-
 3 files changed, 16 insertions(+), 13 deletions(-)

Modified: Makefile
===================================================================
--- Makefile	2009-04-12 09:01:51 UTC (rev 8412)
+++ Makefile	2009-04-12 11:58:22 UTC (rev 8413)
@@ -43,14 +43,17 @@
 ##  Major target -- build everything.  Rather than just looping through
 ##  all the directories, use a set of parallel rules so that make -j can
 ##  work on more than one directory at a time.
+##  Be careful of a non-GNU make:  after a completed command, it does not
+##  necessarily return the script back to the starting directory.
 all: all-include all-libraries all-programs
-	cd doc     && $(MAKE) all
-	cd samples && $(MAKE) all
-	cd site    && $(MAKE) all
+	cd doc     && $(MAKE) all || exit 1 ; cd ..
+	cd samples && $(MAKE) all || exit 1 ; cd ..
+	cd site    && $(MAKE) all || exit 1 ; cd ..
 
+all-include:			; cd include   && $(MAKE) all
+
 all-libraries:	all-lib all-storage all-history all-perl
 
-all-include:			; cd include   && $(MAKE) all
 all-lib:	all-include	; cd lib       && $(MAKE) all
 all-storage:	all-lib		; cd storage   && $(MAKE) library
 all-history:	all-storage	; cd history   && $(MAKE) all
@@ -114,7 +117,7 @@
 install-root:
 	@chmod +x support/install-sh
 	support/install-sh $(OWNER) -m 0755 -d $(D)$(PATHBIN)
-	cd backends && $(MAKE) install-root
+	cd backends && $(MAKE) install-root || exit 1 ; cd ..
 
 ##  Install a certificate for TLS/SSL support.
 cert:
@@ -142,7 +145,7 @@
 clobber realclean distclean:
 	@for D in $(CLEANDIRS) ; do \
 	    echo '' ; \
-	    cd $$D && $(MAKE) $(FLAGS) distclean && cd .. || exit 1 ; \
+	    cd $$D && $(MAKE) $(FLAGS) distclean || exit 1 ; cd .. ; \
 	done
 	@echo ''
 	rm -f LIST.* Makefile.global TAGS tags config.cache config.log
@@ -155,7 +158,7 @@
 maintclean:
 	@for D in $(CLEANDIRS) ; do \
 	    echo '' ; \
-	    cd $$D && $(MAKE) $(FLAGS) maintclean && cd .. || exit 1 ; \
+	    cd $$D && $(MAKE) $(FLAGS) maintclean || exit 1 ; cd .. ; \
 	done
 	@echo ''
 	rm -f LIST.* Makefile.global TAGS tags config.cache config.log
@@ -177,7 +180,7 @@
 
 ##  Run the test suite.
 check test tests:
-	cd tests && $(MAKE) test
+	cd tests && $(MAKE) test || exit 1 ; cd ..
 
 
 ##  For maintainers, build the entire source base with warnings enabled.

Modified: doc/Makefile
===================================================================
--- doc/Makefile	2009-04-12 09:01:51 UTC (rev 8412)
+++ doc/Makefile	2009-04-12 11:58:22 UTC (rev 8413)
@@ -17,14 +17,14 @@
 DIRS = pod man
 
 all:
-	cd pod && $(MAKE)
+	cd pod && $(MAKE) all || exit 1 ; cd ..
 
 tags ctags:
 profiled:
 depend:
 
 clean clobber distclean maintclean:
-	cd pod && $(MAKE) $@
+	cd pod && $(MAKE) $@ || exit 1 ; cd ..
 
 install:
 	for F in $(TOPDOCS) ; do \
@@ -36,7 +36,7 @@
 	if [ -r $(top)/README.snapshot ] ; then \
 	    $(CP_RPUB) $(top)/README.snapshot $D$(PATHDOC)/README.snapshot ; \
 	fi
-	cd man && $(MAKE) install
+	cd man && $(MAKE) install || exit 1 ; cd ..
 
 bootstrap:
-	cd pod && $(MAKE) bootstrap
+	cd pod && $(MAKE) bootstrap || exit 1 ; cd ..

Modified: site/Makefile
===================================================================
--- site/Makefile	2009-04-12 09:01:51 UTC (rev 8412)
+++ site/Makefile	2009-04-12 11:58:22 UTC (rev 8413)
@@ -101,7 +101,7 @@
 		$D$(PATH_NEWSGROUPS) $D$(PATH_HISTORY)
 
 ##  Get new versions of everything from samples directory.
-all:		$(P) $(ALL) config
+all:		$(ALL) config
 
 ##  Get only scripts, not per-host config files.
 most:		$(MOST)




More information about the inn-committers mailing list