Line | |
---|
1 | # PHYML 20130708 Makefile for ARB |
---|
2 | # by Arne Boeckmann (2013) |
---|
3 | |
---|
4 | SUFFIX = _20130708 |
---|
5 | PROG = PHYML$(SUFFIX) |
---|
6 | BUILDDIR = build |
---|
7 | |
---|
8 | INSTALLED_BINARY = $(ARBHOME)/bin/phyml$(SUFFIX) |
---|
9 | CONFIG_STATUS = $(BUILDDIR)/config.status |
---|
10 | |
---|
11 | # automatically remove now obsolete file (@@@ remove this code after some time) |
---|
12 | OBSOLETE_STAMP = phyml.stamp |
---|
13 | |
---|
14 | CC=$(A_CC) |
---|
15 | CXX=$(A_CXX) |
---|
16 | |
---|
17 | ifndef DONT_RETRY_TWICE |
---|
18 | DONT_RETRY_TWICE:=0 # default to 0 |
---|
19 | endif |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | # ARBs standard target: |
---|
24 | $(MAIN) : $(INSTALLED_BINARY) |
---|
25 | rm -f $(OBSOLETE_STAMP) |
---|
26 | ifeq ($(DONT_RETRY_TWICE),1) |
---|
27 | test -f $(INSTALLED_BINARY) |
---|
28 | else |
---|
29 | test -f $(INSTALLED_BINARY) || $(MAKE) retry |
---|
30 | endif |
---|
31 | |
---|
32 | retry: clean_build |
---|
33 | @echo "---------------------------------------- PHYML 'make install' failed to install -> triggering rebuild" |
---|
34 | $(MAKE) "DONT_RETRY_TWICE=1" $(MAIN) |
---|
35 | @echo "---------------------------------------- PHYML rebuild succeeded" |
---|
36 | |
---|
37 | $(INSTALLED_BINARY): $(CONFIG_STATUS) |
---|
38 | ( export MAKEFLAGS= ; $(MAKE) -C $(BUILDDIR) install ) |
---|
39 | |
---|
40 | phyml/configure : phyml/configure.fallback |
---|
41 | @echo "Using $<:" |
---|
42 | cp -p $< $@ |
---|
43 | |
---|
44 | phyml/config.h.in : phyml/config.h.in.fallback |
---|
45 | @echo "Using $<:" |
---|
46 | cp -p $< $@ |
---|
47 | |
---|
48 | $(CONFIG_STATUS): Makefile phyml/configure phyml/config.h.in |
---|
49 | $(MAKE) "MAKEFLAGS=" clean_build |
---|
50 | mkdir -p $(BUILDDIR) |
---|
51 | cd $(BUILDDIR) && ../phyml/configure CPP='' --prefix=$(ARBHOME) --program-suffix=$(SUFFIX) |
---|
52 | |
---|
53 | clean_build: |
---|
54 | rm -rf $(BUILDDIR) |
---|
55 | rm -f $(INSTALLED_BINARY) |
---|
56 | |
---|
57 | clean : clean_build |
---|
58 | rm -f phyml/config.h.in |
---|
59 | rm -f phyml/configure |
---|
60 | |
---|
61 | |
---|
62 | .PHONY : clean clean_build |
---|
63 | |
---|
Note: See
TracBrowser
for help on using the repository browser.