From: Alex Rousskov Date: Thu, 19 Feb 2009 18:19:37 +0000 (-0700) Subject: Moved header testing from Common.am to TestHeaders.am. Not all makefiles X-Git-Tag: SQUID_3_2_0_1~1183^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe57027d8dbfc7a0bf017caacbbef18a7144d203;p=thirdparty%2Fsquid.git Moved header testing from Common.am to TestHeaders.am. Not all makefiles using Common.am will use a standardized header test, at least for now. We have makefiles that test headers in subdirectories, for example. --- diff --git a/src/Common.am b/src/Common.am index ec38e346e9..b675eee068 100644 --- a/src/Common.am +++ b/src/Common.am @@ -8,8 +8,10 @@ AM_CFLAGS = @SQUID_CFLAGS@ AM_CXXFLAGS = @SQUID_CXXFLAGS@ DEFS = @DEFS@ -# so that others can always use += for this variable +# so that others can always use += for these variables CLEANFILES = +check_PROGRAMS = +TESTS = INCLUDES = \ -I$(top_srcdir) \ @@ -22,16 +24,3 @@ INCLUDES = \ # XXX: Do we really need this? Does auto-dependency tracking work? # XXX: And should not autoconf be in $(top_builddir)? $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h - -check_PROGRAMS = testHeaders -TESTS = $(check_PROGRAMS) - -## Special Universal .h dependency test script -## aborts build process on errors -testHeaders: $(srcdir)/*.h - $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(srcdir)/" || exit 1 - -## No such file... -testHeaders.c: - touch testHeaders.c -CLEANFILES += testHeaders.c diff --git a/src/TestHeaders.am b/src/TestHeaders.am new file mode 100644 index 0000000000..bb273c0f11 --- /dev/null +++ b/src/TestHeaders.am @@ -0,0 +1,16 @@ +# Test ./*.h files in a directory using test-suite/testheaders.sh + +# TODO: include in src/Common.am when all testHeaders users are the same. + +check_PROGRAMS += testHeaders +TESTS += testHeaders + +## .h dependency test script +## aborts build process on errors; XXX: even with "make -k" +testHeaders: $(srcdir)/*.h + $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(srcdir)/" || exit 1 + +## No such file... +testHeaders.c: + touch testHeaders.c +CLEANFILES += testHeaders.c diff --git a/src/base/Makefile.am b/src/base/Makefile.am index fcf5420130..93b11be3f0 100644 --- a/src/base/Makefile.am +++ b/src/base/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/src/Common.am +include $(top_srcdir)/src/TestHeaders.am noinst_LTLIBRARIES = libbase.la