Imported Upstream version 2.35.4
[platform/upstream/libxml++.git] / examples / Makefile.am
1 ## Copyright (C) 2012 The libxml++ development team
2 ##
3 ## This file is part of libxml++.
4 ##
5 ## This library is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU Lesser General Public
7 ## License as published by the Free Software Foundation; either
8 ## version 2.1 of the License, or (at your option) any later version.
9 ##
10 ## This library is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 ## Lesser General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU Lesser General Public
16 ## License along with this library. If not, see <http://www.gnu.org/licenses/>.
17
18 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 check_PROGRAMS = \
23   dom_build/dom_build \
24   dom_parse_entities/dom_parse_entities \
25   dom_parser/dom_parser \
26   dom_parser_raw/dom_parser_raw \
27   dom_read_write/dom_read_write \
28   dom_xinclude/dom_xinclude \
29   dom_xpath/dom_xpath \
30   dtdvalidation/dtdvalidation \
31   import_node/import_node \
32   sax_exception/sax_exception \
33   sax_parser/sax_parser \
34   sax_parser_build_dom/sax_parser_build_dom \
35   sax_parser_entities/sax_parser_entities \
36   schemavalidation/schemavalidation \
37   textreader/textreader
38
39 # Shell scripts that call the example programs.
40 check_SCRIPTS = $(addsuffix make-check-sh,$(dir $(check_PROGRAMS)))
41 TESTS = $(check_SCRIPTS)
42
43 dom_build_dom_build_SOURCES = \
44   dom_build/main.cc
45 dom_parse_entities_dom_parse_entities_SOURCES = \
46   dom_parse_entities/main.cc
47 dom_parser_dom_parser_SOURCES = \
48   dom_parser/main.cc
49 dom_parser_raw_dom_parser_raw_SOURCES = \
50   dom_parser_raw/main.cc
51 dom_read_write_dom_read_write_SOURCES = \
52   dom_read_write/main.cc
53 dom_xinclude_dom_xinclude_SOURCES = \
54   dom_xinclude/main.cc
55 dom_xpath_dom_xpath_SOURCES = \
56   dom_xpath/main.cc
57 dtdvalidation_dtdvalidation_SOURCES = \
58   dtdvalidation/main.cc
59 import_node_import_node_SOURCES = \
60   import_node/main.cc
61 sax_exception_sax_exception_SOURCES = \
62   sax_exception/main.cc \
63   sax_exception/myparser.cc \
64   sax_exception/myparser.h
65 sax_parser_sax_parser_SOURCES = \
66   sax_parser/main.cc \
67   sax_parser/myparser.cc \
68   sax_parser/myparser.h
69 sax_parser_build_dom_sax_parser_build_dom_SOURCES = \
70   sax_parser_build_dom/main.cc \
71   sax_parser_build_dom/svgparser.cc \
72   sax_parser_build_dom/svgparser.h \
73   sax_parser_build_dom/svgdocument.cc \
74   sax_parser_build_dom/svgdocument.h \
75   sax_parser_build_dom/svgelement.cc \
76   sax_parser_build_dom/svgelement.h \
77   sax_parser_build_dom/svgpath.h \
78   sax_parser_build_dom/svggroup.h
79 sax_parser_entities_sax_parser_entities_SOURCES = \
80   sax_parser_entities/main.cc \
81   sax_parser_entities/myparser.cc \
82   sax_parser_entities/myparser.h
83 schemavalidation_schemavalidation_SOURCES = \
84   schemavalidation/main.cc
85 textreader_textreader_SOURCES = \
86   textreader/main.cc
87
88 dist_noinst_DATA = \
89   README \
90   dom_parse_entities/example.xml \
91   dom_parse_entities/example.dtd \
92   dom_parser/example.xml \
93   dom_parser/example_with_namespace.xml \
94   dom_parser/example_invalid.xml \
95   dom_parser/example.dtd \
96   dom_parser_raw/example.xml \
97   dom_parser_raw/example_invalid.xml \
98   dom_parser_raw/example.dtd \
99   dom_read_write/README \
100   dom_read_write/example.xml \
101   dom_read_write/example.dtd \
102   dom_xinclude/example.xml \
103   dom_xinclude/include1.txt \
104   dom_xinclude/include2.xml \
105   dom_xpath/example.xml \
106   dtdvalidation/example.dtd \
107   import_node/example1.xml \
108   import_node/example2.xml \
109   sax_exception/example.xml \
110   sax_parser/example.xml \
111   sax_parser_build_dom/README \
112   sax_parser_build_dom/example.xml \
113   sax_parser_entities/example.xml \
114   schemavalidation/example.xml \
115   schemavalidation/example.xsd \
116   textreader/example.xml
117
118 # Build the shell scripts that call the example programs.
119 #
120 # Some programs can find their input file(s) only if the current directory,
121 # when they are executed, is the program's own source directory.
122 # To make these program invocations as consistent as possible, and to avoid
123 # having to specify parameters for the programs, most programs are executed
124 # from their own source directory.
125
126 # dom_read_write shall write its output file in the build directory,
127 # which may or may not be the same as the source directory.
128 # Here it's necessary to specify parameters when the input file and the output
129 # file are located in different directories.
130 dom_read_write/make-check-sh: Makefile
131         echo '# Generated and used by "make check"' >$@
132         echo 'dom_read_write/dom_read_write "$(srcdir)/dom_read_write/example.xml" dom_read_write/example_output.xml >/dev/null' >>$@
133         chmod +x $@
134
135 script_template = cd "$(srcdir)/<!progname!>" && "$(abs_builddir)/<!progname!>/<!progname!>" >/dev/null
136 standard_scripts = $(filter-out dom_read_write/make-check-sh,$(check_SCRIPTS))
137
138 # All other script files are generated like so:
139 $(standard_scripts): Makefile
140         echo '# Generated and used by "make check"' >$@
141         echo '$(subst <!progname!>,$(subst /make-check-sh,,$@),$(script_template))' >>$@
142         chmod +x $@
143
144 CLEANFILES = \
145   dom_read_write/example_output.xml \
146   $(check_SCRIPTS)