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