2015-05-09 16:11:44 -05:00
|
|
|
|
|
|
|
|
2023-10-16 16:59:45 -05:00
|
|
|
venv = source .venv/bin/activate
|
|
|
|
localpath = export PATH=${HOME}/.local/bin:${PATH};
|
|
|
|
|
2023-10-17 08:10:25 -05:00
|
|
|
REGRESSION_DIR =
|
2023-10-16 16:59:45 -05:00
|
|
|
ifneq ($(findstring nightly,$(shell pwd)),)
|
2023-10-17 08:10:25 -05:00
|
|
|
REGRESSION_DIR = /nightly
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring runner,$(shell pwd)),)
|
|
|
|
REGRESSION_DIR = /work/coriolis/coriolis
|
2023-10-16 16:59:45 -05:00
|
|
|
endif
|
2023-08-01 08:43:21 -05:00
|
|
|
|
2015-05-09 16:11:44 -05:00
|
|
|
SMP_FLAGS =
|
|
|
|
ifneq ($(shell which nproc 2> /dev/null),)
|
|
|
|
SMP_FLAGS = -j$(shell nproc)
|
|
|
|
endif
|
2023-10-17 08:10:25 -05:00
|
|
|
SRC_DIR = ${HOME}$(REGRESSION_DIR)/coriolis-2.x/src
|
2023-10-16 16:59:45 -05:00
|
|
|
CORIOLIS_SRC = ${SRC_DIR}/coriolis
|
|
|
|
ALLIANCE_SRC = ${SRC_DIR}/alliance/alliance/src
|
|
|
|
BUILDTYPE = release
|
2023-10-17 08:10:25 -05:00
|
|
|
BUILDDIR = ${HOME}$(REGRESSION_DIR)/coriolis-2.x/$(BUILDTYPE)/build
|
|
|
|
PREFIX = ${HOME}$(REGRESSION_DIR)/coriolis-2.x/$(BUILDTYPE)/install
|
2015-05-09 16:11:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "============================================================================"; \
|
|
|
|
echo "Coriolis build & install top Makefile"; \
|
|
|
|
echo ""; \
|
2023-10-16 16:59:45 -05:00
|
|
|
echo "This Makefile is intended *only* for LIP6 users"; \
|
2015-05-09 16:11:44 -05:00
|
|
|
echo ""; \
|
|
|
|
echo "To build it, simply type (in coriolis/, at the shell prompt):"; \
|
|
|
|
echo " ego@home:coriolis> make install"; \
|
|
|
|
echo "To remove the build directory (and keep the software installed):"; \
|
|
|
|
echo " ego@home:coriolis> make clean_build"; \
|
|
|
|
echo "To fully remove build & install:"; \
|
|
|
|
echo " ego@home:coriolis> make uninstall"; \
|
|
|
|
echo "============================================================================"; \
|
2023-10-16 16:59:45 -05:00
|
|
|
echo "SMP_FLAGS = $(SMP_FLAGS)" ; \
|
|
|
|
echo "CORIOLIS_SRC = $(CORIOLIS_SRC)" ; \
|
|
|
|
echo "BUILDDIR = $(BUILDDIR)" ; \
|
|
|
|
echo "PREFIX = $(PREFIX)" ; \
|
2015-05-09 16:11:44 -05:00
|
|
|
echo "============================================================================";
|
|
|
|
|
|
|
|
|
|
|
|
check_dir:
|
2023-10-16 16:59:45 -05:00
|
|
|
@if [ "`pwd`" != "${CORIOLIS_SRC}" ]; then \
|
2015-05-09 16:11:44 -05:00
|
|
|
echo "Coriolis uses a fixed directory from the user's root."; \
|
|
|
|
echo "You must put in:"; \
|
2023-10-16 16:59:45 -05:00
|
|
|
echo " <${CORIOLIS_SRC}>"; \
|
2015-05-09 16:11:44 -05:00
|
|
|
echo "Instead of:"; \
|
|
|
|
echo " <`pwd`>"; \
|
|
|
|
echo "Stopping build."; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2023-10-16 16:59:45 -05:00
|
|
|
$(HOME)/.local/bin/pdm:
|
|
|
|
@pip install pdm
|
2023-08-01 08:43:21 -05:00
|
|
|
|
|
|
|
|
2023-10-16 16:59:45 -05:00
|
|
|
$(CORIOLIS_SRC)/.pdm-plugins/bin/pdm: $(HOME)/.local/bin/pdm
|
|
|
|
@$(localpath) pdm install --no-self -d --plugins
|
2023-08-01 08:43:21 -05:00
|
|
|
|
|
|
|
|
2023-10-16 16:59:45 -05:00
|
|
|
install: check_dir $(CORIOLIS_SRC)/.pdm-plugins/bin/pdm
|
|
|
|
@$(localpath) pdm run meson setup ${BUILDDIR} --prefix=$(PREFIX) -Dpython.install_env=prefix
|
|
|
|
@$(localpath) pdm run ninja -C $(BUILDDIR) install
|
2015-05-09 16:11:44 -05:00
|
|
|
@echo ""; \
|
|
|
|
echo "============================================================================"; \
|
|
|
|
echo "Coriolis has been successfully built"; \
|
|
|
|
echo "============================================================================"; \
|
|
|
|
echo "It has been installed under the directory:"; \
|
2023-10-16 16:59:45 -05:00
|
|
|
echo " $(PREFIX)/{bin,lib,lib64,include,share,...}"; \
|
2015-05-09 16:11:44 -05:00
|
|
|
echo "============================================================================";
|
|
|
|
|
|
|
|
|
2023-10-16 16:59:45 -05:00
|
|
|
install_alliance:
|
|
|
|
export ALLIANCE_TOP=$(PREFIX); \
|
|
|
|
export LD_LIBRARY_PATH=$(PREFIX)/lib:$(LD_LIBRARY_PATH); \
|
|
|
|
cd $(ALLIANCE_SRC); \
|
|
|
|
sed -i 's,dirs="\\$$newdirs documentation",dirs="$$newdirs",' ./autostuff; \
|
|
|
|
./autostuff clean; \
|
|
|
|
./autostuff; \
|
|
|
|
mkdir -p $(BUILDDIR); \
|
|
|
|
cd $(BUILDDIR); \
|
|
|
|
$(ALLIANCE_SRC)/configure --prefix=$(PREFIX) --enable-alc-shared; \
|
|
|
|
make -j1 install
|
|
|
|
|
|
|
|
|
2015-05-09 16:11:44 -05:00
|
|
|
clean_build: check_dir
|
|
|
|
@echo "Removing the build tree only."; \
|
2023-10-16 16:59:45 -05:00
|
|
|
echo " $(BUILDDIR)"; \
|
|
|
|
rm -rf $(BUILDDIR)
|
|
|
|
|
|
|
|
|
|
|
|
clean_pdm:
|
|
|
|
@echo "Removing all pip, pdm & venv installed files."
|
|
|
|
rm -rf ${HOME}/.local
|
|
|
|
rm -rf ${CORIOLIS_SRC}/.venv
|
|
|
|
rm -f ${CORIOLIS_SRC}/.pdm_python
|
|
|
|
rm -rf ${CORIOLIS_SRC}/.pdm_plugins
|
2015-05-09 16:11:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
uninstall: check_dir
|
|
|
|
@echo "Removing the whole build & install tree..."; \
|
2023-10-16 16:59:45 -05:00
|
|
|
@$(localpath) pdm run ninja -C $(BUILDDIR) uninstall
|