107e8f153ff7daf7b21b023ca442aa6a38b97fd1
[petitboot] / test / parser / Makefile.am
1 #  This program is free software; you can redistribute it and/or modify
2 #  it under the terms of the GNU General Public License as published by
3 #  the Free Software Foundation; version 2 of the License.
4 #
5 #  This program is distributed in the hope that it will be useful,
6 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8 #  GNU General Public License for more details.
9 #
10 #  You should have received a copy of the GNU General Public License
11 #  along with this program; if not, write to the Free Software
12 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
13
14
15 AM_CPPFLAGS = \
16         -I$(top_srcdir) \
17         -I$(top_srcdir)/lib \
18         -I$(includedir) \
19         $(DEFAULT_CPPFLAGS)
20
21 AM_CFLAGS = \
22         $(DEFAULT_CFLAGS)
23
24 common_libs = \
25         $(top_builddir)/lib/libpbcore.la \
26         $(top_builddir)/discover/libparser.la
27
28 noinst_PROGRAMS = parser-test
29
30 parser_test_SOURCES = parser-test.c
31 parser_test_LDADD = $(common_libs)
32
33 noinst_DATA = \
34         data/kboot-01/expected-output \
35         data/kboot-01/etc/kboot.conf \
36         data/kboot-02/expected-output \
37         data/kboot-02/etc/kboot.conf \
38         data/kboot-03/expected-output \
39         data/kboot-03/etc/kboot.conf \
40         data/kboot-04/expected-output \
41         data/kboot-04/etc/kboot.conf \
42         data/kboot-05/expected-output \
43         data/kboot-05/etc/kboot.conf \
44         data/kboot-06/expected-output \
45         data/kboot-06/etc/kboot.conf \
46         data/kboot-07/etc/kboot.conf \
47         data/yaboot-01/expected-output \
48         data/yaboot-01/etc/yaboot.conf \
49         data/yaboot-02/etc/yaboot.conf \
50         data/yaboot-03/etc/yaboot.conf \
51         data/yaboot-04/etc/yaboot.conf \
52         data/yaboot-05/etc/yaboot.conf \
53         data/yaboot-06/etc/yaboot.conf
54
55 composed_noinst_scripts = \
56         run-parser-tests
57
58 noinst_SCRIPTS = $(composed_noinst_scripts)
59
60 edit = sed \
61         -e 's|@PACKAGE_NAME\@|$(PACKAGE_NAME)|g' \
62         -e 's|@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|g' \
63         -e 's|@PACKAGE_BUGREPORT\@|$(PACKAGE_BUGREPORT)|g' \
64         -e 's|@abs_srcdir\@|$(abs_srcdir)|g' \
65         -e 's|@abs_builddir\@|$(abs_builddir)|g' \
66         -e 's|@prefix\@|$(prefix)|g'
67
68 run-parser-tests: Makefile $(srcdir)/run-parser-tests.in
69         rm -f $@ $@.tmp
70         $(edit) $(srcdir)/$@.in >$@.tmp
71         chmod +x $@.tmp
72         mv $@.tmp $@
73
74 composed_files = $(composed_noinst_scripts)
75
76 EXTRA_DIST = $(addsuffix .in, $(composed_files))
77
78 MAINTAINERCLEANFILES = Makefile.in
79
80 CLEANFILES = $(composed_files) $(addsuffix .tmp, $(composed_files))