Makefile is only for LIP6. Update nightly build.

This commit is contained in:
Jean-Paul Chaput 2023-10-16 23:59:45 +02:00 committed by Rob Taylor
parent 4e62c8689a
commit a680ec0575
2 changed files with 62 additions and 64 deletions

View File

@ -1,37 +1,30 @@
UNAME_S = $(shell uname -s)
UNAME_R = $(shell uname -r)
DEVTOOLSET_VERSION = 7
# We must use devtoolset only under RHEL6 & clones. venv = source .venv/bin/activate
DEVTOOLSET_OPTION = localpath = export PATH=${HOME}/.local/bin:${PATH};
ifeq ($(UNAME_S),Linux)
ifneq ($(findstring .el7.,$(UNAME_R)),)
DEVTOOLSET_OPTION = --devtoolset=$(DEVTOOLSET_VERSION)
endif
ifneq ($(findstring .slsoc6.,$(UNAME_R)),)
DEVTOOLSET_OPTION = --devtoolset=$(DEVTOOLSET_VERSION)
endif
endif
venv = . venv/bin/activate NIGHTLY_DIR =
ifneq ($(findstring nightly,$(shell pwd)),)
NIGHTLY_DIR = /nightly
endif
SMP_FLAGS = SMP_FLAGS =
ifneq ($(shell which nproc 2> /dev/null),) ifneq ($(shell which nproc 2> /dev/null),)
SMP_FLAGS = -j$(shell nproc) SMP_FLAGS = -j$(shell nproc)
endif endif
SRC_DIR = ${HOME}/coriolis-2.x$(NIGHTLY_DIR)/src
ISYS_ROOT = $(shell ./bootstrap/coriolisEnv.py --query-isys-root) CORIOLIS_SRC = ${SRC_DIR}/coriolis
INST_ROOT = $(shell ./bootstrap/coriolisEnv.py --query-inst-root) ALLIANCE_SRC = ${SRC_DIR}/alliance/alliance/src
WORK_ROOT = ${HOME}/coriolis-2.x/Linux.el9/Release.Shared BUILDTYPE = release
BUILDDIR = ${HOME}/coriolis-2.x$(NIGHTLY_DIR)/$(BUILDTYPE)/build
PREFIX = ${HOME}/coriolis-2.x$(NIGHTLY_DIR)/$(BUILDTYPE)/install
help: help:
@echo "============================================================================"; \ @echo "============================================================================"; \
echo "Coriolis build & install top Makefile"; \ echo "Coriolis build & install top Makefile"; \
echo ""; \ echo ""; \
echo "This Makefile is only a wrapper around the Coriolis & Chams Builder tool"; \ echo "This Makefile is intended *only* for LIP6 users"; \
echo "(./boostrap/ccb.py)"; \
echo ""; \ echo ""; \
echo "To build it, simply type (in coriolis/, at the shell prompt):"; \ echo "To build it, simply type (in coriolis/, at the shell prompt):"; \
echo " ego@home:coriolis> make install"; \ echo " ego@home:coriolis> make install"; \
@ -41,16 +34,17 @@ help:
echo " ego@home:coriolis> make uninstall"; \ echo " ego@home:coriolis> make uninstall"; \
echo "============================================================================"; \ echo "============================================================================"; \
echo "SMP_FLAGS = $(SMP_FLAGS)" ; \ echo "SMP_FLAGS = $(SMP_FLAGS)" ; \
echo "ISYS_ROOT = $(ISYS_ROOT)" ; \ echo "CORIOLIS_SRC = $(CORIOLIS_SRC)" ; \
echo "INST_ROOT = $(INST_ROOT)" ; \ echo "BUILDDIR = $(BUILDDIR)" ; \
echo "PREFIX = $(PREFIX)" ; \
echo "============================================================================"; echo "============================================================================";
check_dir: check_dir:
@if [ "`pwd`" != "${HOME}/coriolis-2.x/src/coriolis" ]; then \ @if [ "`pwd`" != "${CORIOLIS_SRC}" ]; then \
echo "Coriolis uses a fixed directory from the user's root."; \ echo "Coriolis uses a fixed directory from the user's root."; \
echo "You must put in:"; \ echo "You must put in:"; \
echo " <${HOME}/coriolis-2.x/src/coriolis>"; \ echo " <${CORIOLIS_SRC}>"; \
echo "Instead of:"; \ echo "Instead of:"; \
echo " <`pwd`>"; \ echo " <`pwd`>"; \
echo "Stopping build."; \ echo "Stopping build."; \
@ -58,37 +52,53 @@ check_dir:
fi fi
check_venv: $(HOME)/.local/bin/pdm:
@if [ ! -d "./venv" ]; then python3 -m venv venv; fi @pip install pdm
pdm_deps: check_venv $(CORIOLIS_SRC)/.pdm-plugins/bin/pdm: $(HOME)/.local/bin/pdm
@$(venv); pdm install --no-self @$(localpath) pdm install --no-self -d --plugins
install: check_dir pdm_deps install: check_dir $(CORIOLIS_SRC)/.pdm-plugins/bin/pdm
@meson setup $(WORK_ROOT)/build @$(localpath) pdm run meson setup ${BUILDDIR} --prefix=$(PREFIX) -Dpython.install_env=prefix
@meson configure $(WORK_ROOT)/build --prefix $(WORK_ROOT)/install @$(localpath) pdm run ninja -C $(BUILDDIR) install
@ninja -v -C $(WORK_ROOT)/build install
@echo ""; \ @echo ""; \
echo "============================================================================"; \ echo "============================================================================"; \
echo "Coriolis has been successfully built"; \ echo "Coriolis has been successfully built"; \
echo "============================================================================"; \ echo "============================================================================"; \
echo "It has been installed under the directory:"; \ echo "It has been installed under the directory:"; \
echo " $(INST_ROOT)/{bin,lib,lib64,include,share,...}"; \ echo " $(PREFIX)/{bin,lib,lib64,include,share,...}"; \
echo ""; \
echo "You can start the tool by running:"; \
echo " ego@home:~> $(INST_ROOT)/bin/coriolis"; \
echo "============================================================================"; echo "============================================================================";
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
clean_build: check_dir clean_build: check_dir
@echo "Removing the build tree only."; \ @echo "Removing the build tree only."; \
echo " $(INST_ROOT)/../build"; \ echo " $(BUILDDIR)"; \
rm -rf $(INST_ROOT)/../build 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
uninstall: check_dir uninstall: check_dir
@echo "Removing the whole build & install tree..."; \ @echo "Removing the whole build & install tree..."; \
echo " $(ISYS_ROOT)"; \ @$(localpath) pdm run ninja -C $(BUILDDIR) uninstall
rm -rf $(ISYS_ROOT)

View File

@ -210,18 +210,19 @@ class YosysCommand ( CommandArg ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, alcBin, fdLog=None ): def __init__ ( self, fdLog=None ):
CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog ) CommandArg.__init__ ( self, [ 'make'
, '-f', 'Makefile.LIP6'
, 'install_alliance' ], fdLog=fdLog )
return return
class CoriolisCommand ( CommandArg ): class CoriolisCommand ( CommandArg ):
def __init__ ( self, ccbBin, rootDir, threads=1, otherArgs=[], fdLog=None ): def __init__ ( self, rootDir, threads=1, otherArgs=[], fdLog=None ):
CommandArg.__init__ ( self, [ ccbBin CommandArg.__init__ ( self, [ 'make'
, '--root='+rootDir , '-f', 'Makefile.LIP6'
, '--project=coriolis' , 'install'
, '--make=-j{} install'.format(threads)
] + otherArgs ] + otherArgs
, fdLog=fdLog ) , fdLog=fdLog )
return return
@ -333,7 +334,6 @@ class Configuration ( object ):
self._chrootMode = None self._chrootMode = None
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._ccbBin = None
self._benchsDir = None self._benchsDir = None
self._masterHost = self._detectMasterHost() self._masterHost = self._detectMasterHost()
self._success = False self._success = False
@ -377,8 +377,6 @@ class Configuration ( object ):
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._yosysBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/yosysInstaller.sh' self._yosysBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/yosysInstaller.sh'
self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
self._masterHost = self._detectMasterHost() self._masterHost = self._detectMasterHost()
return return
@ -444,7 +442,7 @@ class Configuration ( object ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:' raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' "{}"'.format(self.alcBin) , ' "{}"'.format(self.alcBin)
] ) ] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) ) commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
raise ErrorMessage( 1, [ 'Cannot find <ccb.py>, should be here:' raise ErrorMessage( 1, [ 'Cannot find <ccb.py>, should be here:'
@ -453,19 +451,9 @@ class Configuration ( object ):
otherArgs = [] otherArgs = []
if self.debugArg: otherArgs.append( self.debugArg ) if self.debugArg: otherArgs.append( self.debugArg )
if target == 'EL9': if target == 'EL9':
#otherArgs.append( '--project=support' ) commands.append( CoriolisCommand( self.rootDir, 3, fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
#commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if target == 'SL7_64':
otherArgs += [ '--project=support', '--qt4' ]
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
elif target == 'SL6_64' or target == 'SL6':
otherArgs += [ '--project=support', '--devtoolset=8', '--qt4' ]
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10': elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10':
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
if self.doBenchs: if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
if self.doPyBenchs: if self.doPyBenchs: