diff --git a/SConstruct b/SConstruct index 2e509a0b9..96377b6b4 100644 --- a/SConstruct +++ b/SConstruct @@ -63,21 +63,22 @@ def call(cmd, silent=False): # http://www.scons.org/wiki/InstallTargets def create_uninstall_target(env, path, is_glob=False): - if is_glob: - all_files = Glob(path,strings=True) - for filei in all_files: - env.Command( "uninstall-"+filei, filei, - [ - Delete("$SOURCE"), - ]) - env.Alias("uninstall", "uninstall-"+filei) - else: - if os.path.exists(path): - env.Command( "uninstall-"+path, path, - [ - Delete("$SOURCE"), - ]) - env.Alias("uninstall", "uninstall-"+path) + if 'uninstall' in COMMAND_LINE_TARGETS: + if is_glob: + all_files = Glob(path,strings=True) + for filei in all_files: + env.Command( "uninstall-"+filei, filei, + [ + Delete("$SOURCE"), + ]) + env.Alias("uninstall", "uninstall-"+filei) + else: + if os.path.exists(path): + env.Command( "uninstall-"+path, path, + [ + Delete("$SOURCE"), + ]) + env.Alias("uninstall", "uninstall-"+path) def shortest_name(libs): name = '-'*200 @@ -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. diff --git a/src/SConscript b/src/SConscript index f2aac7aeb..b93fcf973 100644 --- a/src/SConscript +++ b/src/SConscript @@ -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