source: tags/ms_r17q2/GDE/Makefile

Last change on this file was 15656, checked in by epruesse, 8 years ago

Allow skipping individual tool builds

Tools built and distributed with ARB can be skipped if their folder name
is found within ARB_BUILD_SKIP_PKGS.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 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# Allow disabling build of packages individually via environment variable
47ARB_BUILD_SKIP_PKGS?=""
48ARCHS:=$(filter-out $(patsubst %,%/%.dummy,$(ARB_BUILD_SKIP_PKGS)), $(ARCHS))
49
50# --------------------------------------------------------------------------------
51# modify cflags for submakefiles
52
53RAISE_WARNINGS=0# no warnings in this subtree
54UNIT_TESTS=0# no tests in this subtree
55
56sub_cflags:=$(cflags)
57
58ifeq ('$(RAISE_WARNINGS)','0')
59sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags))
60endif
61ifeq ('$(UNIT_TESTS)','0')
62sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags))
63endif
64
65# skip vectorization info
66sub_cflags:=$(subst -fopt-info-vec-missed,,$(sub_cflags))
67sub_cflags:=$(subst -fopt-info-vec,,$(sub_cflags))
68sub_cflags:=$(subst -fopt-info,,$(sub_cflags))
69
70# note the above substs do not affect ALL subdirs. see also manual changes to:
71# - MrBAYES/mrbayes_3.2.1/Makefile
72# - PROBCONS/probcons/Makefile
73# - FASTTREE/Makefile
74# - SATIVA/Makefile
75# - MAFFT/Makefile
76
77# --------------------------------------------------------------------------------
78
79$(MAIN):
80ifeq ('$(RAISE_WARNINGS)','0')
81        @echo ----------------- non-ARB code: warnings disabled
82endif
83        $(MAKE) $(ARCHS)
84ifeq ('$(RAISE_WARNINGS)','0')
85        @echo ----------------- warnings enabled again
86endif
87
88depends: $(ARCHS_DEPENDS:.dummy=.depend)
89
90clean: $(ARCHS:.dummy=.clean)
91
92%.depend:
93        @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile
94        @$(MAKE) -C $(@D) -r depends
95        @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \
96                (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies
97        @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE)" < $(@D)/Makefile > $(@D)/Makefile.2
98        @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile
99        @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed
100
101%.dummy:
102        +@( \
103        (( \
104            echo "$(SEP) Make $(@D)"; \
105            $(MAKE) -C $(@D) -r \
106                "ARB  = yes" \
107                "MAIN = $(@F:.dummy=.a)" \
108                "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" && \
109            echo "$(SEP) Make $(@D) [done]"; \
110        ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false))
111
112%.clean:
113        +@$(MAKE) -C $(@D) \
114                "ARB  = yes" \
115                clean
116
117%.proto:
118        @$(MAKE) -C $(@D) \
119                proto
120
121# the end of the above command avoids that the output of parallel make calls gets mixed up
122
123# DO NOT DELETE
124
125# Do not add dependencies manually - use 'make depend' in $ARBHOME
126# For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main)
Note: See TracBrowser for help on using the repository browser.