diff --git a/Makefile.am b/Makefile.am index a64fee5..542e0f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -234,6 +234,15 @@ compile_nothreads_test_SOURCES = $(compile_test_SOURCES) compile_nothreads_test_CXXFLAGS = -DNO_THREADS $(AM_CXXFLAGS) compile_nothreads_test_LDADD = libctemplate_nothreads_debug.la +# With compile_test, we are making sure that the code compiles without +# needing config.h/etc. The best test is to make sure we can compile +# with just the installed header files. The best way to do this is at +# installcheck time. When this rule is run (via 'make distcheck'), +# 'includedir' is the installed include-dir. +installcheck-local: + $(CXX) -I $(includedir) -c $(top_srcdir)/src/tests/compile_test.cc \ + -o installcheck_compile_test.o + TESTS += template_test_util_test template_test_util_nothreads_test WINDOWS_PROJECTS += vsprojects/template_test_util_test/template_test_util_test.vcproj template_test_util_test_SOURCES = src/tests/config_for_unittests.h \ @@ -371,6 +380,7 @@ TESTDATA += \ src/tests/htmlparser_testdata/cdata.html \ src/tests/htmlparser_testdata/comments.html \ src/tests/htmlparser_testdata/context.html \ + src/tests/htmlparser_testdata/google.html \ src/tests/htmlparser_testdata/javascript_attribute.html \ src/tests/htmlparser_testdata/javascript_block.html \ src/tests/htmlparser_testdata/javascript_regexp.html \ @@ -479,7 +489,7 @@ libtool: $(LIBTOOL_DEPS) # NOTE: BUILT_SOURCES should come after the .config files, so they # come later (and thus end up with a later timestamp) when we tar/untar. EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ - $(SCRIPTS) $(TESTDATA) libtool \ + $(SCRIPTS) $(TESTDATA) libtool autogen.sh \ src/htmlparser/generate_fsm.py src/htmlparser/fsm_config.py \ src/tests/statemachine_test_fsm.config \ src/htmlparser/htmlparser_fsm.config \ diff --git a/Makefile.in b/Makefile.in index 629a2c1..5220a0d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -891,6 +891,7 @@ TESTDATA = src/tests/template_unittest_test_footer.in \ src/tests/htmlparser_testdata/cdata.html \ src/tests/htmlparser_testdata/comments.html \ src/tests/htmlparser_testdata/context.html \ + src/tests/htmlparser_testdata/google.html \ src/tests/htmlparser_testdata/javascript_attribute.html \ src/tests/htmlparser_testdata/javascript_block.html \ src/tests/htmlparser_testdata/javascript_regexp.html \ @@ -1101,7 +1102,7 @@ pkgconfig_DATA = lib${PACKAGE}.pc lib${PACKAGE}_nothreads.pc # NOTE: BUILT_SOURCES should come after the .config files, so they # come later (and thus end up with a later timestamp) when we tar/untar. EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ - $(SCRIPTS) $(TESTDATA) libtool \ + $(SCRIPTS) $(TESTDATA) libtool autogen.sh \ src/htmlparser/generate_fsm.py src/htmlparser/fsm_config.py \ src/tests/statemachine_test_fsm.config \ src/htmlparser/htmlparser_fsm.config \ @@ -2643,7 +2644,7 @@ install-pdf: install-pdf-am install-ps: install-ps-am -installcheck-am: +installcheck-am: installcheck-local maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -2687,11 +2688,11 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ install-libLTLIBRARIES install-man \ install-nodist_ctemplateincludeHEADERS install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-binSCRIPTS \ + install-strip installcheck installcheck-am installcheck-local \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-dist_docDATA uninstall-libLTLIBRARIES \ uninstall-nodist_ctemplateincludeHEADERS \ uninstall-pkgconfigDATA @@ -2708,6 +2709,15 @@ src/htmlparser/jsparser_fsm.h: src/htmlparser/generate_fsm.py src/htmlparser/fsm src/tests/statemachine_test_fsm.h: src/htmlparser/generate_fsm.py src/htmlparser/fsm_config.py src/tests/statemachine_test_fsm.config $(top_srcdir)/src/htmlparser/generate_fsm.py $(top_srcdir)/src/tests/statemachine_test_fsm.config > $@ +# With compile_test, we are making sure that the code compiles without +# needing config.h/etc. The best test is to make sure we can compile +# with just the installed header files. The best way to do this is at +# installcheck time. When this rule is run (via 'make distcheck'), +# 'includedir' is the installed include-dir. +installcheck-local: + $(CXX) -I $(includedir) -c $(top_srcdir)/src/tests/compile_test.cc \ + -o installcheck_compile_test.o + # We want to compile statemachine.cc as a c file as well as a c++ file statemachine.c: src/htmlparser/statemachine.cc