source: branches/profile/GDE/Makefile

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