]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Alter distclean rule to prevent recursing into the same directory twice
authorEvan Hunt <each@isc.org>
Fri, 6 Apr 2018 10:09:50 +0000 (12:09 +0200)
committerEvan Hunt <each@isc.org>
Wed, 11 Apr 2018 03:05:59 +0000 (20:05 -0700)
Commit f87e0c03ee removed the "system" directory from the TESTDIRS
variable in bin/tests/Makefile.in in an attempt to fix "make distclean"
which was broken since commit 0d784de16a.  However, this change
prevented any system tests from being run when "make test" is invoked.

We now put it back into both SUBDIRS and TESTDIRS, but with a modified
rule to check for the existence of a Makefile in each subdirectory before
trying to run make there. This prevents "make distclean" from trying to
run again in a directory where it's already been run.

(cherry picked from commit 93ee6b8a22d1decf67db3a4a9434f51fd384d62c)

bin/tests/Makefile.in
make/rules.in

index 4c773e53abe67ff60ea1ebfb9313b015e632695f..5d72842e2893c112d378c967fd2ad04e8fee164b 100644 (file)
@@ -40,7 +40,7 @@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
 LIBS =         @LIBS@
 
 SUBDIRS =      system
-TESTDIRS =
+TESTDIRS =     system
 
 # Test programs that are built by default:
 # cfg_test is needed for regenerating doc/misc/options
index b675c26abf088b2d48c92fb366153ca31c81e9c6..0c32cba943f451ce64b363bc7a1a815a75fe8531 100644 (file)
@@ -89,7 +89,7 @@ install:: all
 
 install uninstall clean distclean maintainer-clean doc docclean man manclean::
        @for i in ${ALL_SUBDIRS} ${ALL_TESTDIRS}; do \
-               if [ "$$i" != "nulldir" -a -d $$i ]; then \
+               if [ "$$i" != "nulldir" -a -d $$i -a -f $$i/Makefile ]; then \
                        echo "making $@ in `pwd`/$$i"; \
                        (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
                fi; \