source: tags/arb_5.2/GDE/Makefile

Last change on this file was 5872, checked in by westram, 15 years ago
  • Changed variable transfer to sub-makefiles
    • most variables are now exported via environment (using SOURCE_TOOLS/export2sub or AISC/export2sub)
    • only variables that contain different values for different sub-makefile-calls are passed by cl (e.g. cflags, MAIN)
    • changed flavour of exported variables (recursively expanded → simply expanded variables). Please use VAR := VALUE in Makefiles (not VAR = VALUE). See http://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors for details
  • removed/fixed all undefined variables in Makefiles (using 'make —warn-undefined-variables')
  • changed names of compile-logs generated in GDE subdir
  • added target 'xmlin' (broken, print warning)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1
2ARCHS_ALL = \
3        CLUSTAL/CLUSTAL.dummy  \
4        SUPPORT/SUPPORT.dummy \
5        MOLPHY/MOLPHY.dummy \
6        AxML/AxML.dummy \
7        RAxML/RAxML.dummy \
8        PHYML/PHYML.dummy \
9
10# --------------------------------------------------------------------------------
11# All packages using xview go here:
12
13#ARCHS_XVIEW = \
14
15# deprecated:
16#       CORE/CORE.dummy \
17#       HGL_SRC/HGL_SRC.dummy
18#       LOOPTOOL/LOOPTOOL.dummy
19
20# --------------------------------------------------------------------------------
21# If a package is available as debian package it should go here
22#
23# Note: I'm not sure whether this is a good idea. Due to limited manpower it often takes
24# longer until ARB works with newer (incompatible) versions of these tools. --ralf
25
26ARCHS_NON_DEBIAN = \
27        CLUSTALW/CLUSTALW.dummy  \
28        PHYLIP/PHYLIP.dummy \
29        TREEPUZZLE/TREEPUZZLE.dummy \
30        FASTDNAML/FASTDNAML.dummy \
31
32# --------------------------------------------------------------------------------
33
34ifdef DEBIAN
35ARCHS = $(ARCHS_ALL)
36else
37ARCHS = $(ARCHS_ALL) $(ARCHS_NON_DEBIAN)
38endif
39
40# --------------------------------------------------------------------------------
41# no warnings in this subtree
42
43RAISE_WARNINGS=0
44
45ifeq ('$(RAISE_WARNINGS)','0')
46sub_cflags:=$(subst -W -Wall,-w,$(cflags))
47else
48sub_cflags:=$(cflags)
49endif
50
51# --------------------------------------------------------------------------------
52
53$(MAIN):
54ifeq ('$(RAISE_WARNINGS)','0')
55        @echo ----------------- non-ARB code: warnings disabled
56endif
57        $(MAKE) $(ARCHS)
58ifeq ('$(RAISE_WARNINGS)','0')
59        @echo ----------------- warnings enabled again
60endif
61
62proto:
63        @echo "Nothing to be done for proto"
64
65depends: $(ARCHS:.dummy=.depend)
66
67clean: $(ARCHS:.dummy=.clean)
68
69%.depend:
70        @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile
71        @$(MAKE) -C $(@D) -r depends
72        @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null # check whether sub Makefile has dependencies
73        @cat $(@D)/Makefile \
74                | ../SOURCE_TOOLS/fix_depends.pl \
75                >$(@D)/Makefile.2
76        @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile
77        @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed
78
79%.dummy:
80        @(( \
81            $(MAKE) -C $(@D) -r \
82                "ARB  = yes" \
83                "MAIN = $(@F:.dummy=.a)" \
84                "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" \
85                >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false))
86
87%.clean:
88        @$(MAKE) -C $(@D) \
89                "ARB  = yes" \
90                clean
91
92# the end of the above command avoids that the output of parallel make calls gets mixed up
93
94# DO NOT DELETE
95
96# Do not add dependencies manually - use 'make depend' in $ARBHOME
97# For formatting issues see SOURCE_TOOLS/fix_depends.pl
Note: See TracBrowser for help on using the repository browser.