source: branches/parallelCasa3.3/Makefile@ 2423

Last change on this file since 2423 was 2262, checked in by Takeshi Nakazato, 13 years ago

New Development: No

JIRA Issue: No

Ready for Test: No

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Preparation for check in tuning on NRO filler.
Merge changes in trunk.

r2154
r2156
r2158
r2198-2203
r2212
r2261


File size: 2.8 KB
Line 
1### Notice:
2### This Makefile assumes CASA+CASACore enviroment.
3### For who wants to build ASAP with older CASA without CASACore
4### environment, replace $(CASAPATH) with $(AIPSPATH).
5#for mac
6#PREFIX := /opt/casa/darwin
7#for linux
8PREFIX := $(word 1, $(CASAPATH))/$(word 2,$(CASAPATH))
9PYTHONVER := $(shell $(shell make -s -f $(PREFIX)/makedefs VARS=PYTHONVER eval_vars) && echo $$PYTHONVER)
10PYDIR := $(PREFIX)/python/$(PYTHONVER)
11
12ifndef ASAPROOT
13 ASAPROOT := $(shell pwd)
14endif
15ATNFD := external-alma
16PYRAPD := external/libpyrap
17
18#PY := $(wildcard python/*.py)
19PY := $(wildcard python/*.py python/svninfo.txt)
20LIBS := /tmp/_asap.so
21BINS := bin/asap
22APPS := apps/asap2to3
23
24CASAROOT := $(word 1, $(CASAPATH))
25PLATFORM := $(word 2, $(CASAPATH))
26DISTDIR := asap_$(PLATFORM)
27
28all: module #doc
29
30module:
31 @if ( test -f getsvnrev.sh ) ; then /bin/bash getsvnrev.sh ; fi
32 @cd $(ASAPROOT)/$(PYRAPD); make
33 @cd $(ASAPROOT)/$(ATNFD); make
34 @cd $(ASAPROOT)/src; make
35 @cd $(ASAPROOT)/apps; make
36
37doc:
38 @cd $(ASAPROOT)/doc; make
39
40
41install:
42 @if ( test -f getsvnrev.sh ) ; then /bin/bash getsvnrev.sh ; fi
43 @if ( test ! -d $(PYDIR)/asap ) ; then mkdir -p $(PYDIR)/asap ; fi
44 @if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
45 @cd $(ASAPROOT)/$(ATNFD); make install
46 @cd $(ASAPROOT)/$(PYRAPD); make install
47 @for file in $(LIBS) ; do cp -f $$file $(PYDIR)/asap ; done
48 @for file in $(BINS) ; do cp -f $$file $(PREFIX)/bin ; done
49 @for file in $(PY) ; do cp -f $$file $(PYDIR)/asap ; done
50 @if ( test ! -d $(PREFIX)/share/asap ) ; then mkdir -p $(PREFIX)/share/asap ; fi
51 @cp -f share/ipythonrc-asap $(PREFIX)/share/asap/
52 @for file in $(APPS) ; do cp -f $$file $(PREFIX)/bin ; done
53 @echo "Successfully installed asap module to" $(PYDIR)
54
55clean:
56 @cd $(ASAPROOT)/src; make clean
57# @cd $(ASAPROOT)/doc; make clean
58 @cd $(ASAPROOT)/$(ATNFD); make realclean
59 @cd $(ASAPROOT)/apps; make clean
60 @cd $(ASAPROOT)/$(PYRAPD); make clean
61
62datadist:
63 @echo "Generating ASAP data archive from aips++ installation..."
64 @cd $(CASAROOT); tar cfj $(ASAPROOT)/$(DISTDIR)/share/data.tar.bz2 data/ephemerides data/geodetic
65 @echo "...done."
66
67
68dist: module doc
69 @cd $(ASAPROOT)
70 @if ( test -d $(DISTDIR) ) ; then rm -rf $(DISTDIR) ; fi
71 @mkdir $(DISTDIR)
72 @mkdir $(DISTDIR)/build $(DISTDIR)/bin $(DISTDIR)/share
73 @for file in $(LIBS) ; do cp -f $$file $(DISTDIR)/build/ ; done
74 @for file in $(PY) ; do cp -f $$file $(DISTDIR)/build/ ; done
75 @for file in $(BINS) ; do cp -f $$file $(DISTDIR)/bin/ ; done
76 @cp -f share/ipythonrc-asap $(DISTDIR)/share/
77 make datadist
78 @cp -f doc/README $(DISTDIR)/
79 @cp -f doc/CHANGELOG $(DISTDIR)/
80 @cp -f bin/install.sh $(DISTDIR)/bin/
81 @echo "Creating compressed archive..."
82 @tar jcf $(DISTDIR).tar.bz2 $(DISTDIR)
83 @rm -rf $(DISTDIR)/
84 @echo "Successfully created binary package" $(DISTDIR).tar.bz2
85
86.PHONY: install clean
Note: See TracBrowser for help on using the repository browser.