source: tags/ms_r18q1/GDE/Makefile

Last change on this file was 16223, checked in by westram, 7 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1
2ARCHS_COMMON_DEPENDS = \
3        CLUSTAL/CLUSTAL.dummy  \
4        SUPPORT/SUPPORT.dummy \
5        AxML/AxML.dummy \
6
7ARCHS_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
19ARCHS_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
28ARCHS_NON_DEBIAN_NO_DEPENDS = \
29        FASTTREE/FASTTREE.dummy \
30        MAFFT/MAFFT.dummy \
31        MUSCLE/MUSCLE.dummy \
32        PROBCONS/PROBCONS.dummy \
33
34# --------------------------------------------------------------------------------
35
36ifeq ($(DEBIAN),1)
37ARCHS_DEPENDS    = $(ARCHS_COMMON_DEPENDS)
38ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS)
39else
40ARCHS_DEPENDS    = $(ARCHS_COMMON_DEPENDS)    $(ARCHS_NON_DEBIAN_DEPENDS)
41ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) $(ARCHS_NON_DEBIAN_NO_DEPENDS)
42endif
43
44ARCHS=$(ARCHS_DEPENDS) $(ARCHS_NO_DEPENDS)
45
46# Allow disabling build of packages individually via environment variable
47ARB_BUILD_SKIP_PKGS?=""
48ARCHS:=$(filter-out $(patsubst %,%/%.dummy,$(ARB_BUILD_SKIP_PKGS)), $(ARCHS))
49
50# --------------------------------------------------------------------------------
51# modify cflags for submakefiles
52
53RAISE_WARNINGS=0# no warnings in this subtree
54UNIT_TESTS=0# no tests in this subtree
55
56sub_cflags:=$(cflags)
57
58ifeq ('$(RAISE_WARNINGS)','0')
59sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags))
60endif
61ifeq ('$(UNIT_TESTS)','0')
62sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags))
63endif
64
65# skip vectorization info
66sub_cflags:=$(subst -fopt-info-vec-missed,,$(sub_cflags))
67sub_cflags:=$(subst -fopt-info-vec,,$(sub_cflags))
68sub_cflags:=$(subst -fopt-info,,$(sub_cflags))
69
70# skip coverage support
71sub_cflags:=$(subst -ftest-coverage,,$(sub_cflags))
72sub_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):
84ifeq ('$(RAISE_WARNINGS)','0')
85        @echo ----------------- non-ARB code: warnings disabled
86endif
87        $(MAKE) $(ARCHS)
88ifeq ('$(RAISE_WARNINGS)','0')
89        @echo ----------------- warnings enabled again
90endif
91
92depends: $(ARCHS_DEPENDS:.dummy=.depend)
93
94clean: $(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)
Note: See TracBrowser for help on using the repository browser.