Skip to content

Commit a680ec0

Browse files
jpc-lip6robtaylor
authored andcommitted
Makefile is only for LIP6. Update nightly build.
1 parent 4e62c86 commit a680ec0

File tree

2 files changed

+63
-65
lines changed

2 files changed

+63
-65
lines changed

Makefile Makefile.LIP6

+52-42
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
11

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
162

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
1810

1911
SMP_FLAGS =
2012
ifneq ($(shell which nproc 2> /dev/null),)
2113
SMP_FLAGS = -j$(shell nproc)
2214
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
2721

2822

2923
help:
3024
@echo "============================================================================"; \
3125
echo "Coriolis build & install top Makefile"; \
3226
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"; \
3528
echo ""; \
3629
echo "To build it, simply type (in coriolis/, at the shell prompt):"; \
3730
echo " ego@home:coriolis> make install"; \
@@ -40,55 +33,72 @@ help:
4033
echo "To fully remove build & install:"; \
4134
echo " ego@home:coriolis> make uninstall"; \
4235
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)" ; \
4640
echo "============================================================================";
4741

4842

4943
check_dir:
50-
@if [ "`pwd`" != "${HOME}/coriolis-2.x/src/coriolis" ]; then \
44+
@if [ "`pwd`" != "${CORIOLIS_SRC}" ]; then \
5145
echo "Coriolis uses a fixed directory from the user's root."; \
5246
echo "You must put in:"; \
53-
echo " <${HOME}/coriolis-2.x/src/coriolis>"; \
47+
echo " <${CORIOLIS_SRC}>"; \
5448
echo "Instead of:"; \
5549
echo " <`pwd`>"; \
5650
echo "Stopping build."; \
5751
exit 1; \
5852
fi
5953

6054

61-
check_venv:
62-
@if [ ! -d "./venv" ]; then python3 -m venv venv; fi
55+
$(HOME)/.local/bin/pdm:
56+
@pip install pdm
6357

6458

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
6761

6862

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
7366
@echo ""; \
7467
echo "============================================================================"; \
7568
echo "Coriolis has been successfully built"; \
7669
echo "============================================================================"; \
7770
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,...}"; \
8272
echo "============================================================================";
8373

8474

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+
8588
clean_build: check_dir
8689
@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
89100

90101

91102
uninstall: check_dir
92103
@echo "Removing the whole build & install tree..."; \
93-
echo " $(ISYS_ROOT)"; \
94-
rm -rf $(ISYS_ROOT)
104+
@$(localpath) pdm run ninja -C $(BUILDDIR) uninstall

bootstrap/socInstaller.py

+11-23
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,19 @@ def __init__ ( self, yosysBin, fdLog=None ):
210210

211211
class AllianceCommand ( CommandArg ):
212212

213-
def __init__ ( self, alcBin, fdLog=None ):
214-
CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
213+
def __init__ ( self, fdLog=None ):
214+
CommandArg.__init__ ( self, [ 'make'
215+
, '-f', 'Makefile.LIP6'
216+
, 'install_alliance' ], fdLog=fdLog )
215217
return
216218

217219

218220
class CoriolisCommand ( CommandArg ):
219221

220-
def __init__ ( self, ccbBin, rootDir, threads=1, otherArgs=[], fdLog=None ):
221-
CommandArg.__init__ ( self, [ ccbBin
222-
, '--root='+rootDir
223-
, '--project=coriolis'
224-
, '--make=-j{} install'.format(threads)
222+
def __init__ ( self, rootDir, threads=1, otherArgs=[], fdLog=None ):
223+
CommandArg.__init__ ( self, [ 'make'
224+
, '-f', 'Makefile.LIP6'
225+
, 'install'
225226
] + otherArgs
226227
, fdLog=fdLog )
227228
return
@@ -333,7 +334,6 @@ def __init__ ( self ):
333334
self._chrootMode = None
334335
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
335336
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
336-
self._ccbBin = None
337337
self._benchsDir = None
338338
self._masterHost = self._detectMasterHost()
339339
self._success = False
@@ -377,8 +377,6 @@ def _updateSecondaries ( self ):
377377
self._srcDir = self._rootDir + '/src'
378378
self._logDir = self._srcDir + '/logs'
379379
self._yosysBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/yosysInstaller.sh'
380-
self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
381-
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
382380
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
383381
self._masterHost = self._detectMasterHost()
384382
return
@@ -444,7 +442,7 @@ def getCommands ( self, target ):
444442
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
445443
, ' "{}"'.format(self.alcBin)
446444
] )
447-
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
445+
commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) )
448446
if self.doCoriolis:
449447
if not os.path.isfile( self.ccbBin ):
450448
raise ErrorMessage( 1, [ 'Cannot find <ccb.py>, should be here:'
@@ -453,19 +451,9 @@ def getCommands ( self, target ):
453451
otherArgs = []
454452
if self.debugArg: otherArgs.append( self.debugArg )
455453
if target == 'EL9':
456-
#otherArgs.append( '--project=support' )
457-
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
458-
#commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
459-
if target == 'SL7_64':
460-
otherArgs += [ '--project=support', '--qt4' ]
461-
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
462-
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
463-
elif target == 'SL6_64' or target == 'SL6':
464-
otherArgs += [ '--project=support', '--devtoolset=8', '--qt4' ]
465-
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
466-
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
454+
commands.append( CoriolisCommand( self.rootDir, 3, fdLog=self.fds['coriolis'] ) )
467455
elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10':
468-
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
456+
commands.append( CoriolisCommand( self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
469457
if self.doBenchs:
470458
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
471459
if self.doPyBenchs:

0 commit comments

Comments
 (0)