monotone

monotone Mtn Source Tree

Root/Makefile.am

1AUTOMAKE_OPTIONS=subdir-objects 1.7.1
2ACLOCAL_AMFLAGS = -I m4
3
4MOST_SOURCES =\
5 app_state.cc app_state.hh\
6 commands.cc commands.hh\
7 diff_patch.cc diff_patch.hh\
8 lua.cc lua.hh\
9 transforms.cc transforms.hh\
10 update.cc update.hh\
11 work.cc work.hh\
12 cert.cc cert.hh\
13 database.cc database.hh\
14 file_io.cc file_io.hh\
15 keys.cc keys.hh\
16 manifest.cc manifest.hh\
17 packet.cc packet.hh\
18 sanity.cc sanity.hh\
19 vocab.cc vocab.hh vocab_terms.hh numeric_vocab.hh\
20 rcs_file.cc rcs_file.hh\
21 xdelta.cc xdelta.hh\
22 ui.cc ui.hh\
23 schema_migration.cc schema_migration.hh\
24 constants.cc constants.hh\
25 netsync.cc netsync.hh\
26 netcmd.cc netcmd.hh\
27 merkle_tree.cc merkle_tree.hh\
28 basic_io.cc basic_io.hh\
29 mkstemp.cc mkstemp.hh\
30 lcs.cc lcs.hh\
31 rcs_import.cc rcs_import.hh\
32 git.cc git.hh\
33 git_import.cc git_import.hh\
34 git_export.cc git_export.hh\
35 revision.cc revision.hh\
36 change_set.cc change_set.hh\
37 mt_version.cc mt_version.hh\
38 automate.cc automate.hh\
39 database_check.cc database_check.hh\
40 epoch.cc epoch.hh\
41 inodeprint.cc inodeprint.hh\
42 selectors.cc selectors.hh\
43 annotate.cc annotate.hh\
44 restrictions.cc restrictions.hh\
45 hmac.cc hmac.hh \
46 globish.cc globish.hh \
47 string_queue.cc string_queue.hh \
48 paths.cc paths.hh \
49 \
50 cleanup.hh unit_tests.hh interner.hh\
51 cycle_detector.hh randomfile.hh adler32.hh quick_alloc.hh\
52 netio.hh smap.hh gettext.h\
53 package_revision.c package_revision.h\
54 package_full_revision.c package_full_revision.h options.hh \
55 i18n.h
56
57NETXX_SOURCES =\
58netxx/accept.cxx netxx/accept.h netxx/address.cxx\
59netxx/common.h netxx/compat.h netxx/datagram.cxx\
60netxx/datagramserver.cxx netxx/osutil.cxx netxx/osutil.h\
61netxx/peer.cxx netxx/probe.cxx netxx/probe_impl.h\
62netxx/probe_select.cxx netxx/recvfrom.cxx netxx/recvfrom.h\
63netxx/resolve.h netxx/serverbase.cxx netxx/serverbase.h\
64 netxx/sockaddr.cxx netxx/sockaddr.h netxx/socket.cxx\
65netxx/socket.h netxx/sockopt.cxx netxx/stream.cxx\
66netxx/streambase.cxx netxx/streamserver.cxx\
67netxx/address.h netxx/datagram.h netxx/datagramserver.h\
68netxx/netbuf.h netxx/netxx.h netxx/peer.h netxx/probe.h\
69netxx/probeinfo.h netxx/sockopt.h netxx/stream.h netxx/streambase.h\
70netxx/streamserver.h netxx/timeout.h netxx/types.h
71
72BOTAN_SOURCES = \
73 botan/aes.cpp botan/aes_tab.cpp botan/algolist.cpp\
74 botan/allocate.cpp botan/arc4.cpp botan/asn1_alg.cpp\
75 botan/asn1_alt.cpp botan/asn1_att.cpp botan/asn1_dn.cpp\
76 botan/asn1_ext.cpp botan/asn1_ku.cpp botan/asn1_oid.cpp\
77 botan/asn1_str.cpp botan/asn1_tm.cpp botan/barrett.cpp\
78 botan/base.cpp botan/base64.cpp botan/basefilt.cpp\
79 botan/ber_code.cpp botan/ber_dec.cpp botan/big_base.cpp\
80 botan/big_code.cpp botan/big_io.cpp botan/big_ops2.cpp\
81 botan/big_ops3.cpp botan/blinding.cpp botan/buf_es.cpp\
82 botan/buf_filt.cpp botan/cbc.cpp botan/certstore.cpp\
83 botan/cfb.cpp botan/charset.cpp botan/conf.cpp botan/crc32.cpp\
84 botan/crl_ent.cpp botan/ctr.cpp botan/cts.cpp\
85 botan/data_snk.cpp botan/data_src.cpp botan/def_eng.cpp\
86 botan/def_ops.cpp botan/defalloc.cpp botan/der_code.cpp\
87 botan/der_enc.cpp botan/divide.cpp botan/dl_algo.cpp\
88 botan/dl_get.cpp botan/dl_group.cpp botan/dl_param.cpp\
89 botan/dl_cache.cpp \
90 botan/dlies.cpp botan/eax.cpp botan/ecb.cpp botan/eme1.cpp\
91 botan/eme_pkcs.cpp botan/emsa1.cpp botan/emsa2.cpp\
92 botan/emsa3.cpp botan/emsa4.cpp botan/emsa_raw.cpp\
93 botan/eng_base.cpp botan/engine.cpp botan/es_file.cpp\
94 botan/exceptn.cpp botan/filter.cpp botan/filters.cpp\
95 botan/fips140.cpp botan/fips_rng.cpp botan/fused.cpp\
96 botan/get_algo.cpp botan/get_enc.cpp botan/get_pbe.cpp\
97 botan/gzip.cpp botan/hash_id.cpp botan/hex.cpp botan/hmac.cpp\
98 botan/if_algo.cpp botan/inifile.cpp botan/init.cpp\
99 botan/kdf.cpp botan/keypair.cpp botan/look_pk.cpp\
100 botan/lookup.cpp botan/make_prm.cpp botan/mdx_hash.cpp\
101 botan/mem_pool.cpp botan/mgf1.cpp botan/mlock.cpp\
102 botan/mod_exp.cpp botan/mode_pad.cpp botan/modebase.cpp\
103 botan/mp_comba.cpp botan/mp_core.cpp botan/mp_fkmul.cpp\
104 botan/mp_misc.cpp botan/mp_mul.cpp botan/mp_shift.cpp\
105 botan/mp_smul.cpp botan/mutex.cpp botan/numthry.cpp\
106 botan/ofb.cpp botan/oids.cpp botan/parse.cpp botan/pbes1.cpp\
107 botan/pbes2.cpp botan/pem.cpp botan/pipe.cpp botan/pipe_io.cpp\
108 botan/pipe_rw.cpp botan/pk_algs.cpp botan/pk_core.cpp\
109 botan/pk_filts.cpp botan/pk_keys.cpp botan/pk_util.cpp\
110 botan/pkcs10.cpp botan/pkcs8.cpp botan/policy.cpp\
111 botan/pow_mod.cpp \
112 botan/prf_x942.cpp botan/primes.cpp botan/pubkey.cpp\
113 botan/randpool.cpp botan/reducer.cpp botan/rng.cpp\
114 botan/rsa.cpp botan/s2k.cpp botan/secqueue.cpp\
115 botan/sha160.cpp botan/symkey.cpp botan/timers.cpp\
116 botan/ui.cpp botan/util.cpp botan/x509_ca.cpp\
117 botan/x509_crl.cpp botan/x509_key.cpp botan/x509_obj.cpp\
118 botan/x509cert.cpp botan/x509find.cpp botan/x509opt.cpp\
119 botan/x509self.cpp botan/x509stor.cpp botan/x917_rng.cpp\
120 \
121 botan/aes.h botan/botan.h botan/def_eng.h botan/es_win32.h\
122 botan/lookup.h botan/omac.h botan/randpool.h botan/version.h\
123 botan/algolist.h botan/buf_es.h botan/der_enc.h\
124 botan/exceptn.h botan/mdx_hash.h botan/par_hash.h\
125 botan/reducer.h botan/x509_ca.h botan/allocate.h\
126 botan/buf_filt.h botan/dh.h botan/filter.h botan/mem_ops.h\
127 botan/pbe.h botan/rng.h botan/x509cert.h botan/arc4.h\
128 botan/cbc.h botan/dl_algo.h botan/filters.h botan/mem_pool.h\
129 botan/pbe_pkcs.h botan/rsa.h botan/x509_crl.h botan/asn1.h\
130 botan/certstor.h botan/dlies.h botan/fips140.h botan/mgf1.h\
131 botan/pem.h botan/s2k.h botan/x509_key.h botan/asn1_obj.h\
132 botan/cfb.h botan/dl_param.h botan/fips_rng.h botan/modebase.h\
133 botan/pipe.h botan/secalloc.h botan/x509_obj.h\
134 botan/asn1_oid.h botan/conf.h botan/eax.h botan/gzip.h\
135 botan/mode_pad.h botan/pk_algs.h botan/secmem.h\
136 botan/x509self.h botan/barrett.h botan/config.h botan/ecb.h\
137 botan/hex.h botan/mod_exp.h botan/pk_core.h botan/secqueue.h\
138 botan/x509stor.h botan/base64.h botan/crc32.h botan/eme.h\
139 botan/hmac.h botan/mp_core.h botan/pkcs10.h botan/sha160.h\
140 botan/x917_rng.h botan/base_eng.h botan/crl_ent.h botan/emsa.h\
141 botan/if_algo.h botan/mp_madd.h botan/pkcs8.h botan/socket.h\
142 botan/x919_mac.h botan/basefilt.h botan/ctr.h botan/engine.h\
143 botan/init.h botan/mp_types.h botan/pk_filts.h botan/symkey.h\
144 botan/base.h botan/cts.h botan/enums.h botan/kdf.h\
145 botan/mutex.h botan/pk_keys.h botan/timers.h botan/ber_dec.h\
146 botan/data_snk.h botan/es_capi.h botan/keypair.h\
147 botan/numthry.h botan/pk_ops.h botan/types.h botan/bigint.h\
148 botan/data_src.h botan/es_egd.h botan/look_add.h botan/ofb.h\
149 botan/pk_util.h botan/ui.h botan/blinding.h botan/defalloc.h\
150 botan/es_file.h botan/look_pk.h botan/oids.h botan/pubkey.h\
151 botan/util.h
152
153
154BOOST_SANDBOX_SOURCES = \
155 boost/circular_buffer_adaptor.hpp \
156boost/circular_buffer_base.hpp \
157boost/circular_buffer_fwd.hpp \
158boost/circular_buffer.hpp
159
160SQLITE_SOURCES = \
161 sqlite/alter.c sqlite/attach.c sqlite/auth.c sqlite/btree.c \
162 sqlite/build.c sqlite/date.c sqlite/delete.c sqlite/expr.c sqlite/func.c \
163 sqlite/hash.c sqlite/insert.c \
164 sqlite/legacy.c sqlite/main.c sqlite/opcodes.c \
165 sqlite/os_unix.c sqlite/os_win.c \
166 sqlite/pager.c sqlite/parse.c sqlite/pragma.c sqlite/printf.c \
167 sqlite/random.c sqlite/select.c sqlite/table.c sqlite/tokenize.c \
168 sqlite/trigger.c sqlite/update.c sqlite/utf.c \
169 sqlite/util.c sqlite/vacuum.c \
170 sqlite/vdbe.c sqlite/vdbeapi.c sqlite/vdbeaux.c \
171 sqlite/vdbemem.c sqlite/where.c \
172sqlite/prepare.c sqlite/callback.c \
173sqlite/analyze.c sqlite/vdbefifo.c \
174sqlite/complete.c \
175\
176 sqlite/btree.h sqlite/config.h sqlite/hash.h sqlite/opcodes.h sqlite/os.h \
177 sqlite/os_common.h sqlite/os_unix.h sqlite/os_win.h \
178 sqlite/parse.h sqlite/sqlite3.h sqlite/sqliteInt.h sqlite/vdbe.h sqlite/vdbeInt.h \
179sqlite/pager.h
180
181LUA_SOURCES = \
182lua/lapi.c lua/lapi.h lua/lauxlib.c lua/lauxlib.h lua/lbaselib.c \
183lua/lcode.c lua/lcode.h lua/ldblib.c lua/ldebug.c lua/ldebug.h lua/ldo.c \
184lua/ldo.h lua/ldump.c lua/lfunc.c lua/lfunc.h lua/lgc.c lua/lgc.h \
185lua/liolib.c lua/llex.c lua/llex.h lua/llimits.h lua/lmathlib.c lua/lmem.c \
186lua/lmem.h lua/loadlib.c lua/lobject.c lua/lobject.h lua/lopcodes.c \
187lua/lopcodes.h lua/lparser.c lua/lparser.h lua/lstate.c lua/lstate.h \
188lua/lstring.c lua/lstring.h lua/lstrlib.c lua/ltable.c lua/ltable.h \
189lua/ltablib.c lua/ltests.c lua/ltm.c lua/ltm.h lua/lua.h lua/lualib.h \
190lua/lundump.c lua/lundump.h lua/lvm.c lua/lvm.h lua/lzio.c lua/lzio.h
191
192IDNA_SOURCES = \
193idna/gunibreak.h idna/gunidecomp.h idna/idna.h idna/nfkc.c\
194idna/punycode.c idna/rfc3454.c idna/stringprep.h idna/version.c \
195idna/gunicomp.h idna/idna.c idna/idn-int.h idna/profiles.c\
196idna/punycode.h idna/stringprep.c idna/toutf8.c
197
198POPT_SOURCES = \
199popt/findme.c popt/poptconfig.c popt/poptint.h \
200popt/findme.h popt/popt.h popt/poptparse.c \
201popt/popt.c popt/popthelp.c popt/system.h
202
203UNIX_PLATFORM_SOURCES = \
204unix/read_password.cc unix/get_system_flavour.cc unix/process.cc unix/terminal.cc \
205unix/platform_netsync.cc unix/inodeprint.cc unix/fs.cc
206
207WIN32_PLATFORM_SOURCES = \
208win32/read_password.cc win32/get_system_flavour.cc win32/process.cc win32/terminal.cc \
209win32/platform_netsync.cc win32/inodeprint.cc win32/fs.cc
210
211# primaries
212
213bin_PROGRAMS = monotone
214check_PROGRAMS = unit_tests
215noinst_PROGRAMS = txt2c
216
217monotone_SOURCES = $(MOST_SOURCES) monotone.cc main.cc
218unit_tests_SOURCES = $(MOST_SOURCES) unit_tests.cc crypto_tests.cc
219
220txt2c_SOURCES = txt2c.cc
221
222noinst_LIBRARIES = libplatform.a lib3rdparty.a
223libplatform_a_SOURCES = platform.hh
224lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \
225$(BOTAN_SOURCES) \
226$(IDNA_SOURCES) \
227$(POPT_SOURCES) \
228$(NETXX_SOURCES) \
229$(LUA_SOURCES) \
230$(SQLITE_SOURCES)
231# We want to be able to throw exceptions through the Lua interpreter
232lib3rdparty_a_CFLAGS = $(AM_CFLAGS)
233
234# flags
235
236AM_CPPFLAGS =
237AM_CFLAGS = $(AM_CPPFLAGS) -DTEMP_STORE=1 -DNDEBUG -DBOOST_DISABLE_THREADS -DSQLITE_OMIT_CURSOR $(SQLITE_CPPFLAGS)
238AM_CXXFLAGS = $(AM_CPPFLAGS) -DNDEBUG -DBOOST_DISABLE_THREADS
239AM_LDFLAGS =
240
241lib3rdparty_a_CPPFLAGS =
242
243monotone_LDFLAGS =
244monotone_CPPFLAGS = -I$(top_srcdir)/lua -I$(top_srcdir)/sqlite
245
246unit_tests_LDFLAGS =
247unit_tests_CPPFLAGS = -DBUILD_UNIT_TESTS -I$(top_srcdir)/lua -I$(top_srcdir)/sqlite
248
249# conditionals from configury
250
251if STATIC_BOOST
252 BOOSTLIBS = @BOOST_LIBDIR@/libboost_filesystem$(BOOST_SUFFIX).a \
253 @BOOST_LIBDIR@/libboost_date_time$(BOOST_SUFFIX).a \
254 @BOOST_LIBDIR@/libboost_regex$(BOOST_SUFFIX).a
255 monotone_LDADD = lib3rdparty.a $(BOOSTLIBS)
256 unit_tests_LDADD = lib3rdparty.a $(BOOSTLIBS) \
257 @BOOST_LIBDIR@/libboost_unit_test_framework$(BOOST_SUFFIX).a
258else
259 monotone_LDADD = lib3rdparty.a
260 unit_tests_LDADD = lib3rdparty.a -lboost_unit_test_framework$(BOOST_SUFFIX)
261endif
262
263monotone_LDADD += libplatform.a $(LIBICONV) $(LIBINTL)
264unit_tests_LDADD += libplatform.a $(LIBICONV) $(LIBINTL)
265
266if WIN32_PLATFORM
267 libplatform_a_SOURCES += $(WIN32_PLATFORM_SOURCES)
268 monotone_LDADD += -lws2_32 -lintl -liconv -liphlpapi
269 unit_tests_LDADD += -lws2_32 -lintl -liconv -liphlpapi
270 lib3rdparty_a_CPPFLAGS += -DWIN32 -DBOTAN_EXT_ENTROPY_SRC_CAPI -DBOTAN_EXT_ENTROPY_SRC_WIN32
271 lib3rdparty_a_SOURCES += botan/es_capi.cpp botan/es_win32.cpp
272else
273 libplatform_a_SOURCES += $(UNIX_PLATFORM_SOURCES)
274endif
275
276if MISSING_INET_PTON
277 lib3rdparty_a_SOURCES += netxx/inet_pton.cxx netxx/inet_pton.h
278 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_PTON
279endif
280
281if MISSING_INET_NTOP
282 lib3rdparty_a_SOURCES += netxx/inet_ntop.cxx netxx/inet_ntop.h
283 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_NTOP
284endif
285
286if MISSING_GETADDRINFO
287 lib3rdparty_a_SOURCES += netxx/resolve_gethostbyname.cxx netxx/resolve_getservbyname.cxx
288else
289 lib3rdparty_a_SOURCES += netxx/resolve_getaddrinfo.cxx
290endif
291
292if MISSING_INET6
293 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_INET6
294endif
295
296# i18n support
297
298SUBDIRS = po
299datadir = @datadir@
300localedir = $(datadir)/locale
301DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
302
303# extra files
304
305PDF_FIGURES= figures/branch-heads.pdf figures/cert.pdf\
306figures/difference-between-versions.pdf\
307figures/file-id-manifest-id.pdf figures/fork.pdf\
308figures/general-workflow.pdf figures/linear-history.pdf\
309figures/local-workflow.pdf figures/manifest.pdf figures/merge.pdf\
310figures/network-workflow.pdf figures/parent-child-hashes.pdf\
311figures/parent-child-names-hashes.pdf figures/parent-child.pdf\
312figures/revision-chaining.pdf figures/revision.pdf\
313figures/statement.pdf figures/three-versions.pdf\
314figures/two-branches.pdf
315
316PNG_FIGURES=$(addprefix $(top_builddir)/figures/,$(notdir $(PDF_FIGURES:.pdf=.png)))
317EPS_FIGURES=$(addprefix $(top_builddir)/figures/,$(notdir $(PDF_FIGURES:.pdf=.eps)))
318
319man1_MANS = monotone.1
320info_TEXINFOS = monotone.texi
321EXTRA_DIST = $(man1_MANS) \
322 $(PDF_FIGURES) \
323 $(PNG_FIGURES) \
324 INSTALL \
325 README.changesets \
326 UPGRADE \
327 monotone.spec \
328 monotone.html \
329 texinfo.css \
330 schema.sql views.sql \
331 std_hooks.lua test_hooks.lua \
332 testsuite.at \
333 $(wildcard $(srcdir)/tests/t_*.at) \
334 testsuite \
335 tests/atconfig.in \
336 tests/atlocal.in \
337 package.m4 \
338 package_revision.txt package_full_revision_dist.txt \
339 $(wildcard $(srcdir)/m4/*.m4) \
340 popt/README popt/CHANGES popt/COPYING popt/popt.3 popt/popt.ps \
341 $(wildcard $(srcdir)/popt/test?.c) popt/testit.sh \
342 sqlite/keywordhash.h \
343 contrib/README \
344 contrib/monoprof.sh \
345 contrib/monotone-notify.pl \
346 contrib/monotone-import.pl \
347 contrib/ciabot_monotone.py \
348 contrib/monotone.el \
349 contrib/monotone-nav.el \
350 contrib/monotone.bash_completion \
351 contrib/monotone.zsh_completion \
352 contrib/mtbrowse.sh \
353 contrib/colorize \
354 contrib/color-logs.sh \
355 contrib/color-logs.conf \
356 contrib/get_stdio.pl \
357 contrib/ciabot_monotone_hookversion.py \
358 contrib/monotone-cvs-ignore.lua \
359 contrib/usher.cc \
360 win32/monotone.iss \
361 $(wildcard $(srcdir)/debian/*)
362
363MAKEINFOFLAGS=-I $(top_builddir)
364
365monotone.info: monotone.texi version.texi std_hooks.lua
366
367monotone.pdf: monotone.texi version.texi std_hooks.lua $(PDF_FIGURES)
368
369monotone.dvi: monotone.texi version.texi std_hooks.lua $(EPS_FIGURES)
370
371#%.eps: %.epsi
372#mv -f $< $@
373#
374#%.epsi: %.ps
375#ps2epsi $< $@
376
377%.eps : %.ps
378ps2eps <$< >$@
379
380$(top_builddir)/figures/%.ps: $(srcdir)/figures/%.pdf
381mkdir -p $(top_builddir)/figures
382#acroread -toPostScript -pairs $< $@
383pdftops $< $@
384
385
386# testsuite stuff (could this possibly be more ugly?)
387
388TESTS = unit_tests $(srcdir)/testsuite
389
390TESTS_ENVIRONMENT=AUTOTEST_PATH="."
391
392mostlyclean-local:
393rm -rf testsuite.dir testsuite.log package_full_revision_dist.txt
394
395DISTCLEANFILES = tests/atconfig mt-stdint.h
396
397# distcheck stuff
398
399DISTCHECK_CONFIGURE_FLAGS = \
400 --with-bundled-sqlite \
401 --with-bundled-lua \
402 --enable-static-boost
403
404# note: these targets are all in srcdir; they are *not* built during
405# the VPATH build part of distcheck (with non-writable source
406# directory) but only during the initial dist stage.
407
408$(srcdir)/package.m4: $(top_srcdir)/configure.ac
409{ \
410 echo '# Signature of the current package.'; \
411 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
412 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
413 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
414 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
415 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
416} >$(srcdir)/package.m4
417
418$(srcdir)/testsuite: $(srcdir)/testsuite.at $(wildcard $(srcdir)/tests/t_*.at) \
419 $(srcdir)/package.m4
420autom4te --language=Autotest -I $(srcdir) $< -o $@.tmp
421mv -f $@.tmp $@
422
423# we generate some headers to copy data into the executable
424
425BUILT_SOURCES_CLEAN = std_hooks.h test_hooks.h schema.h views.h \
426 package_revision.txt package_revision.c \
427 package_full_revision.txt package_full_revision.c
428BUILT_SOURCES_NOCLEAN = package_revision.txt package_full_revision_dist.txt
429BUILT_SOURCES = $(BUILT_SOURCES_CLEAN) $(BUILT_SOURCES_NOCLEAN)
430CLEANFILES = $(BUILT_SOURCES_CLEAN) $(EPS_FIGURES)
431
432txt2c: txt2c.cc Makefile
433$(CXX) $(CXXFLAGS) -o $@ $<
434chmod 0755 $@$(EXEEXT)
435
436apidocs:
437doxygen doxygen.cfg
438
439%.h: %.sql txt2c Makefile
440./txt2c $< $(*F) >$@.tmp
441cmp -s $@.tmp $@ || mv -f $@.tmp $@
442rm -f $@.tmp
443
444%.h: %.lua txt2c Makefile
445./txt2c $< $(*F) >$@.tmp
446cmp -s $@.tmp $@ || mv -f $@.tmp $@
447rm -f $@.tmp
448
449# A fake target so we can use MT/revision as a prerequisite, yet not
450# crash if MT/revision does not exist.
451$(srcdir)/MT/revision:
452true
453package_revision.txt: $(srcdir)/MT/revision
454if [ -f $< ]; then cp $< $@; fi
455if [ ! -f $@ ]; then echo "unknown" > $@; fi
456package_revision.c: package_revision.txt txt2c Makefile
457./txt2c --strip-trailing --no-static $< package_revision >$@.tmp
458cmp -s $@.tmp $@ || mv -f $@.tmp $@
459rm -f $@.tmp
460
461.PHONY: package_full_revision.txt apidocs
462package_full_revision.txt:
463REAL_BLDDIR=$$PWD/$(top_builddir); \
464(cd $(srcdir) && $$REAL_BLDDIR/monotone status) 2>/dev/null >$@ \
465|| (cd $(srcdir) && monotone status) 2>/dev/null >$@ \
466|| (cp $(srcdir)/package_full_revision_dist.txt 2>/dev/null $@) \
467|| (echo "unknown" >$@)
468package_full_revision_dist.txt: package_full_revision.txt
469cp $< $@
470(echo ''; \
471 echo ' Generated from data cached in the distribution;'; \
472 echo ' further changes may have been made.') >> $@
473package_full_revision.c: package_full_revision.txt txt2c Makefile
474./txt2c --no-static $< package_full_revision >$@.tmp
475cmp -s $@.tmp $@ || mv -f $@.tmp $@
476rm -f $@.tmp
477
478# automake doesn't build html docs
479
480monotone.html: monotone.texi version.texi std_hooks.lua texinfo.css
481makeinfo --no-split --no-headers --output $@ --html $<
482perl -i.perlbak -pe 's@<head>@<head>\n<link type="text/css" rel="stylesheet" href="texinfo.css" />@' $@
483rm -f monotone.html.perlbak
484
485# The .perlbak thing is needed, otherwise the perl executions fails on MinGW
486
487html: monotone.texi version.texi std_hooks.lua texinfo.css
488mkdir -p html
489makeinfo --number-sections --html --output html $<
490perl -i.perlbak -pe 's@<head>@<head>\n<link type="text/css" rel="stylesheet" href="texinfo.css" />@' html/*.html
491rm -f html/*.perlbak
492cp texinfo.css html

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status