source: branches/alma/Makefile@ 1603

Last change on this file since 1603 was 1602, checked in by TakTsutsumi, 15 years ago

New Development: No

JIRA Issue: No

Ready to Release: Yes

Interface Changes: No

What Interface Changed:

Test Programs: List test programs

Put in Release Notes: No

Module(s): SD

Description: top Makefile modification


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