Changeset 692 for trunk/Makefile


Ignore:
Timestamp:
09/26/05 10:24:42 (19 years ago)
Author:
mar637
Message:

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

added ipythonrc support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r633 r692  
    77
    88PY := $(wildcard python/*.py)
    9 LIBS := lib/_asap.so
     9LIBS := /tmp/_asap.so
    1010BINS := bin/asap
     11
     12CASAROOT  := $(word 1, $(AIPSPATH))
     13PLATFORM  := $(word 2, $(AIPSPATH))
     14DISTDIR   := asap_$(PLATFORM)
    1115
    1216all: module #doc
     
    1822        @cd $(ASAPROOT)/doc; make
    1923
    20 install: 
     24install:
    2125        @if ( test ! -d $(PYDIR)/asap ) ; then mkdir -p $(PYDIR)/asap ; fi
    2226        @for file in $(LIBS) ; do cp -f $$file $(PYDIR)/asap ; done
    2327        @for file in $(BINS) ; do cp -f $$file $(PREFIX)/bin ; done
    2428        @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/
    2531        @echo "Successfully installed asap module to" $(PYDIR)
    2632
    2733clean:
    2834        @cd $(ASAPROOT)/src; make clean
    29         @cd $(ASAPROOT)/doc; make clean   
     35        @cd $(ASAPROOT)/doc; make clean
     36
     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
    3061
    3162.PHONY: install clean
Note: See TracChangeset for help on using the changeset viewer.