2 # Automated Testing Framework (atf)
4 # Copyright (c) 2007 The NetBSD Foundation, Inc.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
10 # 1. Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
16 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
17 # CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18 # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 # IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
21 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 lib_LTLIBRARIES += libatf-c.la
31 libatf_c_la_SOURCES = atf-c/build.c \
47 nodist_libatf_c_la_SOURCES = atf-c/defs.h
48 libatf_c_la_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \
49 "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \
50 "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \
51 "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \
52 "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \
53 "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \
54 "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \
55 "-DATF_CONFDIR=\"$(atf_confdir)\"" \
56 "-DATF_INCLUDEDIR=\"$(includedir)\"" \
57 "-DATF_LIBDIR=\"$(libdir)\"" \
58 "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \
59 "-DATF_MACHINE=\"$(atf_machine)\"" \
60 "-DATF_M4=\"$(ATF_M4)\"" \
61 "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \
62 "-DATF_SHELL=\"$(ATF_SHELL)\"" \
63 "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \
65 libatf_c_la_LDFLAGS = -version-info 0:0:0
67 # XXX For some reason, the nodist line above does not work as expected.
68 # Work this problem around.
69 dist-hook: kill-defs-h
71 rm -f $(distdir)/atf-c/defs.h
73 include_HEADERS += atf-c.h
74 atf_c_HEADERS = atf-c/build.h \
84 atf_cdir = $(includedir)/atf-c
86 dist_man_MANS += atf-c/atf-c-api.3
88 atf_aclocal_DATA += atf-c/atf-common.m4 atf-c/atf-c.m4
89 EXTRA_DIST += atf-c/atf-common.m4 atf-c/atf-c.m4
91 atf_cpkgconfigdir = $(atf_pkgconfigdir)
92 atf_cpkgconfig_DATA = atf-c/atf-c.pc
93 CLEANFILES += atf-c/atf-c.pc
94 EXTRA_DIST += atf-c/atf-c.pc.in
95 atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in Makefile
96 test -d atf-c || mkdir -p atf-c
97 sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \
98 -e 's#__CC__#$(CC)#g' \
99 -e 's#__INCLUDEDIR__#$(includedir)#g' \
100 -e 's#__LIBDIR__#$(libdir)#g' \
101 <$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp
102 mv atf-c/atf-c.pc.tmp atf-c/atf-c.pc
104 tests_atf_c_DATA = atf-c/Atffile \
106 atf-c/macros_h_test.c \
108 tests_atf_cdir = $(pkgtestsdir)/atf-c
109 EXTRA_DIST += $(tests_atf_c_DATA)
111 tests_atf_c_PROGRAMS = atf-c/atf_c_test
112 atf_c_atf_c_test_SOURCES = atf-c/atf_c_test.c
113 atf_c_atf_c_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
115 tests_atf_c_PROGRAMS += atf-c/build_test
116 atf_c_build_test_SOURCES = atf-c/build_test.c atf-c/h_build.h
117 atf_c_build_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
119 tests_atf_c_PROGRAMS += atf-c/check_test
120 atf_c_check_test_SOURCES = atf-c/check_test.c
121 atf_c_check_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
123 tests_atf_c_PROGRAMS += atf-c/config_test
124 atf_c_config_test_SOURCES = atf-c/config_test.c
125 atf_c_config_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
127 tests_atf_c_PROGRAMS += atf-c/error_test
128 atf_c_error_test_SOURCES = atf-c/error_test.c
129 atf_c_error_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
131 tests_atf_c_PROGRAMS += atf-c/macros_test
132 atf_c_macros_test_SOURCES = atf-c/macros_test.c
133 atf_c_macros_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
135 tests_atf_c_SCRIPTS = atf-c/pkg_config_test
136 CLEANFILES += atf-c/pkg_config_test
137 EXTRA_DIST += atf-c/pkg_config_test.sh
138 atf-c/pkg_config_test: $(srcdir)/atf-c/pkg_config_test.sh
139 test -d atf-c || mkdir -p atf-c
140 @src="$(srcdir)/atf-c/pkg_config_test.sh"; \
141 dst="atf-c/pkg_config_test"; $(BUILD_SH_TP)
143 tests_atf_c_PROGRAMS += atf-c/tc_test
144 atf_c_tc_test_SOURCES = atf-c/tc_test.c
145 atf_c_tc_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
147 tests_atf_c_PROGRAMS += atf-c/tp_test
148 atf_c_tp_test_SOURCES = atf-c/tp_test.c
149 atf_c_tp_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
151 tests_atf_c_PROGRAMS += atf-c/utils_test
152 atf_c_utils_test_SOURCES = atf-c/utils_test.c atf-c/h_build.h
153 atf_c_utils_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
155 include atf-c/detail/Makefile.am.inc
157 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8