1 | |
---|
2 | ARCHS_ALL = \ |
---|
3 | CLUSTAL/CLUSTAL.dummy \ |
---|
4 | SUPPORT/SUPPORT.dummy \ |
---|
5 | AxML/AxML.dummy \ |
---|
6 | RAxML/RAxML.dummy \ |
---|
7 | PHYML/PHYML.dummy \ |
---|
8 | |
---|
9 | # -------------------------------------------------------------------------------- |
---|
10 | # If a package is available as debian package it should go here |
---|
11 | # |
---|
12 | # Note: I'm not sure whether this is a good idea. Due to limited manpower it often takes |
---|
13 | # longer until ARB works with newer (incompatible) versions of these tools. --ralf |
---|
14 | |
---|
15 | ARCHS_NON_DEBIAN = \ |
---|
16 | CLUSTALW/CLUSTALW.dummy \ |
---|
17 | PHYLIP/PHYLIP.dummy \ |
---|
18 | TREEPUZZLE/TREEPUZZLE.dummy \ |
---|
19 | FASTDNAML/FASTDNAML.dummy \ |
---|
20 | |
---|
21 | # -------------------------------------------------------------------------------- |
---|
22 | |
---|
23 | ifdef DEBIAN |
---|
24 | ARCHS = $(ARCHS_ALL) |
---|
25 | else |
---|
26 | ARCHS = $(ARCHS_ALL) $(ARCHS_NON_DEBIAN) |
---|
27 | endif |
---|
28 | |
---|
29 | # -------------------------------------------------------------------------------- |
---|
30 | # no warnings in this subtree |
---|
31 | |
---|
32 | RAISE_WARNINGS=0 |
---|
33 | |
---|
34 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
35 | sub_cflags:=$(subst -W -Wall,-w,$(cflags)) |
---|
36 | else |
---|
37 | sub_cflags:=$(cflags) |
---|
38 | endif |
---|
39 | |
---|
40 | # -------------------------------------------------------------------------------- |
---|
41 | |
---|
42 | $(MAIN): |
---|
43 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
44 | @echo ----------------- non-ARB code: warnings disabled |
---|
45 | endif |
---|
46 | $(MAKE) $(ARCHS) |
---|
47 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
48 | @echo ----------------- warnings enabled again |
---|
49 | endif |
---|
50 | |
---|
51 | proto: |
---|
52 | @echo "Nothing to be done for proto" |
---|
53 | |
---|
54 | depends: $(ARCHS:.dummy=.depend) |
---|
55 | |
---|
56 | clean: $(ARCHS:.dummy=.clean) |
---|
57 | |
---|
58 | %.depend: |
---|
59 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
---|
60 | @$(MAKE) -C $(@D) -r depends |
---|
61 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null # check whether sub Makefile has dependencies |
---|
62 | @cat $(@D)/Makefile \ |
---|
63 | | ../SOURCE_TOOLS/fix_depends.pl \ |
---|
64 | >$(@D)/Makefile.2 |
---|
65 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
---|
66 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
---|
67 | |
---|
68 | %.dummy: |
---|
69 | @(( \ |
---|
70 | $(MAKE) -C $(@D) -r \ |
---|
71 | "ARB = yes" \ |
---|
72 | "MAIN = $(@F:.dummy=.a)" \ |
---|
73 | "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" \ |
---|
74 | >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false)) |
---|
75 | |
---|
76 | %.clean: |
---|
77 | @$(MAKE) -C $(@D) \ |
---|
78 | "ARB = yes" \ |
---|
79 | clean |
---|
80 | |
---|
81 | # the end of the above command avoids that the output of parallel make calls gets mixed up |
---|
82 | |
---|
83 | # DO NOT DELETE |
---|
84 | |
---|
85 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
---|
86 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl |
---|