scons: only attach uninstall actions if actually uninstalling - #311

This commit is contained in:
Dane Springmeyer 2010-07-18 21:26:50 +00:00
parent a4872eb522
commit 51a791eb77
2 changed files with 20 additions and 16 deletions

View file

@ -63,6 +63,7 @@ def call(cmd, silent=False):
# http://www.scons.org/wiki/InstallTargets
def create_uninstall_target(env, path, is_glob=False):
if 'uninstall' in COMMAND_LINE_TARGETS:
if is_glob:
all_files = Glob(path,strings=True)
for filei in all_files:
@ -337,6 +338,7 @@ pickle_store = [# Scons internal variables
# Mapnik's SConstruct build variables
'PLUGINS',
'ABI_VERSION',
'MAPNIK_VERSION_STRING',
'PLATFORM',
'BOOST_ABI',
'BOOST_APPEND',
@ -1001,6 +1003,7 @@ if not preconfigured:
env['ABI_VERSION'] = abi_fallback
else:
env['ABI_VERSION'] = abi
env['MAPNIK_VERSION_STRING'] = '.'.join(['%d' % i for i in env['ABI_VERSION']])
# Common C++ flags.

View file

@ -72,7 +72,8 @@ if env['PLATFORM'] == 'Darwin':
else:
lib_path = mapnik_libname
linkflags = '-Wl,-install_name,%s' % lib_path
linkflags += ' -current_version 0.8.0 -compatibility_version 0.8.0'
_d = {'version':env['MAPNIK_VERSION_STRING']}
linkflags += ' -current_version %(version)s -compatibility_version %(version)s' % _d
elif env['PLATFORM'] == 'SunOS' and env['CXX'].startswith('CC'):
linkflags = '-R. -h %s' % mapnik_libname
else: # Linux and others