Install: change organisation of target and output directory variables

now supporting a PREFIX in addition to the INSTALLDIR.
The latter is intended for package building
This commit is contained in:
Fischlurch 2011-01-29 14:10:19 +01:00
parent 2bcc8d9ae3
commit a6810957b4
3 changed files with 11 additions and 4 deletions

View file

@ -80,6 +80,7 @@ def setupBasicEnvironment():
, LIBDIR=LIBDIR , LIBDIR=LIBDIR
, MODULES=MODULES , MODULES=MODULES
, ICONDIR=ICONDIR , ICONDIR=ICONDIR
, DESTDIR=env.subst('$INSTALLDIR/$PREFIX')
, CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root , CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root
, CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines , CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines
, CCFLAGS='-Wall -Wextra ' , CCFLAGS='-Wall -Wextra '
@ -164,9 +165,10 @@ def defineCmdlineVariables():
# ,BoolVariable('OPENGL', 'Include support for OpenGL preview rendering', False) # ,BoolVariable('OPENGL', 'Include support for OpenGL preview rendering', False)
# ,EnumVariable('DIST_TARGET', 'Build target architecture', 'auto', # ,EnumVariable('DIST_TARGET', 'Build target architecture', 'auto',
# allowed_values=('auto', 'i386', 'i686', 'x86_64' ), ignorecase=2) # allowed_values=('auto', 'i386', 'i686', 'x86_64' ), ignorecase=2)
,PathVariable('DESTDIR', 'Installation dir prefix', '/usr/local') ,PathVariable('PREFIX', 'Installation dir prefix', 'usr/local', PathVariable.PathAccept)
,PathVariable('PKGLIBDIR', 'Installation dir for plugins, defaults to DESTDIR/lib/lumiera', '',PathVariable.PathAccept) ,PathVariable('INSTALLDIR', 'Root output directory for install. Final installation will happen in INSTALLDIR/PREFIX/... ', '/', PathVariable.PathIsDir)
,PathVariable('PKGDATADIR', 'Installation dir for default config, usually DESTDIR/share/lumiera', '',PathVariable.PathAccept) ,PathVariable('PKGLIBDIR', 'Installation dir for plugins, defaults to PREFIX/lib/lumiera/modules', '',PathVariable.PathAccept)
,PathVariable('PKGDATADIR', 'Installation dir for default config, usually PREFIX/share/lumiera', '',PathVariable.PathAccept)
,PathVariable('SRCTAR', 'Create source tarball prior to compiling', '..', PathVariable.PathAccept) ,PathVariable('SRCTAR', 'Create source tarball prior to compiling', '..', PathVariable.PathAccept)
,PathVariable('DOCTAR', 'Create tarball with developer documentation', '..', PathVariable.PathAccept) ,PathVariable('DOCTAR', 'Create tarball with developer documentation', '..', PathVariable.PathAccept)
) )

View file

@ -151,7 +151,7 @@ def createPlugins(env, dir):
""" investigate the given source directory to identify all contained source trees. """ investigate the given source directory to identify all contained source trees.
@return: a list of build nodes defining a plugin for each of these source trees. @return: a list of build nodes defining a plugin for each of these source trees.
""" """
return [env.LoadableModule( '#$PLUGDIR/%s' % getDirname(tree) return [env.LoadableModule( '#$TARDIR/$MODULES/%s' % getDirname(tree)
, srcSubtree(env, tree) , srcSubtree(env, tree)
, SHLIBPREFIX='', SHLIBSUFFIX='.lum' , SHLIBPREFIX='', SHLIBSUFFIX='.lum'
) )

View file

@ -12,6 +12,7 @@
# #
LOGFILE=,valgrind.log LOGFILE=,valgrind.log
SUPPRESS=vgsuppression SUPPRESS=vgsuppression
MODULEDIR=modules
VALGRINDFLAGS=${VALGRINDFLAGS:---leak-check=yes --show-reachable=yes --demangle=yes} VALGRINDFLAGS=${VALGRINDFLAGS:---leak-check=yes --show-reachable=yes --demangle=yes}
EXECUTABLE=$1 EXECUTABLE=$1
@ -24,6 +25,9 @@ fi
PATHPREFIX=${EXECUTABLE%/*} PATHPREFIX=${EXECUTABLE%/*}
SUPPRESS="$PATHPREFIX/$SUPPRESS" SUPPRESS="$PATHPREFIX/$SUPPRESS"
# need to set a library search path, because valgrind doesn't handle DT_RUNPATH and $ORIGIN properly
export LD_LIBRARY_PATH=$PATHPREFIX/$MODULEDIR:$LD_LIBRARY_PATH
if [[ -x $SUPPRESS ]]; then if [[ -x $SUPPRESS ]]; then
if [[ $SUPPRESS -nt $SUPPRESS.supp ]]; then if [[ $SUPPRESS -nt $SUPPRESS.supp ]]; then
echo 'generating valgrind supression file...' echo 'generating valgrind supression file...'
@ -37,6 +41,7 @@ else
echo 'no suppression.' echo 'no suppression.'
fi fi
echo "running......$@" echo "running......$@"
valgrind $VALGRINDFLAGS --log-file=$LOGFILE.%p $SUPPRESSIONFLAG $@ & valgrind $VALGRINDFLAGS --log-file=$LOGFILE.%p $SUPPRESSIONFLAG $@ &