source: trunk/GDE/Makefile @ 12659

Last change on this file since 12659 was 12659, checked in by epruesse, 11 years ago

merge Debian patch disabling tools for which Debian packages exist on
DEBIAN=1 build

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