1
1
2
- UNAME_S = $(shell uname -s)
3
- UNAME_R = $(shell uname -r)
4
- DEVTOOLSET_VERSION = 7
5
-
6
- # We must use devtoolset only under RHEL6 & clones.
7
- DEVTOOLSET_OPTION =
8
- ifeq ($(UNAME_S),Linux)
9
- ifneq ($(findstring .el7.,$(UNAME_R)),)
10
- DEVTOOLSET_OPTION = --devtoolset=$(DEVTOOLSET_VERSION )
11
- endif
12
- ifneq ($(findstring .slsoc6.,$(UNAME_R)),)
13
- DEVTOOLSET_OPTION = --devtoolset=$(DEVTOOLSET_VERSION )
14
- endif
15
- endif
16
2
17
- venv = . venv/bin/activate
3
+ venv = source .venv/bin/activate
4
+ localpath = export PATH=${HOME}/.local/bin:${PATH};
5
+
6
+ NIGHTLY_DIR =
7
+ ifneq ($(findstring nightly,$(shell pwd)),)
8
+ NIGHTLY_DIR = /nightly
9
+ endif
18
10
19
11
SMP_FLAGS =
20
12
ifneq ($(shell which nproc 2> /dev/null),)
21
13
SMP_FLAGS = -j$(shell nproc)
22
14
endif
23
-
24
- ISYS_ROOT = $(shell ./bootstrap/coriolisEnv.py --query-isys-root)
25
- INST_ROOT = $(shell ./bootstrap/coriolisEnv.py --query-inst-root)
26
- WORK_ROOT = ${HOME}/coriolis-2.x/Linux.el9/Release.Shared
15
+ SRC_DIR = ${HOME}/coriolis-2.x$(NIGHTLY_DIR)/src
16
+ CORIOLIS_SRC = ${SRC_DIR}/coriolis
17
+ ALLIANCE_SRC = ${SRC_DIR}/alliance/alliance/src
18
+ BUILDTYPE = release
19
+ BUILDDIR = ${HOME}/coriolis-2.x$(NIGHTLY_DIR)/$(BUILDTYPE)/build
20
+ PREFIX = ${HOME}/coriolis-2.x$(NIGHTLY_DIR)/$(BUILDTYPE)/install
27
21
28
22
29
23
help:
30
24
@echo "============================================================================"; \
31
25
echo "Coriolis build & install top Makefile"; \
32
26
echo ""; \
33
- echo " This Makefile is only a wrapper around the Coriolis & Chams Builder tool" ; \
34
- echo " (./boostrap/ccb.py)" ; \
27
+ echo "This Makefile is intended *only* for LIP6 users"; \
35
28
echo ""; \
36
29
echo "To build it, simply type (in coriolis/, at the shell prompt):"; \
37
30
echo " ego@home:coriolis> make install"; \
@@ -40,55 +33,72 @@ help:
40
33
echo "To fully remove build & install:"; \
41
34
echo " ego@home:coriolis> make uninstall"; \
42
35
echo "============================================================================"; \
43
- echo " SMP_FLAGS = $( SMP_FLAGS) " ; \
44
- echo " ISYS_ROOT = $( ISYS_ROOT) " ; \
45
- echo " INST_ROOT = $( INST_ROOT) " ; \
36
+ echo "SMP_FLAGS = $(SMP_FLAGS)" ; \
37
+ echo "CORIOLIS_SRC = $(CORIOLIS_SRC)" ; \
38
+ echo "BUILDDIR = $(BUILDDIR)" ; \
39
+ echo "PREFIX = $(PREFIX)" ; \
46
40
echo "============================================================================";
47
41
48
42
49
43
check_dir:
50
- @if [ " ` pwd` " != " ${HOME} /coriolis-2.x/src/coriolis " ]; then \
44
+ @if [ "`pwd`" != "${CORIOLIS_SRC} " ]; then \
51
45
echo "Coriolis uses a fixed directory from the user's root."; \
52
46
echo "You must put in:"; \
53
- echo " <${HOME} /coriolis-2.x/src/coriolis >" ; \
47
+ echo " <${CORIOLIS_SRC} >"; \
54
48
echo "Instead of:"; \
55
49
echo " <`pwd`>"; \
56
50
echo "Stopping build."; \
57
51
exit 1; \
58
52
fi
59
53
60
54
61
- check_venv :
62
- @if [ ! -d " ./venv " ] ; then python3 -m venv venv ; fi
55
+ $(HOME)/.local/bin/pdm :
56
+ @pip install pdm
63
57
64
58
65
- pdm_deps : check_venv
66
- @$(venv ) ; pdm install --no-self
59
+ $(CORIOLIS_SRC)/.pdm-plugins/bin/pdm: $(HOME)/.local/bin/pdm
60
+ @$(localpath) pdm install --no-self -d --plugins
67
61
68
62
69
- install : check_dir pdm_deps
70
- @meson setup $(WORK_ROOT ) /build
71
- @meson configure $(WORK_ROOT ) /build --prefix $(WORK_ROOT ) /install
72
- @ninja -v -C $(WORK_ROOT ) /build install
63
+ install: check_dir $(CORIOLIS_SRC)/.pdm-plugins/bin/pdm
64
+ @$(localpath) pdm run meson setup ${BUILDDIR} --prefix=$(PREFIX) -Dpython.install_env=prefix
65
+ @$(localpath) pdm run ninja -C $(BUILDDIR) install
73
66
@echo ""; \
74
67
echo "============================================================================"; \
75
68
echo "Coriolis has been successfully built"; \
76
69
echo "============================================================================"; \
77
70
echo "It has been installed under the directory:"; \
78
- echo " $( INST_ROOT) /{bin,lib,lib64,include,share,...}" ; \
79
- echo " " ; \
80
- echo " You can start the tool by running:" ; \
81
- echo " ego@home:~> $( INST_ROOT) /bin/coriolis" ; \
71
+ echo " $(PREFIX)/{bin,lib,lib64,include,share,...}"; \
82
72
echo "============================================================================";
83
73
84
74
75
+ install_alliance:
76
+ export ALLIANCE_TOP=$(PREFIX); \
77
+ export LD_LIBRARY_PATH=$(PREFIX)/lib:$(LD_LIBRARY_PATH); \
78
+ cd $(ALLIANCE_SRC); \
79
+ sed -i 's,dirs="\\$$newdirs documentation",dirs="$$newdirs",' ./autostuff; \
80
+ ./autostuff clean; \
81
+ ./autostuff; \
82
+ mkdir -p $(BUILDDIR); \
83
+ cd $(BUILDDIR); \
84
+ $(ALLIANCE_SRC)/configure --prefix=$(PREFIX) --enable-alc-shared; \
85
+ make -j1 install
86
+
87
+
85
88
clean_build: check_dir
86
89
@echo "Removing the build tree only."; \
87
- echo " $( INST_ROOT) /../build" ; \
88
- rm -rf $(INST_ROOT ) /../build
90
+ echo " $(BUILDDIR)"; \
91
+ rm -rf $(BUILDDIR)
92
+
93
+
94
+ clean_pdm:
95
+ @echo "Removing all pip, pdm & venv installed files."
96
+ rm -rf ${HOME}/.local
97
+ rm -rf ${CORIOLIS_SRC}/.venv
98
+ rm -f ${CORIOLIS_SRC}/.pdm_python
99
+ rm -rf ${CORIOLIS_SRC}/.pdm_plugins
89
100
90
101
91
102
uninstall: check_dir
92
103
@echo "Removing the whole build & install tree..."; \
93
- echo " $( ISYS_ROOT) " ; \
94
- rm -rf $(ISYS_ROOT )
104
+ @$(localpath) pdm run ninja -C $(BUILDDIR) uninstall
0 commit comments