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 | # Allow disabling build of packages individually via environment variable |
---|
47 | ARB_BUILD_SKIP_PKGS?="" |
---|
48 | ARCHS:=$(filter-out $(patsubst %,%/%.dummy,$(ARB_BUILD_SKIP_PKGS)), $(ARCHS)) |
---|
49 | |
---|
50 | # -------------------------------------------------------------------------------- |
---|
51 | # modify cflags for submakefiles |
---|
52 | |
---|
53 | RAISE_WARNINGS=0# no warnings in this subtree |
---|
54 | UNIT_TESTS=0# no tests in this subtree |
---|
55 | |
---|
56 | sub_cflags:=$(cflags) |
---|
57 | |
---|
58 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
59 | sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags)) |
---|
60 | endif |
---|
61 | ifeq ('$(UNIT_TESTS)','0') |
---|
62 | sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags)) |
---|
63 | endif |
---|
64 | |
---|
65 | # skip vectorization info |
---|
66 | sub_cflags:=$(subst -fopt-info-vec-missed,,$(sub_cflags)) |
---|
67 | sub_cflags:=$(subst -fopt-info-vec,,$(sub_cflags)) |
---|
68 | sub_cflags:=$(subst -fopt-info,,$(sub_cflags)) |
---|
69 | |
---|
70 | # skip coverage support |
---|
71 | sub_cflags:=$(subst -ftest-coverage,,$(sub_cflags)) |
---|
72 | sub_cflags:=$(subst -fprofile-arcs,,$(sub_cflags)) |
---|
73 | |
---|
74 | # note the above substs do not affect ALL subdirs. see also manual changes to: |
---|
75 | # - MrBAYES/mrbayes_3.2.1/Makefile |
---|
76 | # - PROBCONS/probcons/Makefile |
---|
77 | # - FASTTREE/Makefile |
---|
78 | # - SATIVA/Makefile |
---|
79 | # - MAFFT/Makefile |
---|
80 | |
---|
81 | # -------------------------------------------------------------------------------- |
---|
82 | |
---|
83 | $(MAIN): |
---|
84 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
85 | @echo ----------------- non-ARB code: warnings disabled |
---|
86 | endif |
---|
87 | $(MAKE) $(ARCHS) |
---|
88 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
89 | @echo ----------------- warnings enabled again |
---|
90 | endif |
---|
91 | |
---|
92 | depends: $(ARCHS_DEPENDS:.dummy=.depend) |
---|
93 | |
---|
94 | clean: $(ARCHS:.dummy=.clean) |
---|
95 | |
---|
96 | %.depend: |
---|
97 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
---|
98 | @$(MAKE) -C $(@D) -r depends |
---|
99 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \ |
---|
100 | (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies |
---|
101 | @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE)" < $(@D)/Makefile > $(@D)/Makefile.2 |
---|
102 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
---|
103 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
---|
104 | |
---|
105 | %.dummy: |
---|
106 | +@( \ |
---|
107 | (( \ |
---|
108 | echo "$(SEP) Make $(@D)"; \ |
---|
109 | $(MAKE) -C $(@D) -r \ |
---|
110 | "ARB = yes" \ |
---|
111 | "MAIN = $(@F:.dummy=.a)" \ |
---|
112 | "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" && \ |
---|
113 | echo "$(SEP) Make $(@D) [done]"; \ |
---|
114 | ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false)) |
---|
115 | |
---|
116 | %.clean: |
---|
117 | +@$(MAKE) -C $(@D) \ |
---|
118 | "ARB = yes" \ |
---|
119 | clean |
---|
120 | |
---|
121 | %.proto: |
---|
122 | @$(MAKE) -C $(@D) \ |
---|
123 | proto |
---|
124 | |
---|
125 | # the end of the above command avoids that the output of parallel make calls gets mixed up |
---|
126 | |
---|
127 | # DO NOT DELETE |
---|
128 | |
---|
129 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
---|
130 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main) |
---|