Skip building/installing some targets when layout=debian

Do not build the shared library.
Do not build csvdiff.
Do not install install_tsc
Do not install man pages (handled by debhelper)

Skip csvdiff for Debian package

More things not installed with Debian
This commit is contained in:
Ray Speth
2012-06-05 19:56:34 +00:00
parent ec1abb55a1
commit 1fb14fc86a
4 changed files with 28 additions and 38 deletions

View File

@@ -848,8 +848,6 @@ else:
if env['layout'] == 'debian':
base = pjoin(os.getcwd(), 'debian')
env['inst_sharedlibdir'] = pjoin(base, 'libcantera2', 'usr', 'lib')
env['inst_libdir'] = pjoin(base, 'cantera-dev', 'usr', 'lib')
env['inst_incdir'] = pjoin(base, 'cantera-dev', 'usr', 'include', 'cantera')
env['inst_incroot'] = pjoin(base, 'cantera-dev', 'usr' 'include')
@@ -871,7 +869,6 @@ if env['layout'] == 'debian':
env['ct_datadir'] = '/usr/share/cantera/data'
else:
env['inst_libdir'] = pjoin(instRoot, 'lib')
env['inst_sharedlibdir'] = pjoin(instRoot, 'lib')
env['inst_bindir'] = pjoin(instRoot, 'bin')
env['inst_python_bindir'] = pjoin(instRoot, 'bin')
env['inst_incdir'] = pjoin(instRoot, 'include', 'cantera')

View File

@@ -8,11 +8,12 @@ localenv = env.Clone()
### Generate customized scripts ###
# 'setup_cantera'
v = sys.version_info
localenv['python_module_loc'] = pjoin(localenv['python_prefix'], 'lib',
'python%i.%i' % v[:2], 'site-packages')
target = build(localenv.SubstFile('setup_cantera', 'setup_cantera.in'))
install('$inst_bindir', target)
if localenv['layout'] != 'debian':
v = sys.version_info
localenv['python_module_loc'] = pjoin(localenv['python_prefix'], 'lib',
'python%i.%i' % v[:2], 'site-packages')
target = build(localenv.SubstFile('setup_cantera', 'setup_cantera.in'))
install('$inst_bindir', target)
# 'mixmaster'
if env['python_package'] == 'full':
@@ -70,4 +71,6 @@ localenv['mak_have_f2c_lib'] = '1' if localenv['build_with_f2c'] else '0'
mak = build(localenv.SubstFile('Cantera.mak', 'Cantera.mak.in'))
install('$inst_incdir', mak)
install('$inst_bindir', '#platform/posix/bin/install_tsc')
# @deprecated The install_tsc script is unused and should be removed
if localenv['layout'] != 'debian':
install('$inst_bindir', '#platform/posix/bin/install_tsc')

View File

@@ -64,21 +64,16 @@ if (localenv['use_sundials'] == 'y' and
if localenv['toolchain'] == 'mingw':
localenv.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++'])
#
# Define the name according to the environmental variable
#
if localenv['renamed_shared_libraries'] == True :
sharedName = '../lib/cantera_shared'
else:
sharedName = '../lib/cantera'
# Build the Cantera shared library using the correct name
lib = build(localenv.SharedLibrary(sharedName, libraryTargets, SPAWN=getSpawn(localenv)))
env['cantera_shlib'] = lib
localenv.Depends(lib, localenv['config_h_target'])
#
# Create an install rule for the shared library
#
install('$inst_sharedlibdir', lib)
if localenv['layout'] != 'debian':
# Define the name according to the environmental variable
if localenv['renamed_shared_libraries'] == True:
sharedName = '../lib/cantera_shared'
else:
sharedName = '../lib/cantera'
lib = build(localenv.SharedLibrary(sharedName, libraryTargets,
SPAWN=getSpawn(localenv)))
install('$inst_libdir', lib)
env['cantera_shlib'] = lib
localenv.Depends(lib, localenv['config_h_target'])

View File

@@ -2,25 +2,20 @@ from buildutils import *
Import('env', 'build', 'install')
localenv = env.Clone()
programs = [('cti2ctml', ['cti2ctml.cpp']),
('ck2cti', ['ck2cti.cpp']),
('csvdiff', ['csvdiff.cpp', 'tok_input_util.cpp', 'mdp_allo.cpp'])]
localenv.Append(CPPPATH=['#src', '#include', '#src/apps'])
llibs = env['cantera_libs']
print 'llibs = ', llibs
for name, src in programs:
def buildProgram(name, src):
prog = build(localenv.Program(target=pjoin('#build/bin', name),
source=src,
LIBS=llibs))
#prog = build(localenv.Program(target=pjoin('#build/bin', name),
# source=src,
# LIBS=['cantera']))
LIBS=env['cantera_libs']))
install('$inst_bindir', prog)
buildProgram('cti2ctml', ['cti2ctml.cpp'])
buildProgram('ck2cti', ['ck2cti.cpp'])
if env['layout'] != 'debian':
buildProgram('csvdiff', ['csvdiff.cpp', 'tok_input_util.cpp', 'mdp_allo.cpp'])
# Copy man pages
if env['INSTALL_MANPAGES']:
install('$inst_mandir', mglob(localenv, 'man', '*'))