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

Archive Download this file

Branches

Tags

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