source: tags/ms_r16q3/GDE/Makefile

Last change on this file was 13069, checked in by westram, 10 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 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# --------------------------------------------------------------------------------
47# modify cflags for submakefiles
48
49RAISE_WARNINGS=0# no warnings in this subtree
50UNIT_TESTS=0# no tests in this subtree
51
52sub_cflags:=$(cflags)
53
54ifeq ('$(RAISE_WARNINGS)','0')
55sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags))
56endif
57ifeq ('$(UNIT_TESTS)','0')
58sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags))
59endif
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):
69ifeq ('$(RAISE_WARNINGS)','0')
70        @echo ----------------- non-ARB code: warnings disabled
71endif
72        $(MAKE) $(ARCHS)
73ifeq ('$(RAISE_WARNINGS)','0')
74        @echo ----------------- warnings enabled again
75endif
76
77depends: $(ARCHS_DEPENDS:.dummy=.depend)
78
79clean: $(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)
Note: See TracBrowser for help on using the repository browser.