1 | |
---|
2 | ARCHS_COMMON_DEPENDS = \ |
---|
3 | CLUSTAL/CLUSTAL.dummy \ |
---|
4 | SUPPORT/SUPPORT.dummy \ |
---|
5 | AxML/AxML.dummy \ |
---|
6 | |
---|
7 | ARCHS_COMMON_NO_DEPENDS = \ |
---|
8 | PHYML20130708/PHYML20130708.dummy \ |
---|
9 | RAxML8/RAxML8.dummy \ |
---|
10 | SATIVA/SATIVA.dummy \ |
---|
11 | |
---|
12 | |
---|
13 | # -------------------------------------------------------------------------------- |
---|
14 | # If a package is available as debian package it should go here |
---|
15 | # |
---|
16 | # Note: I'm not sure whether this is a good idea. Due to limited manpower it often takes |
---|
17 | # longer until ARB works with newer (incompatible) versions of these tools. --ralf |
---|
18 | |
---|
19 | ARCHS_NON_DEBIAN_DEPENDS = \ |
---|
20 | CLUSTALW/CLUSTALW.dummy \ |
---|
21 | FASTDNAML/FASTDNAML.dummy \ |
---|
22 | MrBAYES/MrBAYES.dummy \ |
---|
23 | PHYLIP/PHYLIP.dummy \ |
---|
24 | PHYML/PHYML.dummy \ |
---|
25 | RAxML/RAxML.dummy \ |
---|
26 | TREEPUZZLE/TREEPUZZLE.dummy \ |
---|
27 | |
---|
28 | ARCHS_NON_DEBIAN_NO_DEPENDS = \ |
---|
29 | FASTTREE/FASTTREE.dummy \ |
---|
30 | MAFFT/MAFFT.dummy \ |
---|
31 | MUSCLE/MUSCLE.dummy \ |
---|
32 | PROBCONS/PROBCONS.dummy \ |
---|
33 | |
---|
34 | # -------------------------------------------------------------------------------- |
---|
35 | |
---|
36 | ifeq ($(DEBIAN),1) |
---|
37 | ARCHS_DEPENDS = $(ARCHS_COMMON_DEPENDS) |
---|
38 | ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) |
---|
39 | else |
---|
40 | ARCHS_DEPENDS = $(ARCHS_COMMON_DEPENDS) $(ARCHS_NON_DEBIAN_DEPENDS) |
---|
41 | ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) $(ARCHS_NON_DEBIAN_NO_DEPENDS) |
---|
42 | endif |
---|
43 | |
---|
44 | ARCHS=$(ARCHS_DEPENDS) $(ARCHS_NO_DEPENDS) |
---|
45 | |
---|
46 | # -------------------------------------------------------------------------------- |
---|
47 | # modify cflags for submakefiles |
---|
48 | |
---|
49 | RAISE_WARNINGS=0# no warnings in this subtree |
---|
50 | UNIT_TESTS=0# no tests in this subtree |
---|
51 | |
---|
52 | sub_cflags:=$(cflags) |
---|
53 | |
---|
54 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
55 | sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags)) |
---|
56 | endif |
---|
57 | ifeq ('$(UNIT_TESTS)','0') |
---|
58 | sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags)) |
---|
59 | endif |
---|
60 | |
---|
61 | # note the above does not affect all subdirs. see also manual changes to: |
---|
62 | # - MrBAYES/mrbayes_3.2.1/Makefile |
---|
63 | # - PROBCONS/probcons/Makefile |
---|
64 | # - FASTTREE/Makefile |
---|
65 | |
---|
66 | # -------------------------------------------------------------------------------- |
---|
67 | |
---|
68 | $(MAIN): |
---|
69 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
70 | @echo ----------------- non-ARB code: warnings disabled |
---|
71 | endif |
---|
72 | $(MAKE) $(ARCHS) |
---|
73 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
74 | @echo ----------------- warnings enabled again |
---|
75 | endif |
---|
76 | |
---|
77 | depends: $(ARCHS_DEPENDS:.dummy=.depend) |
---|
78 | |
---|
79 | clean: $(ARCHS:.dummy=.clean) |
---|
80 | |
---|
81 | %.depend: |
---|
82 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
---|
83 | @$(MAKE) -C $(@D) -r depends |
---|
84 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \ |
---|
85 | (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies |
---|
86 | @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE)" < $(@D)/Makefile > $(@D)/Makefile.2 |
---|
87 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
---|
88 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
---|
89 | |
---|
90 | %.dummy: |
---|
91 | +@( \ |
---|
92 | (( \ |
---|
93 | echo "$(SEP) Make $(@D)"; \ |
---|
94 | $(MAKE) -C $(@D) -r \ |
---|
95 | "ARB = yes" \ |
---|
96 | "MAIN = $(@F:.dummy=.a)" \ |
---|
97 | "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" && \ |
---|
98 | echo "$(SEP) Make $(@D) [done]"; \ |
---|
99 | ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false)) |
---|
100 | |
---|
101 | %.clean: |
---|
102 | +@$(MAKE) -C $(@D) \ |
---|
103 | "ARB = yes" \ |
---|
104 | clean |
---|
105 | |
---|
106 | %.proto: |
---|
107 | @$(MAKE) -C $(@D) \ |
---|
108 | proto |
---|
109 | |
---|
110 | # the end of the above command avoids that the output of parallel make calls gets mixed up |
---|
111 | |
---|
112 | # DO NOT DELETE |
---|
113 | |
---|
114 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
---|
115 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main) |
---|