1 | # schroot Makefile template |
---|
2 | # |
---|
3 | # |
---|
4 | # Copyright © 2004-2008 Roger Leigh <rleigh@debian.org> |
---|
5 | # |
---|
6 | # schroot is free software: you can redistribute it and/or modify it |
---|
7 | # under the terms of the GNU General Public License as published by |
---|
8 | # the Free Software Foundation, either version 3 of the License, or |
---|
9 | # (at your option) any later version. |
---|
10 | # |
---|
11 | # schroot is distributed in the hope that it will be useful, but |
---|
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | # General Public License for more details. |
---|
15 | # |
---|
16 | # You should have received a copy of the GNU General Public License |
---|
17 | # along with this program. If not, see |
---|
18 | # <http://www.gnu.org/licenses/>. |
---|
19 | # |
---|
20 | ##################################################################### |
---|
21 | |
---|
22 | include $(top_srcdir)/scripts/global.mk |
---|
23 | |
---|
24 | LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) $(CPPUNIT_CFLAGS) -DTESTDATADIR='"./testdata"' -I$(top_srcdir)/bin |
---|
25 | |
---|
26 | if USE_UNIT_TESTS |
---|
27 | noinst_LTLIBRARIES = libtest.la |
---|
28 | |
---|
29 | noinst_PROGRAMS = \ |
---|
30 | sbuild-chroot \ |
---|
31 | sbuild-chroot-plain \ |
---|
32 | sbuild-chroot-file \ |
---|
33 | sbuild-chroot-directory \ |
---|
34 | sbuild-chroot-block-device \ |
---|
35 | sbuild-chroot-loopback \ |
---|
36 | sbuild-chroot-lvm-snapshot \ |
---|
37 | sbuild-chroot-config \ |
---|
38 | sbuild-environment \ |
---|
39 | sbuild-keyfile \ |
---|
40 | sbuild-lock \ |
---|
41 | sbuild-log \ |
---|
42 | sbuild-nostream \ |
---|
43 | sbuild-parse-value \ |
---|
44 | sbuild-personality \ |
---|
45 | sbuild-regex \ |
---|
46 | sbuild-run-parts \ |
---|
47 | sbuild-util \ |
---|
48 | schroot-base-option-action |
---|
49 | |
---|
50 | # sbuild-lock is excluded, because it is timing dependent and can fail |
---|
51 | # randomly on slow or heavily-loaded systems. |
---|
52 | TESTS = setup-test-data \ |
---|
53 | sbuild-chroot \ |
---|
54 | sbuild-chroot-plain \ |
---|
55 | sbuild-chroot-file \ |
---|
56 | sbuild-chroot-directory \ |
---|
57 | sbuild-chroot-block-device \ |
---|
58 | sbuild-chroot-loopback \ |
---|
59 | sbuild-chroot-lvm-snapshot \ |
---|
60 | sbuild-chroot-config \ |
---|
61 | sbuild-environment \ |
---|
62 | sbuild-keyfile \ |
---|
63 | sbuild-log \ |
---|
64 | sbuild-nostream \ |
---|
65 | sbuild-parse-value \ |
---|
66 | sbuild-personality \ |
---|
67 | sbuild-run-parts \ |
---|
68 | sbuild-regex \ |
---|
69 | sbuild-util \ |
---|
70 | schroot-base-option-action \ |
---|
71 | cleanup-test-data |
---|
72 | endif |
---|
73 | |
---|
74 | libtest_la_SOURCES = \ |
---|
75 | test-helpers.h \ |
---|
76 | testmain.cc |
---|
77 | libtest_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la $(CPPUNIT_LIBS) |
---|
78 | |
---|
79 | if BUILD_BLOCKDEV |
---|
80 | sbuild_chroot_blockdev_sources = \ |
---|
81 | sbuild-chroot-block-device.cc |
---|
82 | endif |
---|
83 | |
---|
84 | if BUILD_LOOPBACK |
---|
85 | sbuild_chroot_loopback_sources = \ |
---|
86 | sbuild-chroot-loopback.cc |
---|
87 | endif |
---|
88 | |
---|
89 | if BUILD_LVMSNAP |
---|
90 | sbuild_chroot_lvmsnap_sources = \ |
---|
91 | sbuild-chroot-lvm-snapshot.cc |
---|
92 | endif |
---|
93 | |
---|
94 | sbuild_chroot_SOURCES = \ |
---|
95 | sbuild-chroot.cc \ |
---|
96 | test-sbuild-chroot.h |
---|
97 | sbuild_chroot_LDADD = libtest.la |
---|
98 | |
---|
99 | sbuild_chroot_plain_SOURCES = \ |
---|
100 | sbuild-chroot-plain.cc \ |
---|
101 | test-sbuild-chroot.h |
---|
102 | sbuild_chroot_plain_LDADD = libtest.la |
---|
103 | |
---|
104 | sbuild_chroot_file_SOURCES = \ |
---|
105 | sbuild-chroot-file.cc \ |
---|
106 | test-sbuild-chroot.h |
---|
107 | sbuild_chroot_file_LDADD = libtest.la |
---|
108 | |
---|
109 | sbuild_chroot_directory_SOURCES = \ |
---|
110 | sbuild-chroot-directory.cc \ |
---|
111 | test-sbuild-chroot.h |
---|
112 | sbuild_chroot_directory_LDADD = libtest.la |
---|
113 | |
---|
114 | sbuild_chroot_block_device_SOURCES = \ |
---|
115 | $(sbuild_chroot_blockdev_sources) \ |
---|
116 | test-sbuild-chroot.h |
---|
117 | sbuild_chroot_block_device_LDADD = libtest.la |
---|
118 | |
---|
119 | sbuild_chroot_lvm_snapshot_SOURCES = \ |
---|
120 | $(sbuild_chroot_lvmsnap_sources) \ |
---|
121 | test-sbuild-chroot.h |
---|
122 | sbuild_chroot_lvm_snapshot_LDADD = libtest.la |
---|
123 | |
---|
124 | sbuild_chroot_loopback_SOURCES = \ |
---|
125 | $(sbuild_chroot_loopback_sources) \ |
---|
126 | test-sbuild-chroot.h |
---|
127 | sbuild_chroot_loopback_LDADD = libtest.la |
---|
128 | |
---|
129 | sbuild_chroot_config_SOURCES = sbuild-chroot-config.cc |
---|
130 | sbuild_chroot_config_LDADD = libtest.la |
---|
131 | |
---|
132 | sbuild_environment_SOURCES = sbuild-environment.cc |
---|
133 | sbuild_environment_LDADD = libtest.la |
---|
134 | |
---|
135 | sbuild_keyfile_SOURCES = sbuild-keyfile.cc |
---|
136 | sbuild_keyfile_LDADD = libtest.la |
---|
137 | |
---|
138 | sbuild_lock_SOURCES = sbuild-lock.cc |
---|
139 | sbuild_lock_LDADD = libtest.la |
---|
140 | |
---|
141 | sbuild_log_SOURCES = sbuild-log.cc |
---|
142 | sbuild_log_LDADD = libtest.la |
---|
143 | |
---|
144 | sbuild_nostream_SOURCES = sbuild-nostream.cc |
---|
145 | sbuild_nostream_LDADD = libtest.la |
---|
146 | |
---|
147 | sbuild_parse_value_SOURCES = sbuild-parse-value.cc |
---|
148 | sbuild_parse_value_LDADD = libtest.la |
---|
149 | |
---|
150 | sbuild_personality_SOURCES = sbuild-personality.cc |
---|
151 | sbuild_personality_LDADD = libtest.la |
---|
152 | |
---|
153 | sbuild_regex_SOURCES = sbuild-regex.cc |
---|
154 | sbuild_regex_LDADD = libtest.la |
---|
155 | |
---|
156 | sbuild_run_parts_SOURCES = sbuild-run-parts.cc |
---|
157 | sbuild_run_parts_LDADD = libtest.la |
---|
158 | |
---|
159 | sbuild_util_SOURCES = sbuild-util.cc |
---|
160 | sbuild_util_LDADD = libtest.la |
---|
161 | |
---|
162 | schroot_base_option_action_SOURCES = schroot-base-option-action.cc |
---|
163 | schroot_base_option_action_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la libtest.la |
---|
164 | |
---|
165 | EXTRA_DIST = \ |
---|
166 | keyfile.ex1 \ |
---|
167 | config.ex1 \ |
---|
168 | config.ex2/file \ |
---|
169 | config.ex2/empty \ |
---|
170 | config.ex2/experimental \ |
---|
171 | config.ex2/sarge \ |
---|
172 | config.ex2/sid \ |
---|
173 | config.ex2/woody \ |
---|
174 | config-directory-deprecated.ex \ |
---|
175 | config-directory-fail.ex \ |
---|
176 | config-directory-valid.ex \ |
---|
177 | run-parts.ex1/10test1 \ |
---|
178 | run-parts.ex1/20test2 \ |
---|
179 | run-parts.ex1/30test3 \ |
---|
180 | run-parts.ex2 \ |
---|
181 | run-parts.ex3/50invalid \ |
---|
182 | setup-test-data \ |
---|
183 | cleanup-test-data |
---|
184 | |
---|
185 | clean-local: |
---|
186 | $(srcdir)/cleanup-test-data |
---|