]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Moved header testing from Common.am to TestHeaders.am. Not all makefiles
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 19 Feb 2009 18:19:37 +0000 (11:19 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 19 Feb 2009 18:19:37 +0000 (11:19 -0700)
using Common.am will use a standardized header test, at least for now.
We have makefiles that test headers in subdirectories, for example.

src/Common.am
src/TestHeaders.am [new file with mode: 0644]
src/base/Makefile.am

index ec38e346e92cba9bd0c5334d2b176e6e49824b65..b675eee06823ea8f0d977c46150c168888ece958 100644 (file)
@@ -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 (file)
index 0000000..bb273c0
--- /dev/null
@@ -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
index fcf5420130bb52e5104cac2a6692194dbf9a8856..93b11be3f06ffeccd407bd4bf459c51e6737501f 100644 (file)
@@ -1,5 +1,6 @@
 
 include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
 
 noinst_LTLIBRARIES = libbase.la