source: branches/alma/Makefile@ 1989

Last change on this file since 1989 was 1761, checked in by Kana Sugimoto, 14 years ago

New Development: Yes

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: gmake; gmake install @$ASAPROOT

then asap2to3 is installed to $CASAARCH/bin/

Put in Release Notes: Yes

Module(s): asap2to3

Description:

added apps/Makefile so that asap2to3 to be built and installed to $CASAARCH/bin


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