source: trunk/Makefile@ 694

Last change on this file since 694 was 692, checked in by mar637, 19 years ago

Makefile: added 'datadist' and 'dist' targets to create binary packages

added ipythonrc support

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