| 1 | # -------------------------------------------------------------------------------- |
|---|
| 2 | |
|---|
| 3 | ifeq ($(ISINA),1) |
|---|
| 4 | ARCH_SINA_NO_DEPENDS = SINA/SINA.dummy |
|---|
| 5 | else |
|---|
| 6 | ARCH_SINA_NO_DEPENDS = |
|---|
| 7 | endif |
|---|
| 8 | |
|---|
| 9 | # -------------------------------------------------------------------------------- |
|---|
| 10 | |
|---|
| 11 | ARCHS_COMMON_DEPENDS = \ |
|---|
| 12 | CLUSTAL/CLUSTAL.dummy \ |
|---|
| 13 | SUPPORT/SUPPORT.dummy \ |
|---|
| 14 | AxML/AxML.dummy \ |
|---|
| 15 | |
|---|
| 16 | ARCHS_COMMON_NO_DEPENDS = \ |
|---|
| 17 | PHYML20130708/PHYML20130708.dummy \ |
|---|
| 18 | RAxML8/RAxML8.dummy \ |
|---|
| 19 | SATIVA/SATIVA.dummy \ |
|---|
| 20 | $(ARCH_SINA_NO_DEPENDS) \ |
|---|
| 21 | |
|---|
| 22 | # -------------------------------------------------------------------------------- |
|---|
| 23 | # If a package is available as debian package it should go here |
|---|
| 24 | # |
|---|
| 25 | # Note: I'm not sure whether this is a good idea. Due to limited manpower it often takes |
|---|
| 26 | # longer until ARB works with newer (incompatible) versions of these tools. --ralf |
|---|
| 27 | |
|---|
| 28 | ARCHS_NON_DEBIAN_DEPENDS = \ |
|---|
| 29 | CLUSTALW/CLUSTALW.dummy \ |
|---|
| 30 | FASTDNAML/FASTDNAML.dummy \ |
|---|
| 31 | MrBAYES/MrBAYES.dummy \ |
|---|
| 32 | PHYLIP/PHYLIP.dummy \ |
|---|
| 33 | PHYML/PHYML.dummy \ |
|---|
| 34 | RAxML/RAxML.dummy \ |
|---|
| 35 | TREEPUZZLE/TREEPUZZLE.dummy \ |
|---|
| 36 | |
|---|
| 37 | ARCHS_NON_DEBIAN_NO_DEPENDS = \ |
|---|
| 38 | FASTTREE/FASTTREE.dummy \ |
|---|
| 39 | MAFFT/MAFFT.dummy \ |
|---|
| 40 | MUSCLE/MUSCLE.dummy \ |
|---|
| 41 | PROBCONS/PROBCONS.dummy \ |
|---|
| 42 | |
|---|
| 43 | # -------------------------------------------------------------------------------- |
|---|
| 44 | |
|---|
| 45 | ifeq ($(DEBIAN),1) |
|---|
| 46 | ARCHS_DEPENDS = $(ARCHS_COMMON_DEPENDS) |
|---|
| 47 | ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) |
|---|
| 48 | else |
|---|
| 49 | ARCHS_DEPENDS = $(ARCHS_COMMON_DEPENDS) $(ARCHS_NON_DEBIAN_DEPENDS) |
|---|
| 50 | ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) $(ARCHS_NON_DEBIAN_NO_DEPENDS) |
|---|
| 51 | endif |
|---|
| 52 | |
|---|
| 53 | ARCHS=$(ARCHS_DEPENDS) $(ARCHS_NO_DEPENDS) |
|---|
| 54 | |
|---|
| 55 | # Allow disabling build of packages individually via environment variable |
|---|
| 56 | ARB_BUILD_SKIP_PKGS?="" |
|---|
| 57 | ARCHS:=$(filter-out $(patsubst %,%/%.dummy,$(ARB_BUILD_SKIP_PKGS)), $(ARCHS)) |
|---|
| 58 | |
|---|
| 59 | # -------------------------------------------------------------------------------- |
|---|
| 60 | # modify cflags for submakefiles |
|---|
| 61 | |
|---|
| 62 | RAISE_WARNINGS=0# no warnings in this subtree |
|---|
| 63 | UNIT_TESTS=0# no tests in this subtree |
|---|
| 64 | |
|---|
| 65 | sub_cflags:=$(cflags) |
|---|
| 66 | |
|---|
| 67 | ifeq ('$(RAISE_WARNINGS)','0') |
|---|
| 68 | sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags)) |
|---|
| 69 | endif |
|---|
| 70 | ifeq ('$(UNIT_TESTS)','0') |
|---|
| 71 | sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags)) |
|---|
| 72 | endif |
|---|
| 73 | |
|---|
| 74 | # skip vectorization info |
|---|
| 75 | sub_cflags:=$(subst -fopt-info-vec-missed , ,$(sub_cflags)) |
|---|
| 76 | sub_cflags:=$(subst -fopt-info-vec , ,$(sub_cflags)) |
|---|
| 77 | sub_cflags:=$(subst -fopt-info , ,$(sub_cflags)) |
|---|
| 78 | |
|---|
| 79 | # skip coverage support |
|---|
| 80 | sub_cflags:=$(subst -ftest-coverage , ,$(sub_cflags)) |
|---|
| 81 | sub_cflags:=$(subst -fprofile-arcs , ,$(sub_cflags)) |
|---|
| 82 | |
|---|
| 83 | # note the above substs do not affect ALL subdirs. see also manual changes to: |
|---|
| 84 | # - MrBAYES/mrbayes_3.2.1/Makefile |
|---|
| 85 | # - PROBCONS/probcons/Makefile |
|---|
| 86 | # - FASTTREE/Makefile |
|---|
| 87 | # - SATIVA/Makefile |
|---|
| 88 | # - MAFFT/Makefile |
|---|
| 89 | |
|---|
| 90 | # -------------------------------------------------------------------------------- |
|---|
| 91 | |
|---|
| 92 | $(MAIN): |
|---|
| 93 | ifeq ('$(RAISE_WARNINGS)','0') |
|---|
| 94 | @echo ----------------- non-ARB code: warnings disabled |
|---|
| 95 | endif |
|---|
| 96 | $(MAKE) $(ARCHS) |
|---|
| 97 | ifeq ('$(RAISE_WARNINGS)','0') |
|---|
| 98 | @echo ----------------- warnings enabled again |
|---|
| 99 | endif |
|---|
| 100 | |
|---|
| 101 | depends: $(ARCHS_DEPENDS:.dummy=.depend) |
|---|
| 102 | |
|---|
| 103 | clean: $(ARCHS:.dummy=.clean) |
|---|
| 104 | |
|---|
| 105 | %.depend: |
|---|
| 106 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
|---|
| 107 | @$(MAKE) -C $(@D) -r depends |
|---|
| 108 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \ |
|---|
| 109 | (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies |
|---|
| 110 | @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE)" < $(@D)/Makefile > $(@D)/Makefile.2 |
|---|
| 111 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
|---|
| 112 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
|---|
| 113 | |
|---|
| 114 | %.dummy: |
|---|
| 115 | +@( \ |
|---|
| 116 | (( \ |
|---|
| 117 | echo "$(SEP) Make $(@D)"; \ |
|---|
| 118 | $(MAKE) -C $(@D) -r \ |
|---|
| 119 | "ARB = yes" \ |
|---|
| 120 | "MAIN = $(@F:.dummy=.a)" \ |
|---|
| 121 | "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" && \ |
|---|
| 122 | echo "$(SEP) Make $(@D) [done]"; \ |
|---|
| 123 | ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false)) |
|---|
| 124 | |
|---|
| 125 | %.clean: |
|---|
| 126 | +@$(MAKE) -C $(@D) \ |
|---|
| 127 | "ARB = yes" \ |
|---|
| 128 | clean |
|---|
| 129 | |
|---|
| 130 | %.proto: |
|---|
| 131 | @$(MAKE) -C $(@D) \ |
|---|
| 132 | proto |
|---|
| 133 | |
|---|
| 134 | # the end of the above command avoids that the output of parallel make calls gets mixed up |
|---|
| 135 | |
|---|
| 136 | # DO NOT DELETE |
|---|
| 137 | |
|---|
| 138 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
|---|
| 139 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main) |
|---|