Commitf87e0c03eeremoved the "system" directory from the TESTDIRS variable in bin/tests/Makefile.in in an attempt to fix "make distclean" which was broken since commit0d784de16a. 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 commit93ee6b8a22)
91 lines
2.7 KiB
Makefile
91 lines
2.7 KiB
Makefile
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
#
|
|
# Permission to use, copy, modify, and/or distribute this software for any
|
|
# purpose with or without fee is hereby granted, provided that the above
|
|
# copyright notice and this permission notice appear in all copies.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
|
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
# PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
|
|
@BIND9_MAKE_INCLUDES@
|
|
|
|
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
|
|
${BIND9_INCLUDES}
|
|
|
|
CDEFINES =
|
|
CWARNINGS =
|
|
BACKTRACECFLAGS = @BACKTRACECFLAGS@
|
|
|
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
|
ISCLIBS = ../../lib/isc/libisc.@A@ @DNS_CRYPTO_LIBS@
|
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @DNS_CRYPTO_LIBS@
|
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
|
|
|
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
|
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
|
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
|
ISCDEPNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
|
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
|
|
|
LIBS = @LIBS@
|
|
|
|
SUBDIRS = system
|
|
TESTDIRS = system
|
|
|
|
# Test programs that are built by default:
|
|
# cfg_test is needed for regenerating doc/misc/options
|
|
# wire_test is needed for fuzz testing
|
|
# other opptional test programs have been moved to ./optional
|
|
|
|
# Alphabetically
|
|
XTARGETS = all_tests
|
|
TARGETS = cfg_test@EXEEXT@ mdig@EXEEXT@ wire_test@EXEEXT@ @XTARGETS@
|
|
|
|
SRCS = cfg_test.c wire_test.c mdig.c
|
|
|
|
@BIND9_MAKE_RULES@
|
|
|
|
.NOTPARALLEL:
|
|
|
|
.PHONY:
|
|
all_tests:
|
|
echo "making depend in `pwd`/optional"; \
|
|
(cd optional; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@)
|
|
|
|
wire_test@EXEEXT@: wire_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ wire_test.@O@ \
|
|
${DNSLIBS} ${ISCLIBS} ${LIBS}
|
|
|
|
cfg_test@EXEEXT@: cfg_test.@O@ ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
|
|
${LIBTOOL_MODE_LINK} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ cfg_test.@O@ \
|
|
${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS}
|
|
|
|
mdig@EXEEXT@: mdig.@O@ ${BIND9DEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS}
|
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ mdig.@O@ \
|
|
${BIND9LIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS}
|
|
|
|
distclean::
|
|
rm -f headerdep_test.sh
|
|
|
|
clean distclean::
|
|
rm -f ${TARGETS}
|
|
( cd optional; $(MAKE) $@)
|
|
|
|
check: test
|
|
|
|
test:
|
|
@for dir in $(SUBDIRS) ;\
|
|
do \
|
|
( cd $$dir; $(MAKE) test ) ;\
|
|
done
|