source: branches/ali/GDE/PHYML20130708/Makefile

Last change on this file was 17618, checked in by westram, 6 years ago
File size: 1.5 KB
Line 
1# PHYML 20130708 Makefile for ARB
2# by Arne Boeckmann (2013)
3
4SUFFIX   = _20130708
5PROG     = PHYML$(SUFFIX)
6BUILDDIR = build
7
8INSTALLED_BINARY = $(ARBHOME)/bin/phyml$(SUFFIX)
9CONFIG_STATUS    = $(BUILDDIR)/config.status
10
11# automatically remove now obsolete file (@@@ remove this code after some time)
12OBSOLETE_STAMP   = phyml.stamp
13
14CC=$(A_CC)
15CXX=$(A_CXX)
16
17ifndef DONT_RETRY_TWICE
18        DONT_RETRY_TWICE:=0 # default to 0
19endif
20
21
22
23# ARBs standard target:
24$(MAIN) : $(INSTALLED_BINARY)
25        rm -f $(OBSOLETE_STAMP)
26ifeq ($(DONT_RETRY_TWICE),1)
27        test -f $(INSTALLED_BINARY)
28else
29        test -f $(INSTALLED_BINARY) || $(MAKE) retry
30endif
31
32retry: 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
40phyml/configure : phyml/configure.fallback
41        @echo "Using $<:"
42        cp -p $< $@
43
44phyml/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
53clean_build:
54        rm -rf $(BUILDDIR)
55        rm -f $(INSTALLED_BINARY)
56
57clean : 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.