source: branches/Release2.1.2/Makefile@ 2770

Last change on this file since 2770 was 1305, checked in by mar637, 18 years ago

merge from asap2.1.1 release tag

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1ifndef ASAPROOT
2 ASAPROOT := $(shell pwd)
3endif
4
5PREFIX := /Library/Frameworks/Python.framework/Versions/2.4
6PYDIR := $(PREFIX)/lib/python2.4/site-packages
7
8
9PY := $(wildcard python/*.py)
10LIBS := src/_asap.so
11BINS := bin/asap
12
13CASAROOT := $(word 1, $(AIPSPATH))
14PLATFORM := $(word 2, $(AIPSPATH))
15DISTDIR := asap_$(PLATFORM)
16
17all: module #doc
18
19module:
20 @cd $(ASAPROOT)/src; make
21
22doc:
23 @cd $(ASAPROOT)/doc; make
24
25install:
26 @if ( test ! -d $(PYDIR)/asap ) ; then mkdir -p $(PYDIR)/asap ; fi
27 @if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
28 @for file in $(LIBS) ; do cp -f $$file $(PYDIR)/asap ; done
29 @for file in $(BINS) ; do cp -f $$file $(PREFIX)/bin ; done
30 @for file in $(PY) ; do cp -f $$file $(PYDIR)/asap ; done
31 @if ( test ! -d $(PREFIX)/share/asap ) ; then mkdir -p $(PREFIX)/share/asap ; fi
32 @cp -f share/ipythonrc-asap $(PREFIX)/share/asap/
33 @echo "Successfully installed asap module to" $(PYDIR)
34
35clean:
36 @cd $(ASAPROOT)/src; make clean
37 @cd $(ASAPROOT)/doc; make clean
38
39datadist:
40 @echo "Generating ASAP data archive from aips++ installation..."
41 @cd $(CASAROOT); tar cfj $(ASAPROOT)/$(DISTDIR)/share/data.tar.bz2 data/ephemerides data/geodetic
42 @echo "...done."
43
44
45dist: module doc
46 @cd $(ASAPROOT)
47 @if ( test -d $(DISTDIR) ) ; then rm -rf $(DISTDIR) ; fi
48 @mkdir $(DISTDIR)
49 @mkdir $(DISTDIR)/build $(DISTDIR)/bin $(DISTDIR)/share
50 @for file in $(LIBS) ; do cp -f $$file $(DISTDIR)/build/ ; done
51 @for file in $(PY) ; do cp -f $$file $(DISTDIR)/build/ ; done
52 @for file in $(BINS) ; do cp -f $$file $(DISTDIR)/bin/ ; done
53 @cp -f share/ipythonrc-asap $(DISTDIR)/share/
54 make datadist
55 @cp -f doc/README $(DISTDIR)/
56 @cp -f doc/CHANGELOG $(DISTDIR)/
57 @cp -f bin/install.sh $(DISTDIR)/bin/
58 @echo "Creating compressed archive..."
59 @tar jcf $(DISTDIR).tar.bz2 $(DISTDIR)
60 @rm -rf $(DISTDIR)/
61 @echo "Successfully created binary package" $(DISTDIR).tar.bz2
62
63.PHONY: install clean
Note: See TracBrowser for help on using the repository browser.