source: branches/ali/GDE/Makefile

Last change on this file was 19245, checked in by westram, 3 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1# --------------------------------------------------------------------------------
2
3ifeq ($(ISINA),1)
4        ARCH_SINA_NO_DEPENDS = SINA/SINA.dummy
5else
6        ARCH_SINA_NO_DEPENDS =
7endif
8
9# --------------------------------------------------------------------------------
10
11ARCHS_COMMON_DEPENDS = \
12        CLUSTAL/CLUSTAL.dummy  \
13        SUPPORT/SUPPORT.dummy \
14        AxML/AxML.dummy \
15
16ARCHS_COMMON_NO_DEPENDS = \
17        PHYML20130708/PHYML20130708.dummy \
18        RAxML8/RAxML8.dummy \
19        SATIVA/SATIVA.dummy \
20        $(ARCH_SINA_NO_DEPENDS) \
21
22# --------------------------------------------------------------------------------
23# If a package is available as debian package it should go here
24#
25# Note: I'm not sure whether this is a good idea. Due to limited manpower it often takes
26# longer until ARB works with newer (incompatible) versions of these tools. --ralf
27
28ARCHS_NON_DEBIAN_DEPENDS = \
29        CLUSTALW/CLUSTALW.dummy  \
30        FASTDNAML/FASTDNAML.dummy \
31        MrBAYES/MrBAYES.dummy \
32        PHYLIP/PHYLIP.dummy \
33        PHYML/PHYML.dummy \
34        RAxML/RAxML.dummy \
35        TREEPUZZLE/TREEPUZZLE.dummy \
36
37ARCHS_NON_DEBIAN_NO_DEPENDS = \
38        FASTTREE/FASTTREE.dummy \
39        MAFFT/MAFFT.dummy \
40        MUSCLE/MUSCLE.dummy \
41        PROBCONS/PROBCONS.dummy \
42
43# --------------------------------------------------------------------------------
44
45ifeq ($(DEBIAN),1)
46ARCHS_DEPENDS    = $(ARCHS_COMMON_DEPENDS)
47ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS)
48else
49ARCHS_DEPENDS    = $(ARCHS_COMMON_DEPENDS)    $(ARCHS_NON_DEBIAN_DEPENDS)
50ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) $(ARCHS_NON_DEBIAN_NO_DEPENDS)
51endif
52
53ARCHS=$(ARCHS_DEPENDS) $(ARCHS_NO_DEPENDS)
54
55# Allow disabling build of packages individually via environment variable
56ARB_BUILD_SKIP_PKGS?=""
57ARCHS:=$(filter-out $(patsubst %,%/%.dummy,$(ARB_BUILD_SKIP_PKGS)), $(ARCHS))
58
59# --------------------------------------------------------------------------------
60# modify cflags for submakefiles
61
62RAISE_WARNINGS=0# no warnings in this subtree
63UNIT_TESTS=0# no tests in this subtree
64
65sub_cflags:=$(cflags)
66
67ifeq ('$(RAISE_WARNINGS)','0')
68sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags))
69endif
70ifeq ('$(UNIT_TESTS)','0')
71sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags))
72endif
73
74# skip vectorization info
75sub_cflags:=$(subst -fopt-info-vec-missed , ,$(sub_cflags))
76sub_cflags:=$(subst -fopt-info-vec , ,$(sub_cflags))
77sub_cflags:=$(subst -fopt-info , ,$(sub_cflags))
78
79# skip coverage support
80sub_cflags:=$(subst -ftest-coverage , ,$(sub_cflags))
81sub_cflags:=$(subst -fprofile-arcs , ,$(sub_cflags))
82
83# note the above substs do not affect ALL subdirs. see also manual changes to:
84# - MrBAYES/mrbayes_3.2.1/Makefile
85# - PROBCONS/probcons/Makefile
86# - FASTTREE/Makefile
87# - SATIVA/Makefile
88# - MAFFT/Makefile
89
90# --------------------------------------------------------------------------------
91
92$(MAIN):
93ifeq ('$(RAISE_WARNINGS)','0')
94        @echo ----------------- non-ARB code: warnings disabled
95endif
96        $(MAKE) $(ARCHS)
97ifeq ('$(RAISE_WARNINGS)','0')
98        @echo ----------------- warnings enabled again
99endif
100
101depends: $(ARCHS_DEPENDS:.dummy=.depend)
102
103clean: $(ARCHS:.dummy=.clean)
104
105%.depend:
106        @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile
107        @$(MAKE) -C $(@D) -r depends
108        @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \
109                (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies
110        @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE)" < $(@D)/Makefile > $(@D)/Makefile.2
111        @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile
112        @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed
113
114%.dummy:
115        +@( \
116        (( \
117            echo "$(SEP) Make $(@D)"; \
118            $(MAKE) -C $(@D) -r \
119                "ARB  = yes" \
120                "MAIN = $(@F:.dummy=.a)" \
121                "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" && \
122            echo "$(SEP) Make $(@D) [done]"; \
123        ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false))
124
125%.clean:
126        +@$(MAKE) -C $(@D) \
127                "ARB  = yes" \
128                clean
129
130%.proto:
131        @$(MAKE) -C $(@D) \
132                proto
133
134# the end of the above command avoids that the output of parallel make calls gets mixed up
135
136# DO NOT DELETE
137
138# Do not add dependencies manually - use 'make depend' in $ARBHOME
139# For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main)
Note: See TracBrowser for help on using the repository browser.