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