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 commands.cc diff_patch.cc lua.cc\
6 transforms.cc update.cc work.cc cert.cc database.cc file_io.cc\
7 keys.cc manifest.cc packet.cc sanity.cc vocab.cc rcs_file.cc\
8 xdelta.cc ui.cc schema_migration.cc\
9 constants.cc netsync.cc netcmd.cc merkle_tree.cc basic_io.cc\
10 mkstemp.cc lcs.cc rcs_import.hh rcs_import.cc revision.cc\
11 change_set.cc mt_version.cc automate.cc database_check.cc\
12 path_component.cc epoch.cc \
13\
14 app_state.hh commands.hh file_io.hh manifest.hh packet.hh\
15 sanity.hh update.hh work.hh cert.hh database.hh keys.hh\
16 transforms.hh vocab.hh\
17 cleanup.hh diff_patch.hh lua.hh basic_io.hh\
18 unit_tests.hh vocab_terms.hh interner.hh cycle_detector.hh\
19 randomfile.hh rcs_file.hh xdelta.hh adler32.hh\
20 lcs.hh constants.hh ui.hh schema_migration.hh quick_alloc.hh\
21 netsync.hh netcmd.hh netio.hh merkle_tree.hh\
22 numeric_vocab.hh revision.hh change_set.hh\
23 mkstemp.hh mt_version.hh automate.hh database_check.hh smap.hh\
24 gettext.h package_revision.c package_full_revision.c \
25 path_component.hh epoch.hh package_full_revision.h \
26 package_revision.h
27
28NETXX_SOURCES =\
29netxx/accept.cxx netxx/accept.h netxx/address.cxx\
30netxx/common.h netxx/compat.h netxx/datagram.cxx\
31netxx/datagramserver.cxx netxx/osutil.cxx netxx/osutil.h\
32netxx/peer.cxx netxx/probe.cxx netxx/probe_impl.h\
33netxx/probe_select.cxx netxx/recvfrom.cxx netxx/recvfrom.h\
34netxx/resolve.h netxx/serverbase.cxx netxx/serverbase.h\
35 netxx/sockaddr.cxx netxx/sockaddr.h netxx/socket.cxx\
36netxx/socket.h netxx/sockopt.cxx netxx/stream.cxx\
37netxx/streambase.cxx netxx/streamserver.cxx\
38netxx/address.h netxx/datagram.h netxx/datagramserver.h\
39netxx/netbuf.h netxx/netxx.h netxx/peer.h netxx/probe.h\
40netxx/probeinfo.h netxx/sockopt.h netxx/stream.h netxx/streambase.h\
41netxx/streamserver.h netxx/timeout.h netxx/types.h
42
43
44CRYPTOPP_SOURCES = \
45 cryptopp/algebra.cpp cryptopp/algparam.cpp cryptopp/arc4.cpp \
46 cryptopp/asn.cpp cryptopp/base64.cpp cryptopp/basecode.cpp \
47 cryptopp/crc.cpp cryptopp/cryptlib.cpp cryptopp/des.cpp cryptopp/dessp.cpp \
48 cryptopp/dll.cpp cryptopp/eprecomp.cpp cryptopp/files.cpp cryptopp/filters.cpp \
49 cryptopp/fips140.cpp cryptopp/gzip.cpp cryptopp/hex.cpp cryptopp/hmac.cpp \
50 cryptopp/integer.cpp cryptopp/iterhash.cpp cryptopp/misc.cpp \
51 cryptopp/modes.cpp cryptopp/mqueue.cpp cryptopp/nbtheory.cpp \
52 cryptopp/oaep.cpp cryptopp/osrng.cpp cryptopp/pch.cpp cryptopp/pkcspad.cpp \
53 cryptopp/pssr.cpp cryptopp/pubkey.cpp cryptopp/queue.cpp \
54 cryptopp/randpool.cpp cryptopp/rng.cpp cryptopp/rsa.cpp cryptopp/sha.cpp \
55 cryptopp/strciphr.cpp cryptopp/trdlocal.cpp cryptopp/zdeflate.cpp \
56 cryptopp/zinflate.cpp \
57\
58 cryptopp/algebra.h cryptopp/algparam.h cryptopp/arc4.h cryptopp/argnames.h \
59 cryptopp/asn.h cryptopp/base64.h cryptopp/basecode.h cryptopp/config.h \
60 cryptopp/crc.h cryptopp/cryptlib.h cryptopp/des.h cryptopp/dll.h cryptopp/eprecomp.h \
61 cryptopp/files.h cryptopp/filters.h cryptopp/fips140.h cryptopp/fltrimpl.h \
62 cryptopp/gzip.h cryptopp/hex.h cryptopp/integer.h cryptopp/iterhash.h \
63 cryptopp/mdc.h cryptopp/misc.h cryptopp/modarith.h cryptopp/modes.h \
64 cryptopp/mqueue.h cryptopp/nbtheory.h cryptopp/oaep.h cryptopp/oids.h \
65 cryptopp/osrng.h cryptopp/pch.h cryptopp/pkcspad.h cryptopp/pssr.h \
66 cryptopp/pubkey.h cryptopp/queue.h cryptopp/randpool.h cryptopp/rng.h \
67 cryptopp/rsa.h cryptopp/secblock.h cryptopp/seckey.h cryptopp/sha.h \
68 cryptopp/simple.h cryptopp/smartptr.h cryptopp/stdcpp.h cryptopp/strciphr.h \
69 cryptopp/trdlocal.h cryptopp/words.h cryptopp/zdeflate.h \
70 cryptopp/zinflate.h cryptopp/hmac.h
71
72BOOST_SANDBOX_SOURCES = \
73 boost/circular_buffer_adaptor.hpp \
74boost/circular_buffer_base.hpp \
75boost/circular_buffer_fwd.hpp \
76boost/circular_buffer.hpp
77
78SQLITE_SOURCES = \
79 sqlite/alter.c sqlite/attach.c sqlite/auth.c sqlite/btree.c \
80 sqlite/build.c sqlite/date.c sqlite/delete.c sqlite/expr.c sqlite/func.c \
81 sqlite/hash.c sqlite/insert.c \
82 sqlite/legacy.c sqlite/main.c sqlite/opcodes.c \
83 sqlite/os_unix.c sqlite/os_win.c \
84 sqlite/pager.c sqlite/parse.c sqlite/pragma.c sqlite/printf.c \
85 sqlite/random.c sqlite/select.c sqlite/table.c sqlite/tokenize.c \
86 sqlite/trigger.c sqlite/update.c sqlite/utf.c \
87 sqlite/util.c sqlite/vacuum.c \
88 sqlite/vdbe.c sqlite/vdbeapi.c sqlite/vdbeaux.c \
89 sqlite/vdbemem.c sqlite/where.c \
90\
91 sqlite/btree.h sqlite/config.h sqlite/hash.h sqlite/opcodes.h sqlite/os.h \
92 sqlite/os_common.h sqlite/os_unix.h sqlite/os_win.h \
93 sqlite/parse.h sqlite/sqlite3.h sqlite/sqliteInt.h sqlite/vdbe.h sqlite/vdbeInt.h \
94sqlite/pager.h
95
96LUA_SOURCES = \
97lua/lapi.c lua/lapi.h lua/lauxlib.c lua/lauxlib.h lua/lbaselib.c \
98lua/lcode.c lua/lcode.h lua/ldblib.c lua/ldebug.c lua/ldebug.h lua/ldo.c \
99lua/ldo.h lua/ldump.c lua/lfunc.c lua/lfunc.h lua/lgc.c lua/lgc.h \
100lua/liolib.c lua/llex.c lua/llex.h lua/llimits.h lua/lmathlib.c lua/lmem.c \
101lua/lmem.h lua/loadlib.c lua/lobject.c lua/lobject.h lua/lopcodes.c \
102lua/lopcodes.h lua/lparser.c lua/lparser.h lua/lstate.c lua/lstate.h \
103lua/lstring.c lua/lstring.h lua/lstrlib.c lua/ltable.c lua/ltable.h \
104lua/ltablib.c lua/ltests.c lua/ltm.c lua/ltm.h lua/lua.h lua/lualib.h \
105lua/lundump.c lua/lundump.h lua/lvm.c lua/lvm.h lua/lzio.c lua/lzio.h
106
107IDNA_SOURCES = \
108idna/gunibreak.h idna/gunidecomp.h idna/idna.h idna/nfkc.c\
109idna/punycode.c idna/rfc3454.c idna/stringprep.h idna/version.c \
110idna/gunicomp.h idna/idna.c idna/idn-int.h idna/profiles.c\
111idna/punycode.h idna/stringprep.c idna/toutf8.c
112
113POPT_SOURCES = \
114popt/findme.c popt/poptconfig.c popt/poptint.h \
115popt/findme.h popt/popt.h popt/poptparse.c \
116popt/popt.c popt/popthelp.c popt/system.h
117
118UNIX_PLATFORM_SOURCES = \
119unix/read_password.cc unix/get_system_flavour.cc unix/process.cc unix/have_smart_terminal.cc \
120unix/platform_netsync.cc
121
122WIN32_PLATFORM_SOURCES = \
123win32/read_password.cc win32/get_system_flavour.cc win32/process.cc win32/have_smart_terminal.cc \
124win32/platform_netsync.cc
125
126# primaries
127
128bin_PROGRAMS = monotone
129check_PROGRAMS = unit_tests
130noinst_PROGRAMS = txt2c
131
132monotone_SOURCES = $(MOST_SOURCES) monotone.cc main.cc
133unit_tests_SOURCES = $(MOST_SOURCES) unit_tests.cc
134
135txt2c_SOURCES = txt2c.cc
136
137noinst_LIBRARIES = libplatform.a lib3rdparty.a
138libplatform_a_SOURCES = platform.hh
139lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \
140$(CRYPTOPP_SOURCES) \
141$(IDNA_SOURCES) \
142$(POPT_SOURCES) \
143$(NETXX_SOURCES)
144
145# flags
146
147AM_CPPFLAGS =
148AM_CFLAGS = $(AM_CPPFLAGS) -DTEMP_STORE=1 -DNDEBUG -DBOOST_DISABLE_THREADS -DSQLITE_OMIT_CURSOR -Wall $(SQLITE_CPPFLAGS)
149AM_CXXFLAGS = $(AM_CPPFLAGS) -DNDEBUG -DBOOST_DISABLE_THREADS -Wall
150AM_LDFLAGS =
151
152lib3rdparty_a_CPPFLAGS =
153
154monotone_LDFLAGS =
155monotone_CPPFLAGS =
156
157unit_tests_LDFLAGS =
158unit_tests_CPPFLAGS = -DBUILD_UNIT_TESTS
159
160# conditionals from configury
161
162if BUNDLED_LUA
163 lib3rdparty_a_SOURCES += $(LUA_SOURCES)
164 AM_CPPFLAGS += -I$(top_srcdir)/lua
165endif
166
167if BUNDLED_SQLITE
168 lib3rdparty_a_SOURCES += $(SQLITE_SOURCES)
169 AM_CPPFLAGS += -I$(top_srcdir)/sqlite
170endif
171
172if STATIC_BOOST
173 BOOSTLIBS = @BOOST_LIBDIR@/libboost_filesystem$(BOOST_SUFFIX).a \
174 @BOOST_LIBDIR@/libboost_date_time$(BOOST_SUFFIX).a \
175 @BOOST_LIBDIR@/libboost_regex$(BOOST_SUFFIX).a
176 monotone_LDADD = lib3rdparty.a $(BOOSTLIBS)
177 unit_tests_LDADD = lib3rdparty.a $(BOOSTLIBS) \
178 @BOOST_LIBDIR@/libboost_unit_test_framework$(BOOST_SUFFIX).a
179else
180 monotone_LDADD = lib3rdparty.a
181 unit_tests_LDADD = lib3rdparty.a -lboost_unit_test_framework$(BOOST_SUFFIX)
182endif
183
184monotone_LDADD += libplatform.a $(LIBICONV) $(LIBINTL)
185unit_tests_LDADD += libplatform.a $(LIBICONV) $(LIBINTL)
186
187if WIN32_PLATFORM
188 libplatform_a_SOURCES += $(WIN32_PLATFORM_SOURCES)
189 monotone_LDADD += -lws2_32 -lintl -liconv -liphlpapi
190 unit_tests_LDADD += -lws2_32 -lintl -liconv -liphlpapi
191else
192 libplatform_a_SOURCES += $(UNIX_PLATFORM_SOURCES)
193endif
194
195if MISSING_INET_PTON
196 lib3rdparty_a_SOURCES += netxx/inet_pton.cxx netxx/inet_pton.h
197 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_PTON
198endif
199
200if MISSING_INET_NTOP
201 lib3rdparty_a_SOURCES += netxx/inet_ntop.cxx netxx/inet_ntop.h
202 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_NTOP
203endif
204
205if MISSING_GETADDRINFO
206 lib3rdparty_a_SOURCES += netxx/resolve_gethostbyname.cxx netxx/resolve_getservbyname.cxx
207else
208 lib3rdparty_a_SOURCES += netxx/resolve_getaddrinfo.cxx
209endif
210
211if MISSING_INET6
212 lib3rdparty_a_CPPFLAGS += -DNETXX_NO_INET6
213endif
214
215# i18n support
216
217SUBDIRS = po
218datadir = @datadir@
219localedir = $(datadir)/locale
220DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
221
222# extra files
223
224PDF_FIGURES= figures/branch-heads.pdf figures/cert.pdf\
225figures/difference-between-versions.pdf\
226figures/file-id-manifest-id.pdf figures/fork.pdf\
227figures/general-workflow.pdf figures/linear-history.pdf\
228figures/local-workflow.pdf figures/manifest.pdf figures/merge.pdf\
229figures/network-workflow.pdf figures/parent-child-hashes.pdf\
230figures/parent-child-names-hashes.pdf figures/parent-child.pdf\
231figures/revision-chaining.pdf figures/revision.pdf\
232figures/statement.pdf figures/three-versions.pdf\
233figures/two-branches.pdf
234
235EPS_FIGURES=$(addprefix $(top_builddir)/figures/,$(notdir $(PDF_FIGURES:.pdf=.eps)))
236
237man1_MANS = monotone.1
238info_TEXINFOS = monotone.texi
239EXTRA_DIST = $(man1_MANS) \
240 $(PDF_FIGURES) \
241 INSTALL \
242 README.changesets \
243 UPGRADE \
244 monotone.spec \
245 monotone.html \
246 texinfo.css \
247 schema.sql views.sql \
248 std_hooks.lua test_hooks.lua \
249 testsuite.at \
250 $(wildcard tests/t_*.at) \
251 testsuite \
252 tests/atconfig.in \
253 tests/atlocal.in \
254 package.m4 \
255 package_revision.txt package_full_revision_dist.txt \
256 $(wildcard m4/*.m4) \
257 sqlite/keywordhash.h
258
259MAKEINFOFLAGS=-I $(top_builddir)
260
261monotone.pdf: monotone.texi $(PDF_FIGURES)
262
263monotone.dvi: monotone.texi $(EPS_FIGURES)
264
265%.eps: %.epsi
266mv $< $@
267
268%.epsi: %.ps
269ps2epsi $< $@
270
271$(top_builddir)/figures/%.ps: $(srcdir)/figures/%.pdf
272mkdir -p $(top_builddir)/figures
273acroread -toPostScript -pairs $< $@
274
275
276# testsuite stuff (could this possibly be more ugly?)
277
278TESTS = unit_tests $(srcdir)/testsuite
279
280mostlyclean-local:
281rm -rf testsuite.dir testsuite.log package_full_revision_dist.txt
282
283DISTCLEANFILES = tests/atconfig mt-stdint.h
284
285# distcheck stuff
286
287DISTCHECK_CONFIGURE_FLAGS = \
288 --with-bundled-sqlite \
289 --with-bundled-lua \
290 --enable-static-boost
291
292# note: these targets are all in srcdir; they are *not* built during
293# the VPATH build part of distcheck (with non-writable source
294# directory) but only during the initial dist stage.
295
296$(srcdir)/package.m4: $(top_srcdir)/configure.ac
297{ \
298 echo '# Signature of the current package.'; \
299 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
300 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
301 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
302 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
303 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
304} >$(srcdir)/package.m4
305
306$(srcdir)/testsuite: $(srcdir)/testsuite.at $(wildcard $(srcdir)/tests/t_*.at) \
307 $(srcdir)/package.m4
308autom4te --language=Autotest -I $(srcdir) $< -o $@.tmp
309mv $@.tmp $@
310
311# we generate some headers to copy data into the executable
312
313BUILT_SOURCES_CLEAN = std_hooks.h test_hooks.h schema.h views.h \
314 package_revision.c \
315 package_full_revision.txt package_full_revision.c
316BUILT_SOURCES_NOCLEAN = package_revision.txt package_full_revision_dist.txt
317BUILT_SOURCES = $(BUILT_SOURCES_CLEAN) $(BUILT_SOURCES_NOCLEAN)
318CLEANFILES = $(BUILT_SOURCES_CLEAN) $(EPS_FIGURES)
319
320txt2c: txt2c.cc Makefile
321$(CXX) -Wall -o $@ $<
322chmod 0755 $@$(EXEEXT)
323
324%.h: %.sql txt2c Makefile
325./txt2c $< $(*F) >$@.tmp
326cmp $@.tmp $@ || mv $@.tmp $@
327rm -f $@.tmp
328
329%.h: %.lua txt2c Makefile
330./txt2c $< $(*F) >$@.tmp
331cmp $@.tmp $@ || mv $@.tmp $@
332rm -f $@.tmp
333
334# A fake target so we can use MT/revision as a prerequisite, yet not
335# crash if MT/revision does not exist.
336$(srcdir)/MT/revision:
337true
338package_revision.txt: $(srcdir)/MT/revision
339if [ -f $< ]; then cp $< $@; fi
340if [ ! -f $@ ]; then echo "unknown" > $@; fi
341package_revision.c: package_revision.txt txt2c Makefile
342./txt2c --strip-trailing --no-static $< package_revision >$@.tmp
343cmp $@.tmp $@ || mv $@.tmp $@
344rm -f $@.tmp
345
346.PHONY: package_full_revision.txt
347package_full_revision.txt:
348REAL_BLDDIR=$$PWD/$(top_builddir); \
349(cd $(srcdir) && $$REAL_BLDDIR/monotone status) 2>/dev/null >$@ \
350|| (cd $(srcdir) && monotone status) 2>/dev/null >$@ \
351|| (cp $(srcdir)/package_full_revision_dist.txt 2>/dev/null $@) \
352|| (echo "unknown" >$@)
353package_full_revision_dist.txt: package_full_revision.txt
354cp $< $@
355(echo ''; \
356 echo ' Generated from data cached in the distribution;'; \
357 echo ' further changes may have been made.') >> $@
358package_full_revision.c: package_full_revision.txt txt2c Makefile
359./txt2c --no-static $< package_full_revision >$@.tmp
360cmp $@.tmp $@ || mv $@.tmp $@
361rm -f $@.tmp
362
363# automake doesn't build html docs
364
365monotone.html: monotone.texi texinfo.css
366makeinfo --no-split --no-headers --output $@ --html $<
367perl -i -pe 's@<head>@<head>\n<link type="text/css" rel="stylesheet" href="texinfo.css" />@' $@
368
369# The .perlbak thing is needed, otherwise the perl executions fails on MinGW
370
371html: monotone.texi texinfo.css
372mkdir -p html
373makeinfo --number-sections --html --output html $<
374perl -i.perlbak -pe 's@<head>@<head>\n<link type="text/css" rel="stylesheet" href="texinfo.css" />@' html/*.html
375rm -f html/*.perlbak
376cp texinfo.css html

Archive Download this file

Branches

Tags

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