Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | diff --git a/Makefile.am b/Makefile.am |
| 2 | index d4aadb1..0e36756 100644 |
| 3 | --- a/Makefile.am |
| 4 | +++ b/Makefile.am |
| 5 | @@ -253,5 +253,8 @@ post-html: docs/index.html |
| 6 | rsync $(rsync_args) -r docs/index.html $$USER,libxmlplusplus@web.sourceforge.net:$(web_path_project) |
| 7 | rsync $(rsync_args) -r examples $$USER,libxmlplusplus@web.sourceforge.net:$(web_path_project) |
| 8 | |
| 9 | +install-ptest: |
| 10 | + make -C examples install-ptest |
| 11 | + |
| 12 | # Optional: auto-generate the ChangeLog file from the git log on make dist |
| 13 | include $(top_srcdir)/macros/dist-changelog.am |
| 14 | diff --git a/examples/Makefile.am b/examples/Makefile.am |
| 15 | index d9541ca..c27e088 100644 |
| 16 | --- a/examples/Makefile.am |
| 17 | +++ b/examples/Makefile.am |
| 18 | @@ -19,6 +19,8 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I. $(LIBXMLXX_CFLAGS) |
| 19 | AM_CXXFLAGS = $(LIBXMLXX_WXXFLAGS) |
| 20 | LDADD = $(top_builddir)/libxml++/libxml++-$(LIBXMLXX_API_VERSION).la $(LIBXMLXX_LIBS) |
| 21 | |
| 22 | +LOG_DRIVER = $(SHELL) ../macros/test-driver |
| 23 | + |
| 24 | check_PROGRAMS = \ |
| 25 | dom_build/dom_build \ |
| 26 | dom_parse_entities/dom_parse_entities \ |
| 27 | @@ -36,6 +38,23 @@ check_PROGRAMS = \ |
| 28 | schemavalidation/schemavalidation \ |
| 29 | textreader/textreader |
| 30 | |
| 31 | +check_DOTLIBS = \ |
| 32 | + dom_build/.libs/dom_build \ |
| 33 | + dom_parse_entities/.libs/dom_parse_entities \ |
| 34 | + dom_parser/.libs/dom_parser \ |
| 35 | + dom_parser_raw/.libs/dom_parser_raw \ |
| 36 | + dom_read_write/.libs/dom_read_write \ |
| 37 | + dom_xinclude/.libs/dom_xinclude \ |
| 38 | + dom_xpath/.libs/dom_xpath \ |
| 39 | + dtdvalidation/.libs/dtdvalidation \ |
| 40 | + import_node/.libs/import_node \ |
| 41 | + sax_exception/.libs/sax_exception \ |
| 42 | + sax_parser/.libs/sax_parser \ |
| 43 | + sax_parser_build_dom/.libs/sax_parser_build_dom \ |
| 44 | + sax_parser_entities/.libs/sax_parser_entities \ |
| 45 | + schemavalidation/.libs/schemavalidation \ |
| 46 | + textreader/.libs/textreader |
| 47 | + |
| 48 | # Shell scripts that call the example programs. |
| 49 | check_SCRIPTS = \ |
| 50 | dom_build/make_check.sh \ |
| 51 | @@ -147,10 +166,10 @@ dist_noinst_DATA = \ |
| 52 | # file are located in different directories. |
| 53 | dom_read_write/make_check.sh: Makefile |
| 54 | echo '# Generated and used by "make check"' >$@ |
| 55 | - echo 'dom_read_write/dom_read_write "$(srcdir)/dom_read_write/example.xml" dom_read_write/example_output.xml >/dev/null' >>$@ |
| 56 | + echo 'cd dom_read_write && .libs/dom_read_write "example.xml" example_output.xml >/dev/null' >>$@ |
| 57 | chmod +x $@ |
| 58 | |
| 59 | -script_template = cd "$(srcdir)/<!progname!>" && "$(abs_builddir)/<!progname!>/<!progname!>" >/dev/null |
| 60 | +script_template = cd "<!progname!>" && ".libs/<!progname!>" >/dev/null |
| 61 | standard_scripts = $(filter-out dom_read_write/make_check.sh,$(check_SCRIPTS)) |
| 62 | |
| 63 | # All other script files are generated like so: |
| 64 | @@ -162,3 +181,18 @@ $(standard_scripts): Makefile |
| 65 | CLEANFILES = \ |
| 66 | dom_read_write/example_output.xml \ |
| 67 | $(check_SCRIPTS) |
| 68 | + |
| 69 | +buildtest: all |
| 70 | + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) |
| 71 | + $(MAKE) $(AM_MAKEFLAGS) buildtest-TESTS |
| 72 | + |
| 73 | +install-ptest: |
| 74 | + $(MKDIR_P) $(DESTDIR)/examples |
| 75 | + cp --parents $(check_DOTLIBS) $(DESTDIR)/examples |
| 76 | + cp --parents $(check_SCRIPTS) $(DESTDIR)/examples |
| 77 | + cd $(srcdir) && cp --parents $(dist_noinst_DATA) $(DESTDIR)/examples |
| 78 | + cp Makefile $(DESTDIR)/examples |
| 79 | + $(MKDIR_P) $(DESTDIR)/macros |
| 80 | + cp $(srcdir)/../macros/test-driver $(DESTDIR)/macros |
| 81 | + sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/examples/Makefile |
| 82 | + |