source: branches/stable/GDE/Makefile

Last change on this file was 12686, checked in by epruesse, 5 years ago

merge log:trunk@12659:12662 to stable

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