monotone

monotone Mtn Source Tree

Root/Makefile.am

1AUTOMAKE_OPTIONS=subdir-objects 1.7.1
2ACLOCAL_AMFLAGS = -I m4
3
4CMD_SOURCES =\
5cmd.hh cmd_netsync.cc cmd_list.cc cmd_packet.cccmd_key_cert.cc \
6cmd_merging.cc cmd_db.cc cmd_diff_log.cc cmd_ws_commit.cc \
7cmd_othervcs.cc cmd_automate.cc cmd_files.cc
8
9SANITY_CORE_SOURCES =\
10sanity.cc sanity.hh quick_alloc.hh base.hh\
11simplestring_xform.cc simplestring_xform.hh \
12constants.cc constants.hh numeric_vocab.hh \
13platform.hh numeric_vocab.cc
14
15
16LUAEXT_SOURCES = \
17vocab.hh vocab.cc vocab_terms.hh vocab_macros.hh vocab_cast.hh \
18charset.cc charset.hh paths.cc paths.hh\
19interner.hh hash_map.hhvocab_hash.hh\
20luaext_mkstemp.cc luaext_parse_basic_io.cc\
21luaext_guess_binary.cc luaext_platform.cc luaext_globish.cc\
22lua.cc lua.hh mkstemp.cc mkstemp.hh file_io.cc file_io.hh\
23globish.cc globish.hh basic_io.cc basic_io.hh
24
25MOST_SOURCES = \
26$(SANITY_CORE_SOURCES) $(LUAEXT_SOURCES) platform-wrapped.hh\
27mtn-sanity.cc mtn-sanity.hh ui.cc ui.hh\
28app_state.cc app_state.hh\
29commands.cc commands.hh $(CMD_SOURCES)\
30diff_patch.cc diff_patch.hh\
31lua_hooks.cc lua_hooks.hh \
32transforms.cc transforms.hh\
33update.cc update.hh\
34work.cc work_migration.cc work.hh\
35cert.cc cert.hh\
36project.cc project.hh\
37outdated_indicator.cc outdated_indicator.hh\
38database.cc database.hh\
39key_store.cc key_store.hh\
40ssh_agent.cc ssh_agent.hh\
41keys.cc keys.hh\
42packet.cc packet.hh\
43rcs_file.cc rcs_file.hh\
44xdelta.cc xdelta.hh\
45schema_migration.cc schema_migration.hh\
46refiner.cc refiner.hh\
47enumerator.cc enumerator.hh\
48netsync.cc \
49netxx_pipe.cc netxx_pipe.hh\
50netcmd.cc netcmd.hh\
51merkle_tree.cc merkle_tree.hh \
52lcs.cc lcs.hh\
53rcs_import.cc rcs_import.hh \
54revision.cc revision.hh\
55cset.cc cset.hh\
56roster.cc roster.hh \
57mt_version.cc mt_version.hh\
58automate.cc\
59database_check.cc database_check.hh\
60epoch.cc epoch.hh\
61inodeprint.cc inodeprint.hh\
62selectors.cc selectors.hh\
63annotate.cc annotate.hh\
64restrictions.ccrestrictions.hh\
65hmac.cc hmac.hh\
66string_queue.cc string_queue.hh\
67roster_merge.cc roster_merge.hh\
68merge.cc merge.hh\
69legacy.cc legacy.hh uri.cc uri.hh\
70graph.cc graph.hh\
71roster_delta.cc roster_delta.hh\
72sha1.hh sha1.cc sha1_engine.hh \
73rev_height.cc rev_height.hh\
74asciik.cc asciik.hh\
75dates.cc dates.hh\
76\
77lru_writeback_cache.hh hybrid_map.hh\
78\
79cleanup.hh unit_tests.hh\
80cycle_detector.hh randomfile.hh adler32.hh\
81randomizer.cc randomizer.hh\
82netio.hh smap.hh gettext.h\
83package_revision.c package_revision.h\
84package_full_revision.c package_full_revision.h\
85option.cc option.hh options.cc options.hh options_list.hh\
86specialized_lexical_cast.cc lexical_cast.hh\
87i18n.h parallel_iter.hh safe_map.hh pch.hh current_exception.hh
88
89NETXX_SOURCES =\
90netxx/accept.cxx netxx/accept.h netxx/address.cxx\
91netxx/common.h netxx/compat.h netxx/datagram.cxx\
92netxx/datagramserver.cxx netxx/osutil.cxx netxx/osutil.h\
93netxx/peer.cxx netxx/probe.cxx netxx/probe_impl.h\
94netxx/probe_select.cxx netxx/recvfrom.cxx netxx/recvfrom.h\
95netxx/resolve.h netxx/serverbase.cxx netxx/serverbase.h\
96netxx/sockaddr.cxx netxx/sockaddr.h netxx/socket.cxx \
97netxx/socket.h netxx/sockopt.cxx netxx/stream.cxx\
98netxx/streambase.cxx netxx/streamserver.cxx\
99netxx/address.h netxx/datagram.h netxx/datagramserver.h\
100netxx/netbuf.h netxx/netxx.h netxx/peer.h netxx/probe.h \
101netxx/probeinfo.h netxx/sockopt.h netxx/stream.h\
102netxx/streambase.h netxx/streamserver.h netxx/timeout.h\
103netxx/types.h
104
105BOTAN_SOURCES = \
106botan/aes.cpp botan/aes_tab.cpp \
107botan/arc4.cpp botan/alg_id.cpp \
108botan/asn1_alt.cpp botan/asn1_att.cpp botan/asn1_dn.cpp \
109botan/asn1_ku.cpp botan/asn1_oid.cpp \
110botan/asn1_str.cpp botan/asn1_tm.cpp \
111botan/base.cpp botan/base64.cpp botan/basefilt.cpp \
112botan/ber_dec.cpp botan/big_base.cpp \
113botan/big_code.cpp botan/big_io.cpp botan/big_ops2.cpp \
114botan/big_ops3.cpp botan/blinding.cpp botan/buf_es.cpp \
115botan/buf_filt.cpp botan/cbc.cpp botan/certstor.cpp \
116botan/cfb.cpp botan/charset.cpp botan/crc32.cpp \
117botan/crl_ent.cpp botan/ctr.cpp botan/cts.cpp \
118botan/data_snk.cpp botan/data_src.cpp \
119botan/def_ops.cpp botan/defalloc.cpp \
120botan/der_enc.cpp botan/divide.cpp botan/dl_algo.cpp \
121botan/dl_group.cpp \
122botan/dlies.cpp botan/eax.cpp botan/ecb.cpp botan/eme1.cpp \
123botan/eme_pkcs.cpp botan/emsa1.cpp botan/emsa2.cpp \
124botan/emsa3.cpp botan/emsa4.cpp botan/emsa_raw.cpp \
125botan/eng_base.cpp botan/engine.cpp botan/es_file.cpp \
126botan/exceptn.cpp botan/filter.cpp botan/filters.cpp \
127botan/fips140.cpp \
128botan/get_algo.cpp botan/get_enc.cpp botan/get_pbe.cpp \
129botan/gzip.cpp botan/hash_id.cpp botan/hex.cpp botan/hmac.cpp \
130botan/if_algo.cpp botan/inifile.cpp botan/init_def.cpp \
131botan/kdf.cpp botan/keypair.cpp botan/look_pk.cpp \
132botan/make_prm.cpp botan/mdx_hash.cpp \
133botan/mem_pool.cpp botan/mgf1.cpp botan/mlock.cpp \
134botan/mode_pad.cpp botan/modebase.cpp \
135botan/mp_comba.cpp botan/mp_mulop.cpp \
136botan/mp_misc.cpp botan/mp_mul.cpp botan/mp_shift.cpp \
137botan/mutex.cpp botan/numthry.cpp \
138botan/ofb.cpp botan/oids.cpp botan/parsing.cpp botan/pbes1.cpp \
139botan/pbes2.cpp botan/pem.cpp botan/pipe.cpp botan/pipe_io.cpp \
140botan/pipe_rw.cpp botan/pk_algs.cpp botan/pk_core.cpp \
141botan/pk_filts.cpp botan/pk_keys.cpp botan/pk_util.cpp \
142botan/pkcs10.cpp botan/pkcs8.cpp botan/policy.cpp \
143botan/pow_mod.cpp \
144botan/prf_x942.cpp botan/primes.cpp botan/pubkey.cpp \
145botan/randpool.cpp botan/reducer.cpp botan/rng.cpp \
146botan/rsa.cpp botan/s2k.cpp botan/secqueue.cpp \
147botan/sha160.cpp botan/symkey.cpp botan/timers.cpp \
148botan/ui.cpp botan/util.cpp botan/x509_ca.cpp \
149botan/x509_crl.cpp botan/x509_key.cpp botan/x509_obj.cpp \
150botan/x509cert.cpp botan/x509find.cpp botan/x509opt.cpp \
151botan/des.cpp botan/des_tab.cpp botan/pkcs5.cpp \
152botan/x509self.cpp botan/x509stor.cpp \
153botan/def_alg.cpp botan/def_mode.cpp botan/sha256.cpp \
154botan/x931_rng.cpp botan/out_buf.cpp botan/bit_ops.cpp \
155botan/big_rand.cpp botan/def_powm.cpp botan/libstate.cpp \
156botan/modules.cpp botan/mp_numth.cpp \
157botan/mp_sqr.cpp botan/powm_fw.cpp \
158botan/powm_mnt.cpp botan/mp_asm.cpp \
159botan/asn1_int.cpp botan/config.cpp botan/datastor.cpp \
160botan/def_char.cpp botan/init_opt.cpp botan/jacobi.cpp \
161botan/x509_ext.cpp botan/x509stat.cpp \
162\
163botan/aes.h botan/botan.h botan/es_win32.h \
164botan/lookup.h botan/randpool.h botan/version.h \
165botan/buf_es.h botan/der_enc.h \
166botan/exceptn.h botan/mdx_hash.h \
167botan/reducer.h botan/x509_ca.h botan/allocate.h \
168botan/buf_filt.h botan/dh.h botan/filter.h botan/mem_ops.h \
169botan/pbe.h botan/rng.h botan/x509cert.h botan/arc4.h \
170botan/cbc.h botan/dl_algo.h botan/filters.h botan/mem_pool.h \
171botan/pbe_pkcs.h botan/rsa.h botan/x509_crl.h \
172botan/certstor.h botan/dlies.h botan/fips140.h botan/mgf1.h \
173botan/pem.h botan/s2k.h botan/x509_key.h botan/asn1_obj.h \
174botan/cfb.h botan/modebase.h \
175botan/pipe.h botan/x509_obj.h \
176botan/asn1_oid.h botan/eax.h botan/gzip.h \
177botan/mode_pad.h botan/pk_algs.h botan/secmem.h \
178botan/x509find.h botan/x509self.h botan/config.h botan/ecb.h \
179botan/hex.h botan/pk_core.h botan/secqueue.h \
180botan/x509stor.h botan/base64.h botan/crc32.h botan/eme.h \
181botan/hmac.h botan/mp_core.h botan/pkcs10.h botan/sha160.h \
182botan/crl_ent.h botan/emsa.h botan/eng_def.h \
183botan/if_algo.h botan/pkcs8.h \
184botan/basefilt.h botan/ctr.h botan/engine.h \
185botan/init.h botan/mp_types.h botan/pk_filts.h botan/symkey.h \
186botan/base.h botan/cts.h botan/enums.h botan/kdf.h \
187botan/mutex.h botan/pk_keys.h botan/timers.h botan/ber_dec.h \
188botan/data_snk.h botan/es_capi.h botan/keypair.h \
189botan/numthry.h botan/pk_ops.h botan/types.h botan/bigint.h \
190botan/data_src.h botan/es_egd.h botan/look_add.h botan/ofb.h \
191botan/pk_util.h botan/ui.h botan/blinding.h botan/defalloc.h \
192botan/es_file.h botan/look_pk.h botan/oids.h botan/pubkey.h \
193botan/util.h botan/charset.h botan/hash_id.h \
194botan/des.h botan/pkcs5.h \
195botan/x931_rng.h botan/sha256.h \
196botan/parsing.h botan/out_buf.h botan/bit_ops.h \
197botan/def_powm.h botan/dl_group.h botan/libstate.h \
198botan/modules.h botan/mp_asm.h botan/pow_mod.h botan/mp_asmi.h \
199botan/build.h botan/asn1_int.h botan/datastor.h botan/def_char.h \
200botan/stl_util.h botan/x509_ext.h botan/x509stat.h \
201botan/alg_id.h
202
203BOOST_SANDBOX_SOURCES =\
204boost/circular_buffer_adaptor.hpp\
205boost/circular_buffer_base.hpp\
206boost/circular_buffer_fwd.hpp\
207boost/circular_buffer.hpp
208
209SQLITE_SOURCES =\
210sqlite/alter.c sqlite/attach.c sqlite/auth.c sqlite/btree.c\
211sqlite/build.c sqlite/date.c sqlite/delete.c sqlite/expr.c\
212sqlite/func.c sqlite/hash.c sqlite/insert.c\
213sqlite/legacy.csqlite/main.c sqlite/opcodes.c\
214sqlite/os.c sqlite/os_unix.c sqlite/os_win.c sqlite/os_os2.c\
215sqlite/pager.c sqlite/parse.c sqlite/pragma.c sqlite/printf.c\
216sqlite/random.c sqlite/select.c\
217sqlite/table.c sqlite/tokenize.c\
218sqlite/trigger.c sqlite/update.c sqlite/utf.c\
219sqlite/util.c sqlite/vacuum.c\
220sqlite/vdbe.c sqlite/vdbeapi.c sqlite/vdbeaux.c\
221sqlite/vdbemem.c sqlite/where.c\
222sqlite/prepare.c sqlite/callback.c\
223sqlite/analyze.c sqlite/vdbefifo.c\
224sqlite/complete.c sqlite/malloc.c sqlite/vdbeblob.c\
225sqlite/loadext.c sqlite/vtab.c\
226\
227sqlite/btree.h sqlite/hash.h sqlite/opcodes.h sqlite/os.h\
228sqlite/os_common.h sqlite/os_os2.h\
229sqlite/parse.h sqlite/sqlite3.hsqlite/sqlite3ext.h\
230sqlite/sqliteInt.h\
231sqlite/vdbe.h sqlite/vdbeInt.h\
232sqlite/pager.h sqlite/btreeInt.h sqlite/limits.h
233
234LUA_SOURCES =\
235lua/lapi.cc lua/lapi.h\
236lua/lcode.cc lua/lcode.h\
237lua/ldebug.cc lua/ldebug.h\
238lua/ldo.cc lua/ldo.h\
239lua/ldump.cc\
240lua/lfunc.cc lua/lfunc.h\
241lua/lgc.cc lua/lgc.h\
242lua/linit.cc\
243lua/llex.cc lua/llex.h\
244lua/lmem.cc lua/lmem.h\
245lua/lobject.cc lua/lobject.h\
246lua/lopcodes.cc lua/lopcodes.h\
247lua/lparser.cc lua/lparser.h\
248lua/lstate.cc lua/lstate.h\
249lua/lstring.cc lua/lstring.h\
250lua/ltable.cc lua/ltable.h\
251lua/ltests.cc\
252lua/ltm.cc lua/ltm.h\
253lua/lundump.cc lua/lundump.h\
254lua/lvm.cc lua/lvm.h\
255lua/lzio.cc lua/lzio.h\
256\
257lua/luaconf.h lua/llimits.h\
258lua/lua.h lua/lauxlib.hlua/lualib.h\
259\
260lua/lauxlib.cc\
261lua/lbaselib.cc\
262lua/ldblib.cc\
263lua/liolib.cc\
264lua/lmathlib.cc\
265lua/loadlib.cc\
266lua/lstrlib.cc\
267lua/ltablib.cc\
268lua/loslib.cc
269
270IDNA_SOURCES =\
271idna/gunibreak.h idna/gunidecomp.h idna/idna.h idna/nfkc.c\
272idna/punycode.c idna/rfc3454.c idna/stringprep.h idna/version.c\
273idna/gunicomp.h idna/idna.c idna/idn-int.h idna/profiles.c\
274idna/punycode.h idna/stringprep.c idna/toutf8.c
275
276UNIX_PLATFORM_SOURCES =\
277unix/read_password.cc unix/get_system_flavour.cc\
278unix/process.cc unix/terminal.cc unix/inodeprint.cc\
279unix/fs.cc unix/make_io_binary.cc unix/os_strerror.cc \
280unix/cputime.cc unix/ssh_agent_platform.cc\
281unix/ssh_agent_platform.hh
282
283WIN32_PLATFORM_SOURCES =\
284win32/read_password.cc win32/get_system_flavour.cc\
285win32/process.cc win32/terminal.cc win32/inodeprint.cc\
286win32/fs.cc win32/make_io_binary.cc win32/os_strerror.cc \
287win32/cputime.cc win32/ssh_agent_platform.cc \
288win32/ssh_agent_platform.hh
289
290# primaries
291
292bin_PROGRAMS = mtn
293noinst_PROGRAMS = txt2c
294EXTRA_PROGRAMS = usher
295
296mtn_SOURCES = $(MOST_SOURCES) monotone.cc
297nodist_mtn_SOURCES = std_hooks.c schema.c
298usher_SOURCES = contrib/usher.cc
299unit_tests_SOURCES = $(MOST_SOURCES) unit_tests.cc crypto_tests.cc
300nodist_unit_tests_SOURCES = std_hooks.c test_hooks.c schema.c
301tester_SOURCES = $(SANITY_CORE_SOURCES) $(LUAEXT_SOURCES) tester.cc
302nodist_tester_SOURCES = testlib.c
303
304txt2c_SOURCES = txt2c.cc
305
306noinst_LIBRARIES = libplatform.a lib3rdparty.a
307libplatform_a_SOURCES = platform.hh
308lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \
309$(BOTAN_SOURCES) \
310$(IDNA_SOURCES) \
311$(NETXX_SOURCES) \
312$(LUA_SOURCES) \
313$(SQLITE_SOURCES)
314
315htmldir = $(datadir)/doc/monotone
316html_DATA = monotone.html
317
318# flags
319
320if BUILD_PCH
321
322PCH_SOURCE = $(srcdir)/pch.hh
323# the .gch file only will be seen if it's in the same dir as the .hh file,
324# so need to copy it for separate build directories
325PCH_BUILD = pch-build.hh
326PCH_FLAGS = -Winvalid-pch -include $(PCH_BUILD)
327PCH_FILE = $(PCH_BUILD).gch
328sinclude $(PCH_FILE).dep
329
330*.o *.lo *.obj: $(PCH_FILE)
331
332$(PCH_BUILD): $(PCH_SOURCE)
333cp $(PCH_SOURCE) $(PCH_BUILD)
334
335$(PCH_FILE): $(PCH_BUILD)
336$(MAKE) PCH_FLAGS= pch-file
337
338pch-file:
339$(CXXCOMPILE) -x c++-header $(PCH_BUILD) -o $(PCH_FILE) \
340-MT $(PCH_FILE) -MD -MP -MF "./$(PCH_FILE).Tdep" \
341&& mv "./$(PCH_FILE).Tdep" "./$(PCH_FILE).dep" \
342|| rm "./$(PCH_FILE).Tdep"
343endif
344
345SUFFIXES = .gch
346
347AM_CPPFLAGS =
348AM_CFLAGS = $(AM_CPPFLAGS) -DTEMP_STORE=1 -DNDEBUG -DSQLITE_OMIT_CURSOR -DSQLITE_OMIT_LOAD_EXTENSION -DTHREADSAFE=0 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 $(SQLITE_CPPFLAGS)
349AM_CXXFLAGS = $(AM_CPPFLAGS)
350AM_LDFLAGS =
351
352lib3rdparty_a_CPPFLAGS =
353lib3rdparty_a_CFLAGS = $(AM_CFLAGS) $(LIB3RDPARTY_CFLAGS)
354lib3rdparty_a_CXXFLAGS = $(AM_CXXFLAGS) $(LIB3RDPARTY_CXXFLAGS)
355
356mtn_LDFLAGS =
357mtn_CPPFLAGS = -I$(top_srcdir)/lua
358mtn_CFLAGS = $(AM_CFLAGS) $(MTN_CFLAGS)
359mtn_CXXFLAGS = $(AM_CXXFLAGS) $(PCH_FLAGS) $(MTN_CXXFLAGS)
360mtn_LDADD = lib3rdparty.a $(BOOSTLIBS) libplatform.a $(LIBICONV) $(LIBINTL)
361
362unit_tests_LDFLAGS =
363unit_tests_CPPFLAGS = -DBUILD_UNIT_TESTS -I$(top_srcdir)/lua
364unit_tests_CXXFLAGS = $(AM_CXXFLAGS) $(PCH_FLAGS)
365unit_tests_LDADD = lib3rdparty.a $(BOOSTLIBS) \
366 libplatform.a $(LIBICONV) $(LIBINTL)
367
368tester_LDFLAGS =
369tester_CPPFLAGS = -I$(top_srcdir)/lua
370tester_CXXFLAGS = $(AM_CXXFLAGS)
371tester_LDADD = lib3rdparty.a $(BOOSTLIBS) libplatform.a $(LIBICONV) $(LIBINTL)
372
373if WIN32_PLATFORM
374 libplatform_a_SOURCES += $(WIN32_PLATFORM_SOURCES)
375 mtn_SOURCES += win32/main.cc
376 mtn_LDADD += -lshfolder -lws2_32 -lintl -liconv -liphlpapi
377 unit_tests_LDADD += -lshfolder -lws2_32 -lintl -liconv -liphlpapi
378 lib3rdparty_a_CPPFLAGS += -DWIN32 -DBOTAN_EXT_ENTROPY_SRC_CAPI -DBOTAN_EXT_ENTROPY_SRC_WIN32
379 lib3rdparty_a_SOURCES += botan/es_capi.cpp botan/es_win32.cpp
380else
381 libplatform_a_SOURCES += $(UNIX_PLATFORM_SOURCES)
382 mtn_SOURCES += unix/main.cc
383endif
384
385if MISSING_INET_PTON
386 lib3rdparty_a_SOURCES += netxx/inet_pton.cxx netxx/inet_pton.h
387 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_PTON
388endif
389
390if MISSING_INET_NTOP
391 lib3rdparty_a_SOURCES += netxx/inet_ntop.cxx netxx/inet_ntop.h
392 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_NTOP
393endif
394
395if MISSING_GETADDRINFO
396 lib3rdparty_a_SOURCES += netxx/resolve_gethostbyname.cxx netxx/resolve_getservbyname.cxx
397else
398 lib3rdparty_a_SOURCES += netxx/resolve_getaddrinfo.cxx
399endif
400
401if MISSING_INET6
402 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_INET6
403endif
404
405# i18n support
406
407SUBDIRS = po
408datadir = @datadir@
409localedir = $(datadir)/locale
410DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
411
412# extra files
413
414PDF_FIGURES= figures/branch-heads.pdf figures/cert.pdf\
415figures/difference-between-versions.pdf\
416figures/file-id-manifest-id.pdf figures/fork.pdf\
417figures/general-workflow.pdf figures/linear-history.pdf\
418figures/local-workflow.pdf figures/manifest.pdf figures/merge.pdf\
419figures/network-workflow.pdf figures/parent-child-hashes.pdf\
420figures/parent-child-names-hashes.pdf figures/parent-child.pdf\
421figures/revision-chaining.pdf figures/revision.pdf\
422figures/statement.pdf figures/three-versions.pdf\
423figures/two-branches.pdf
424
425PNG_FIGURES=$(addprefix $(top_builddir)/figures/,$(notdir $(PDF_FIGURES:.pdf=.png)))
426EPS_FIGURES=$(addprefix $(top_builddir)/figures/,$(notdir $(PDF_FIGURES:.pdf=.eps)))
427
428info_TEXINFOS = monotone.texi
429EXTRA_DIST = $(PDF_FIGURES) $(PNG_FIGURES) INSTALL\
430README.changesets UPGRADE monotone.spec monotone.html\
431texinfo.css schema.sql std_hooks.lua test_hooks.lua testlib.lua\
432testsuite.lua $(srcdir)/tests tester-testsuite.lua\
433$(srcdir)/tester-tests package.m4 package_revision.txt\
434package_full_revision_dist.txt $(wildcard $(srcdir)/m4/*.m4)\
435sqlite/keywordhash.h contrib/README contrib/monoprof.sh\
436contrib/monotone-notify.pl\
437contrib/ciabot_monotone.py contrib/monotone.el\
438contrib/monotone-nav.el contrib/monotone.bash_completion\
439contrib/monotone.zsh_completion contrib/mtbrowse.sh\
440contrib/colorize contrib/color-logs.sh contrib/color-logs.conf\
441contrib/get_stdio.pl contrib/ciabot_monotone_hookversion.py\
442$(wildcard $(srcdir)/contrib/*.lua) contrib/usher.cc $(wildcard\
443$(srcdir)/examples/*) win32/monotone.iss win32/modpath.iss\
444$(wildcard $(srcdir)/debian/*) audit-includes
445
446MAKEINFOFLAGS=-I $(top_builddir)
447
448monotone.info: monotone.texi version.texi std_hooks.lua
449
450monotone.pdf: monotone.texi version.texi std_hooks.lua $(PDF_FIGURES)
451
452monotone.dvi: monotone.texi version.texi std_hooks.lua $(EPS_FIGURES)
453
454#%.eps: %.epsi
455#mv -f $< $@
456#
457#%.epsi: %.ps
458#ps2epsi $< $@
459
460%.eps : %.ps
461ps2eps <$< >$@
462
463$(top_builddir)/figures/%.ps: $(srcdir)/figures/%.pdf
464mkdir -p $(top_builddir)/figures
465#acroread -toPostScript -pairs $< $@
466pdftops $< $@
467
468# build an OS X installer
469# requires sudo since packagemaker just looks at directory permissions.
470PKG_INST_ROOT = $(PWD)/$(top_builddir)/pkg_inst_root
471monotone-$(PACKAGE_VERSION).pkg: monotone.pdf html
472sudo rm -rf $(PKG_INST_ROOT)
473rm -rf "$@"
474$(MAKE) install-strip DESTDIR=$(PKG_INST_ROOT)
475mkdir -p $(PKG_INST_ROOT)/Developer/Documentation/monotone
476cp monotone.pdf $(PKG_INST_ROOT)/Developer/Documentation/monotone/
477cp -r html $(PKG_INST_ROOT)/Developer/Documentation/monotone/html
478plutil -convert xml1 -o monotone-xml.pmproj.in $(srcdir)/mac/monotone.pmproj
479sed "s/__MONOTONE_VERSION__/$(PACKAGE_VERSION)/g" \
480< monotone-xml.pmproj.in > monotone-xml.pmproj
481cp $(srcdir)/mac/monotone-pkg-logo.gif $(srcdir)/mac/package-intro.rtf \
482$(srcdir)/COPYING.txt .
483chmod -R o-w,g-w,a+rX $(PKG_INST_ROOT)
484sudo chown -R root:wheel $(PKG_INST_ROOT)/usr
485sudo chown -R root:admin $(PKG_INST_ROOT)/Developer
486/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \
487-build -proj monotone-xml.pmproj -p "$@"
488
489# build an OS X distribution disk image
490dmg: monotone-$(PACKAGE_VERSION).dmg
491
492monotone-$(PACKAGE_VERSION).dmg: monotone-$(PACKAGE_VERSION).pkg
493rm -rf $(top_builddir)/dmg_root "$@"
494mkdir $(top_builddir)/dmg_root
495cp -R $^ $(top_builddir)/dmg_root/
496chmod -R a+rX $(top_builddir)/dmg_root
497hdiutil create -srcfolder "$(top_builddir)/dmg_root" \
498"$@" -format UDZO -scrub -imagekey zlib-level=9 \
499-volname monotone-$(PACKAGE_VERSION)
500
501# testsuite stuff (could this possibly be more ugly?)
502
503
504check_PROGRAMS = unit_tests tester
505TESTS = unit_tests run_tester_tests run_lua_tests
506
507
508TESTS_ENVIRONMENT=AUTOTEST_PATH="."
509
510mostlyclean-local:
511rm -rf tester_dir package_full_revision.txt
512
513DISTCLEANFILES = mt-stdint.h xgettext.opts pch-build.hh.gch.dep run_tester_tests run_lua_tests unit_tests.log
514
515# distcheck stuff
516
517DISTCHECK_CONFIGURE_FLAGS = \
518--with-bundled-sqlite \
519--with-bundled-lua \
520--enable-static-boost
521
522# note: these targets are all in srcdir; they are *not* built during
523# the VPATH build part of distcheck (with non-writable source
524# directory) but only during the initial dist stage.
525
526$(srcdir)/package.m4: $(top_srcdir)/configure.ac
527{ \
528 echo '# Signature of the current package.'; \
529 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
530 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
531 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
532 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
533 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
534} >$(srcdir)/package.m4
535
536run_lua_tests: Makefile
537echo '#!/bin/sh' > $@ ; \
538echo 'PATH=$(top_builddir):$$PATH' >> $@ ; \
539echo 'exec $(top_builddir)/tester $(srcdir)/testsuite.lua "$$@"' >> $@ ; \
540chmod 755 $@
541
542run_tester_tests: Makefile
543echo '#!/bin/sh' > $@ ; \
544echo 'PATH=$(top_builddir):$$PATH' >> $@ ; \
545echo 'exec $(top_builddir)/tester $(srcdir)/tester-testsuite.lua "$$@"' >> $@ ; \
546chmod 755 $@
547
548# we generate some source files to copy data into the executable
549# note that the only things that should go in BUILT_SOURCES are things
550# that need to be generated early on 'make all'; this is _not_ true of
551# generated source files, but it is true for the PCH if used.
552
553CLEAN_SOURCES = std_hooks.c test_hooks.c testlib.c schema.c \
554package_revision.c package_full_revision.txt \
555package_full_revision_raw.txt package_full_revision.c
556
557BUILT_SOURCES = $(PCH_FILE) $(PCH_BUILD)
558
559CLEANFILES = $(BUILT_SOURCES) $(CLEAN_SOURCES) $(EPS_FIGURES)
560
561txt2c: txt2c.cc
562$(CXX) $(CXXFLAGS) -o $@ $<
563chmod 0755 $@$(EXEEXT)
564
565# FIXME: should use stamp files.
566%.c: %.sql txt2c
567./txt2c $(TXT2CFLAGS) --no-static $< $(*F) >$@.tmp
568cmp -s $@.tmp $@ || mv -f $@.tmp $@
569rm -f $@.tmp
570
571%.c: %.lua txt2c
572./txt2c $(TXT2CFLAGS) --no-static $< $(*F) >$@.tmp
573cmp -s $@.tmp $@ || mv -f $@.tmp $@
574rm -f $@.tmp
575
576%.c: %.txt txt2c
577./txt2c $(TXT2CFLAGS) --no-static $< $(*F) >$@.tmp
578cmp -s $@.tmp $@ || mv -f $@.tmp $@
579rm -f $@.tmp
580
581# This construct causes --strip-trailing to be applied only when
582# generating package_revision.c.
583TXT2CFLAGS =
584package_revision.c : TXT2CFLAGS = --strip-trailing
585
586# This is phony, so that we always try to rebuild it. If it succeeds
587# in calculating changes, it produces its target; otherwise, its
588# target does not exist.
589.PHONY: package_revision_raw.txt
590# if both attempts fail, then we need to remove the empty file that >
591# creates, and also make sure that the shell command exits
592# successfully; the rm -f ensures both
593package_revision_raw.txt:
594REAL_BLDDIR=$$PWD/$(top_builddir); \
595(cd $(srcdir) && $$REAL_BLDDIR/mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \
596|| (cd $(srcdir) && mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \
597|| rm -f $@
598package_revision.txt: package_revision_raw.txt
599if [ -f $< ]; then \
600 cp $< $@; \
601fi
602[ -f $@ ] || echo "unknown" > $@
603
604# To avoid a dependency loop here, what we do is:
605# calculate changes
606# |
607# package_full_revision_raw.txt
608# | \ <-- add "generated from cached data" text
609# | package_full_revision_dist.txt
610# | /
611# package_full_revision.txt
612
613# See above comment.
614.PHONY: package_full_revision_raw.txt
615package_full_revision_raw.txt:
616REAL_BLDDIR=$$PWD/$(top_builddir); \
617(cd $(srcdir) && $$REAL_BLDDIR/mtn --root=. automate get_revision) 2>/dev/null >$@ \
618|| (cd $(srcdir) && mtn --root=. automate get_revision) 2>/dev/null >$@ \
619|| rm -f $@
620# See above comment -- the file this depends on may or may not exist.
621# This file, however, must always exist, so that 'make dist' can
622# include it in the tarball it generates. So there are three cases:
623# -- if the raw file does not exist, then
624# -- if the dist file exists, then we leave it alone
625# -- if the dist file does not exist, then we say "unknown"
626# -- if the raw file does exist, then we regenerate the dist file
627package_full_revision_dist.txt: package_full_revision_raw.txt
628if [ -f $< ]; then \
629 cp -f $< $@ \
630 && (echo ''; \
631 echo ' Generated from data cached in the distribution;'; \
632 echo ' further changes may have been made.') >> $@; \
633fi
634[ -f $@ ] || echo "unknown" > $@
635# The raw file may not exist, but the dist file definitely does; we
636# just take the first dependency that exists.
637package_full_revision.txt: package_full_revision_raw.txt package_full_revision_dist.txt
638rm -f $@
639for SRC in $^; do ([ -f $$SRC -a ! -f $@ ] && cp -f $$SRC $@) || true; done
640
641# This is a magic directive copy-and-pasted, then modified, from the
642# automake 1.9 manual, section 13.4, "Checking the distribution".
643# Normally, 'distcheck' does a clean build, and then afterwards runs
644# 'distclean', and 'distclean' is supposed to remove everything that
645# the build created. However, we have some targets
646# (package_revision.txt, package_full_revision_dist.txt) that we
647# distribute, but then always attempt to rebuild optimistically, and
648# then if that fails fall back on the distributed versions. This
649# means that 'distclean' should _not_ remove those files, since they
650# are distributed, yet building the package will generate those files,
651# those automake thinks that 'distclean' _should_ remove those files,
652# and 'distcheck' gets cranky if we don't. So basically what this
653# line does is tell 'distcheck' to shut up and ignore those two files.
654distcleancheck_listfiles = find . -type f -a ! -name package_revision.txt -a ! -name package_full_revision_dist.txt
655
656# the distcheck-hook checks for errors in the use of base.hh
657distcheck-hook:
658cd $(srcdir) && $(SHELL) audit-includes \
659$(sort $(mtn_SOURCES) $(unit_tests_SOURCES) $(tester_SOURCES) \
660 $(UNIX_PLATFORM_SOURCES) $(WIN32_PLATFORM_SOURCES) \
661 win32/main.cc unix/main.cc)
662
663# automake doesn't build html docs
664
665CHECK_SRCDIR_EQ_BUILDDIR=[ "`cd \"$(srcdir)\"; pwd`" = "`pwd`" -a -f ./monotone.texi ]
666
667.PHONY: apidocs
668apidocs:
669doxygen doxygen.cfg
670
671monotone.html: monotone.texi version.texi std_hooks.lua texinfo.css
672if $(CHECK_SRCDIR_EQ_BUILDDIR); then :; else \
673cp -r $(srcdir)/figures .; \
674cp $(srcdir)/texinfo.css .; \
675fi
676makeinfo -I $(srcdir) --no-split --no-headers --output $@ --html $<
677cp $@ $@.bak
678sed -e 's,<head>,<head><link type="text/css" rel="stylesheet" href="texinfo.css" />,' $@.bak >$@
679rm -f $@.bak
680
681html: monotone.texi version.texi std_hooks.lua texinfo.css
682if $(CHECK_SRCDIR_EQ_BUILDDIR); then :; else \
683cp -r $(srcdir)/figures .; \
684fi
685mkdir -p $@
686cp -r $(srcdir)/figures $@
687cp $(srcdir)/texinfo.css $@
688makeinfo -I $(srcdir) --number-sections --html --output $@ $<
689for f in $@/*.html; do \
690cp $$f $$f.bak; \
691sed -e 's,<head>,<head><link type="text/css" rel="stylesheet" href="texinfo.css" />,' $$f.bak >$$f; \
692rm -f $$f.bak; \
693done

Archive Download this file

Branches

Tags

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