source: branches/alma/Makefile@ 1454

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

New Development: No

JIRA Issue: No

Ready to Release: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Description: Changed to execute getsvnrev.sh when 'make all'

is executed instead of doing at 'make install'


File size: 2.0 KB
Line 
1PREFIX := /opt/casa/darwin
2#PREFIX := /export/home/minor/casa/active/linux_gnu
3PYDIR := $(PREFIX)/python/2.5
4
5ifndef ASAPROOT
6 ASAPROOT := $(shell pwd)
7endif
8
9#PY := $(wildcard python/*.py)
10PY := $(wildcard python/*.py python/svninfo.txt)
11LIBS := /tmp/_asap.so
12BINS := bin/asap
13
14CASAROOT := $(word 1, $(AIPSPATH))
15PLATFORM := $(word 2, $(AIPSPATH))
16DISTDIR := asap_$(PLATFORM)
17
18all: module #doc
19
20module:
21 @cd $(ASAPROOT)/src; make
22 @if ( test -f getsvnrev.sh ) ; then /bin/bash getsvnrev.sh ; fi
23
24doc:
25 @cd $(ASAPROOT)/doc; make
26
27
28install:
29 @if ( test ! -d $(PYDIR)/asap ) ; then mkdir -p $(PYDIR)/asap ; fi
30 @if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; 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.