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