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

View file

@ -72,7 +72,8 @@ if env['PLATFORM'] == 'Darwin':
else: else:
lib_path = mapnik_libname lib_path = mapnik_libname
linkflags = '-Wl,-install_name,%s' % lib_path 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'): elif env['PLATFORM'] == 'SunOS' and env['CXX'].startswith('CC'):
linkflags = '-R. -h %s' % mapnik_libname linkflags = '-R. -h %s' % mapnik_libname
else: # Linux and others else: # Linux and others