Source
xxxxxxxxxx
cd $(CASABUILD)/casatools; PKG_CONFIG_PATH=$(CASAINSTALL)/lib/pkgconfig python3 -m build -o $(CASAINSTALL)/dist $(CASASRC)/casatools ; \
##
# CASA6 Modular Makefile
# The intention of this file is to serve as a quick way to put together
# the different pieces of the modular build system to have a full build
# up to casashell with a single "make" command. The target users is
# developers with an understanding of the CASA build procedure.
#
# While the Makefile should work out of the box it is meant to be
# customized fo the individual developer needs. For instance, it
# will checkout the code from git, which might not be neccesary
# for some developers.
#
# To customize for a given branch build, please change the
# CASA_BRANCH variable below to the branch of interest.
# All the steps, from checking out the code to the build directories
# uses directories under ROOT, which by default points to the current
# working directory. This can be changed modriyfying the ROOT variable
# below.
#
# To get a full build from scratch, type "make firstcasa" in a
# directory which contains only this Makefile. Afterwards, the individual
# targets can be used to run different steps. Note that this Makefile
# to perform incremental builds of casacpp one would type
# "make casacpp-build" after the first "make firstcasa"
#
# This Makefile does not run any test.
CASA_BRANCH = master
CASA_REPO = https://open-bitbucket.nrao.edu:/scm/casa/casa6.git
CASACORE_DATA_REPO = ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar
CASA_BUILD_TYPE = RelWithDebInfo
CASACORE_BUILD_TYPE = RelWithDebInfo
LIBSAKURA_VERSION = 5.2.1
CASASHELL_BRANCH = master
# Number of cores used for compilation (default: all available in the machine)
NCORES = $(shell getconf _NPROCESSORS_ONLN)
#oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
#--------------------------------------------------------------------------------------------------------
#
# Package-level dir structure
ROOT = $(shell pwd)
SRCDIR = $(ROOT)/src
CASASRC = $(SRCDIR)/casa6
CASAINSTALL = $(ROOT)/install
CASATESTDIR = $(ROOT)/test
CASAVENVDIR = $(ROOT)/venv
CASABUILD = $(ROOT)/build
#INSTALLPREFIX = $(CASAINSTALL)
#
# Common options to install artifacts of all packages in a single location
#
#INSTALLOPTS = -DCMAKE_INSTALL_PREFIX=$(INSTALLPREFIX) \
# -DCMAKE_INSTALL_BINDIR=sbin \
# -DCMAKE_INSTALL_LIBDIR=lib
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
firstcasa: init casa-clone libsakura casacore casacpp venv-build casatools casatasks casashell
@echo ========================================
@echo CASA has been built successfully.
@echo You can run it with:
@echo $$ . $(CASAVENVDIR)/bin/activate
@echo $$ python
@echo \>\>\> import casatasks
casa: libsakura casacore casacpp venv-build casatools casatasks casashell
clean:
rm -rf $(SRCDIR) $(CASASRC) $(CASABUILD) $(CASAINSTALL) $(CASATESTDIR) $(CASAVENVDIR)
init:
mkdir -p $(SRCDIR) $(CASASRC) $(CASABUILD) $(CASAINSTALL) $(CASATESTDIR) $(CASAVENVDIR)
casa-clone:
git -C $(SRCDIR) clone -b $(CASA_BRANCH) --recursive $(CASA_REPO)
libsakura:
curl -L https://github.com/tnakazato/sakura/archive/refs/tags/libsakura-$(LIBSAKURA_VERSION).tar.gz | gunzip | tar -xvf - -C $(SRCDIR)
mkdir -p $(CASABUILD)/libsakura
cmake \
-DCMAKE_INSTALL_PREFIX=$(CASAINSTALL) \
-DCMAKE_BUILD_TYPE=$(CASA_BUILD_TYPE) \