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

Archive Download this file

Branches

Tags

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