source: branches/Release2.1.1/Makefile@ 2812

Last change on this file since 2812 was 1298, checked in by mar637, 18 years ago

make darwin python location default PREFIX

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