blob: dc6198fe98db064052e026003df6941435bb84c6 [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001--- a/Makefile.am
2+++ b/Makefile.am
3@@ -40,5 +40,8 @@ EXTRA_DIST = \
4 tools/conf_tests/have_exception_ptr.cc \
5 untracked/README
Patrick Williamsb48b7b42016-08-17 15:04:38 -05006
7+install-ptest:
8+ make -C examples install-ptest
9+
10 # Optional: auto-generate the ChangeLog file from the git log on make dist
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011 include $(top_srcdir)/build/dist-changelog.am
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000012--- a/examples/Makefile.am
13+++ b/examples/Makefile.am
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014@@ -19,6 +19,8 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015 AM_CXXFLAGS = $(LIBXMLXX_WXXFLAGS)
16 LDADD = $(top_builddir)/libxml++/libxml++-$(LIBXMLXX_API_VERSION).la $(LIBXMLXX_LIBS)
17
18+LOG_DRIVER = $(SHELL) ../macros/test-driver
19+
20 check_PROGRAMS = \
21 dom_build/dom_build \
22 dom_parse_entities/dom_parse_entities \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023@@ -37,6 +39,23 @@ check_PROGRAMS = \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050024 schemavalidation/schemavalidation \
25 textreader/textreader
26
27+check_DOTLIBS = \
28+ dom_build/.libs/dom_build \
29+ dom_parse_entities/.libs/dom_parse_entities \
30+ dom_parser/.libs/dom_parser \
31+ dom_parser_raw/.libs/dom_parser_raw \
32+ dom_read_write/.libs/dom_read_write \
33+ dom_xinclude/.libs/dom_xinclude \
34+ dom_xpath/.libs/dom_xpath \
35+ dtdvalidation/.libs/dtdvalidation \
36+ import_node/.libs/import_node \
37+ sax_exception/.libs/sax_exception \
38+ sax_parser/.libs/sax_parser \
39+ sax_parser_build_dom/.libs/sax_parser_build_dom \
40+ sax_parser_entities/.libs/sax_parser_entities \
41+ schemavalidation/.libs/schemavalidation \
42+ textreader/.libs/textreader
43+
44 # Shell scripts that call the example programs.
45 check_SCRIPTS = \
46 dom_build/make_check.sh \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050047@@ -154,10 +173,10 @@ dist_noinst_DATA = \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050048 # file are located in different directories.
49 dom_read_write/make_check.sh: Makefile
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000050 $(AM_V_GEN)echo '# Generated and used by "make check"' >$@
51- $(AM_V_at)echo 'dom_read_write/dom_read_write "$(srcdir)/dom_read_write/example.xml" dom_read_write/example_output.xml >/dev/null' >>$@
52+ $(AM_V_at)echo 'cd dom_read_write && .libs/dom_read_write "example.xml" example_output.xml >/dev/null' >>$@
53 $(AM_V_at)chmod +x $@
Patrick Williamsb48b7b42016-08-17 15:04:38 -050054
55-script_template = cd "$(srcdir)/<!progname!>" && "$(abs_builddir)/<!progname!>/<!progname!>" >/dev/null
56+script_template = cd "<!progname!>" && ".libs/<!progname!>" >/dev/null
57 standard_scripts = $(filter-out dom_read_write/make_check.sh,$(check_SCRIPTS))
58
59 # All other script files are generated like so:
Brad Bishop6e60e8b2018-02-01 10:27:11 -050060@@ -169,3 +188,18 @@ $(standard_scripts): Makefile
Patrick Williamsb48b7b42016-08-17 15:04:38 -050061 CLEANFILES = \
62 dom_read_write/example_output.xml \
63 $(check_SCRIPTS)
64+
65+buildtest: all
66+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
67+ $(MAKE) $(AM_MAKEFLAGS) buildtest-TESTS
68+
69+install-ptest:
70+ $(MKDIR_P) $(DESTDIR)/examples
71+ cp --parents $(check_DOTLIBS) $(DESTDIR)/examples
72+ cp --parents $(check_SCRIPTS) $(DESTDIR)/examples
73+ cd $(srcdir) && cp --parents $(dist_noinst_DATA) $(DESTDIR)/examples
74+ cp Makefile $(DESTDIR)/examples
75+ $(MKDIR_P) $(DESTDIR)/macros
Brad Bishop6e60e8b2018-02-01 10:27:11 -050076+ cp $(top_srcdir)/build/test-driver $(DESTDIR)/macros
Patrick Williamsb48b7b42016-08-17 15:04:38 -050077+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/examples/Makefile
78+