source: trunk/Makefile@ 737

Last change on this file since 737 was 736, checked in by mar637, 19 years ago

changes to dist target

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