source: branches/alma/Makefile@ 1449

Last change on this file since 1449 was 1446, checked in by TakTsutsumi, 16 years ago

Merged recent updates (since 2007) from nrao-asap

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