Blob


1 # When creating a distribution tarball, make sure we enable all current
2 # configure flags so that no files are missing. This is irrespective of
3 # whether the end-user will enable this; this step is here so that all the
4 # relevant files are included in the distribution.
5 AM_DISTCHECK_CONFIGURE_FLAGS= \
6 --enable-cvg \
7 --enable-gotd
8
9 SUBDIRS = compat libexec got tog gotadmin template gotwebd
11 # -portable: re-enable once upstream is happy: cvg
12 # TODO: gotd gotsh template
14 if GOTD_ENABLED
15 SUBDIRS += gotd gotsh gotctl gitwrapper
16 endif
18 if CVG_ENABLED
19 SUBDIRS += cvg
20 endif
22 include $(top_builddir)/Makefile.common
24 EXTRA_DIST = CHANGES CHANGELOG LICENCE README.portable util/got-portable-ver.sh
26 LDADD = $(LIBOBJS)
27 if HOST_FREEBSD
28 LDADD += -lmd
29 LIBS += -lmd
30 endif
32 LIBS += -lm $(zlib_LIBS) $(libbsd_LIBS) $(libmd_LIBS)
33 AM_CPPFLAGS += $(libbsd_CFLAGS) $(libmd_CFLAGS)
35 TEST_TARGETS=compat regress-delta regress-deltify regress-fetch regress-idset \
36 regress-path regress-tog regress-cmdline
37 GOT_TEST_ROOT=/tmp
39 .PHONY: compat
40 compat:
41 $(MAKE) -C compat
43 tests: $(TEST_TARGETS)
45 regress-cmdline:
46 (export PLATFORM=@PLATFORM@; \
47 cd $(top_builddir)/regress/cmdline || exit $$?; \
48 ./checkout.sh -q -r "$(GOT_TEST_ROOT)"; \
49 ./update.sh -q -r "$(GOT_TEST_ROOT)"; \
50 ./status.sh -q -r "$(GOT_TEST_ROOT)"; \
51 ./log.sh -q -r "$(GOT_TEST_ROOT)"; \
52 ./add.sh -q -r "$(GOT_TEST_ROOT)"; \
53 ./rm.sh -q -r "$(GOT_TEST_ROOT)"; \
54 ./diff.sh -q -r "$(GOT_TEST_ROOT)"; \
55 ./blame.sh -q -r "$(GOT_TEST_ROOT)"; \
56 ./branch.sh -q -r "$(GOT_TEST_ROOT)"; \
57 ./tag.sh -q -r "$(GOT_TEST_ROOT)"; \
58 ./ref.sh -q -r "$(GOT_TEST_ROOT)"; \
59 ./commit.sh -q -r "$(GOT_TEST_ROOT)"; \
60 ./revert.sh -q -r "$(GOT_TEST_ROOT)"; \
61 ./cherrypick.sh -q -r "$(GOT_TEST_ROOT)"; \
62 ./backout.sh -q -r "$(GOT_TEST_ROOT)"; \
63 ./rebase.sh -q -r "$(GOT_TEST_ROOT)"; \
64 ./import.sh -q -r "$(GOT_TEST_ROOT)"; \
65 ./histedit.sh -q -r "$(GOT_TEST_ROOT)"; \
66 ./integrate.sh -q -r "$(GOT_TEST_ROOT)"; \
67 ./merge.sh -q -r "$(GOT_TEST_ROOT)"; \
68 ./stage.sh -q -r "$(GOT_TEST_ROOT)"; \
69 ./unstage.sh -q -r "$(GOT_TEST_ROOT)"; \
70 ./cat.sh -q -r "$(GOT_TEST_ROOT)"; \
71 ./clone.sh -q -r "$(GOT_TEST_ROOT)"; \
72 ./fetch.sh -q -r "$(GOT_TEST_ROOT)"; \
73 ./send.sh -q -r "$(GOT_TEST_ROOT)"; \
74 ./tree.sh -q -r "$(GOT_TEST_ROOT)"; \
75 ./patch.sh -q -r "$(GOT_TEST_ROOT)" \
76 ./pack.sh -q -r "$(GOT_TEST_ROOT)"; \
77 ./cleanup.sh -q -r "$(GOT_TEST_ROOT)")
79 regress-delta:
80 $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
81 -o $(top_builddir)/regress/delta/delta_test \
82 $(top_srcdir)/lib/bloom.c \
83 $(top_srcdir)/lib/buf.c \
84 $(top_srcdir)/lib/date.c \
85 $(top_srcdir)/lib/deflate.c \
86 $(top_srcdir)/lib/delta.c \
87 $(top_srcdir)/lib/delta_cache.c \
88 $(top_srcdir)/lib/deltify.c \
89 $(top_srcdir)/lib/error.c \
90 $(top_srcdir)/lib/gotconfig.c \
91 $(top_srcdir)/lib/hash.c \
92 $(top_srcdir)/lib/inflate.c \
93 $(top_srcdir)/lib/lockfile.c \
94 $(top_srcdir)/lib/murmurhash2.c \
95 $(top_srcdir)/lib/object.c \
96 $(top_srcdir)/lib/object_cache.c \
97 $(top_srcdir)/lib/object_create.c \
98 $(top_srcdir)/lib/object_idset.c \
99 $(top_srcdir)/lib/object_open_privsep.c \
100 $(top_srcdir)/lib/object_parse.c \
101 $(top_srcdir)/lib/object_qid.c \
102 $(top_srcdir)/lib/opentemp.c \
103 $(top_srcdir)/lib/pack.c \
104 $(top_srcdir)/lib/pack_create.c \
105 $(top_srcdir)/lib/pack_create_privsep.c \
106 $(top_srcdir)/lib/path.c \
107 $(top_srcdir)/lib/pollfd.c \
108 $(top_srcdir)/lib/privsep.c \
109 $(top_srcdir)/lib/ratelimit.c \
110 $(top_srcdir)/lib/read_gitconfig_privsep.c \
111 $(top_srcdir)/lib/read_gotconfig_privsep.c \
112 $(top_srcdir)/lib/reference.c \
113 $(top_srcdir)/lib/reference_parse.c \
114 $(top_srcdir)/lib/repository.c \
115 $(top_srcdir)/lib/sigs.c \
116 $(top_srcdir)/regress/delta/delta_test.c \
117 -L$(top_builddir)/compat -lopenbsd-compat $(LIBS) && \
118 $(top_builddir)/regress/delta/delta_test
120 regress-deltify:
121 $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
122 -o $(top_builddir)/regress/deltify/deltify_test \
123 $(top_srcdir)/lib/bloom.c \
124 $(top_srcdir)/lib/buf.c \
125 $(top_srcdir)/lib/date.c \
126 $(top_srcdir)/lib/deflate.c \
127 $(top_srcdir)/lib/delta.c \
128 $(top_srcdir)/lib/delta_cache.c \
129 $(top_srcdir)/lib/deltify.c \
130 $(top_srcdir)/lib/error.c \
131 $(top_srcdir)/lib/gotconfig.c \
132 $(top_srcdir)/lib/hash.c \
133 $(top_srcdir)/lib/inflate.c \
134 $(top_srcdir)/lib/lockfile.c \
135 $(top_srcdir)/lib/murmurhash2.c \
136 $(top_srcdir)/lib/object.c \
137 $(top_srcdir)/lib/object_cache.c \
138 $(top_srcdir)/lib/object_create.c \
139 $(top_srcdir)/lib/object_idset.c \
140 $(top_srcdir)/lib/object_open_privsep.c \
141 $(top_srcdir)/lib/object_parse.c \
142 $(top_srcdir)/lib/object_qid.c \
143 $(top_srcdir)/lib/opentemp.c \
144 $(top_srcdir)/lib/pack.c \
145 $(top_srcdir)/lib/pack_create.c \
146 $(top_srcdir)/lib/pack_create_privsep.c \
147 $(top_srcdir)/lib/path.c \
148 $(top_srcdir)/lib/pollfd.c \
149 $(top_srcdir)/lib/privsep.c \
150 $(top_srcdir)/lib/ratelimit.c \
151 $(top_srcdir)/lib/read_gitconfig_privsep.c \
152 $(top_srcdir)/lib/read_gotconfig_privsep.c \
153 $(top_srcdir)/lib/reference.c \
154 $(top_srcdir)/lib/reference_parse.c \
155 $(top_srcdir)/lib/repository.c \
156 $(top_srcdir)/lib/sigs.c \
157 $(top_srcdir)/regress/deltify/deltify_test.c \
158 -L$(top_builddir)/compat -lopenbsd-compat $(LIBS) && \
159 $(top_builddir)/regress/deltify/deltify_test
161 regress-fetch:
162 $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
163 -o $(top_builddir)/regress/fetch/fetch_test \
164 $(top_srcdir)/lib/bloom.c \
165 $(top_srcdir)/lib/buf.c \
166 $(top_srcdir)/lib/date.c \
167 $(top_srcdir)/lib/deflate.c \
168 $(top_srcdir)/lib/delta.c \
169 $(top_srcdir)/lib/delta_cache.c \
170 $(top_srcdir)/lib/deltify.c \
171 $(top_srcdir)/lib/dial.c \
172 $(top_srcdir)/lib/error.c \
173 $(top_srcdir)/lib/fetch.c \
174 $(top_srcdir)/lib/gotconfig.c \
175 $(top_srcdir)/lib/hash.c \
176 $(top_srcdir)/lib/inflate.c \
177 $(top_srcdir)/lib/lockfile.c \
178 $(top_srcdir)/lib/murmurhash2.c \
179 $(top_srcdir)/lib/object.c \
180 $(top_srcdir)/lib/object_cache.c \
181 $(top_srcdir)/lib/object_create.c \
182 $(top_srcdir)/lib/object_idset.c \
183 $(top_srcdir)/lib/object_open_privsep.c \
184 $(top_srcdir)/lib/object_parse.c \
185 $(top_srcdir)/lib/object_qid.c \
186 $(top_srcdir)/lib/opentemp.c \
187 $(top_srcdir)/lib/pack.c \
188 $(top_srcdir)/lib/pack_create.c \
189 $(top_srcdir)/lib/pack_create_privsep.c \
190 $(top_srcdir)/lib/path.c \
191 $(top_srcdir)/lib/pollfd.c \
192 $(top_srcdir)/lib/privsep.c \
193 $(top_srcdir)/lib/ratelimit.c \
194 $(top_srcdir)/lib/read_gitconfig_privsep.c \
195 $(top_srcdir)/lib/read_gotconfig_privsep.c \
196 $(top_srcdir)/lib/reference.c \
197 $(top_srcdir)/lib/reference_parse.c \
198 $(top_srcdir)/lib/repository.c \
199 $(top_srcdir)/lib/sigs.c \
200 $(top_srcdir)/regress/fetch/fetch_test.c \
201 -L$(top_builddir)/compat -lopenbsd-compat $(LIBS) -lm && \
202 $(top_builddir)/regress/fetch/fetch_test
204 regress-idset:
205 $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
206 -o $(top_builddir)/regress/idset/idset_test \
207 $(top_srcdir)/lib/bloom.c \
208 $(top_srcdir)/lib/buf.c \
209 $(top_srcdir)/lib/date.c \
210 $(top_srcdir)/lib/deflate.c \
211 $(top_srcdir)/lib/delta.c \
212 $(top_srcdir)/lib/delta_cache.c \
213 $(top_srcdir)/lib/deltify.c \
214 $(top_srcdir)/lib/dial.c \
215 $(top_srcdir)/lib/error.c \
216 $(top_srcdir)/lib/fetch.c \
217 $(top_srcdir)/lib/gotconfig.c \
218 $(top_srcdir)/lib/hash.c \
219 $(top_srcdir)/lib/inflate.c \
220 $(top_srcdir)/lib/lockfile.c \
221 $(top_srcdir)/lib/murmurhash2.c \
222 $(top_srcdir)/lib/object.c \
223 $(top_srcdir)/lib/object_cache.c \
224 $(top_srcdir)/lib/object_create.c \
225 $(top_srcdir)/lib/object_idset.c \
226 $(top_srcdir)/lib/object_open_privsep.c \
227 $(top_srcdir)/lib/object_parse.c \
228 $(top_srcdir)/lib/object_qid.c \
229 $(top_srcdir)/lib/opentemp.c \
230 $(top_srcdir)/lib/pack.c \
231 $(top_srcdir)/lib/pack_create.c \
232 $(top_srcdir)/lib/pack_create_privsep.c \
233 $(top_srcdir)/lib/path.c \
234 $(top_srcdir)/lib/pollfd.c \
235 $(top_srcdir)/lib/privsep.c \
236 $(top_srcdir)/lib/ratelimit.c \
237 $(top_srcdir)/lib/read_gitconfig_privsep.c \
238 $(top_srcdir)/lib/read_gotconfig_privsep.c \
239 $(top_srcdir)/lib/reference.c \
240 $(top_srcdir)/lib/reference_parse.c \
241 $(top_srcdir)/lib/repository.c \
242 $(top_srcdir)/lib/sigs.c \
243 $(top_srcdir)/regress/idset/idset_test.c \
244 -L$(top_builddir)/compat -lopenbsd-compat $(LIBS) && \
245 $(top_builddir)/regress/idset/idset_test
247 regress-path:
248 $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
249 -o $(top_builddir)/regress/path/path_test \
250 $(top_srcdir)/lib/bloom.c \
251 $(top_srcdir)/lib/buf.c \
252 $(top_srcdir)/lib/date.c \
253 $(top_srcdir)/lib/deflate.c \
254 $(top_srcdir)/lib/delta.c \
255 $(top_srcdir)/lib/delta_cache.c \
256 $(top_srcdir)/lib/deltify.c \
257 $(top_srcdir)/lib/dial.c \
258 $(top_srcdir)/lib/error.c \
259 $(top_srcdir)/lib/fetch.c \
260 $(top_srcdir)/lib/gotconfig.c \
261 $(top_srcdir)/lib/hash.c \
262 $(top_srcdir)/lib/inflate.c \
263 $(top_srcdir)/lib/lockfile.c \
264 $(top_srcdir)/lib/murmurhash2.c \
265 $(top_srcdir)/lib/object.c \
266 $(top_srcdir)/lib/object_cache.c \
267 $(top_srcdir)/lib/object_create.c \
268 $(top_srcdir)/lib/object_idset.c \
269 $(top_srcdir)/lib/object_open_privsep.c \
270 $(top_srcdir)/lib/object_parse.c \
271 $(top_srcdir)/lib/object_qid.c \
272 $(top_srcdir)/lib/opentemp.c \
273 $(top_srcdir)/lib/pack.c \
274 $(top_srcdir)/lib/pack_create.c \
275 $(top_srcdir)/lib/pack_create_privsep.c \
276 $(top_srcdir)/lib/path.c \
277 $(top_srcdir)/lib/pollfd.c \
278 $(top_srcdir)/lib/privsep.c \
279 $(top_srcdir)/lib/ratelimit.c \
280 $(top_srcdir)/lib/read_gitconfig_privsep.c \
281 $(top_srcdir)/lib/read_gotconfig_privsep.c \
282 $(top_srcdir)/lib/reference.c \
283 $(top_srcdir)/lib/reference_parse.c \
284 $(top_srcdir)/lib/repository.c \
285 $(top_srcdir)/lib/sigs.c \
286 $(top_srcdir)/regress/path/path_test.c \
287 -L$(top_builddir)/compat -lopenbsd-compat $(LIBS) && \
288 $(top_builddir)/regress/path/path_test
290 regress-tog:
291 (cd $(top_builddir)/regress/tog || exit $$?; \
292 ./log.sh -q -r "$(GOT_TEST_ROOT)");