From 6155d90dd13c915ac9cd437222e8a94e13387513 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 22 May 2013 17:54:32 -0700 Subject: [PATCH] better clearing of non requested or non buildable plugins --- SConstruct | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/SConstruct b/SConstruct index 65df4116d..85eca3171 100644 --- a/SConstruct +++ b/SConstruct @@ -1796,27 +1796,29 @@ if not HELP_REQUESTED: # Build the requested and able-to-be-compiled input plug-ins GDAL_BUILT = False OGR_BUILT = False - for plugin in env['REQUESTED_PLUGINS']: - details = env['PLUGINS'][plugin] - if details['lib'] in env['LIBS']: - if env['PLUGIN_LINKING'] == 'shared': - SConscript('plugins/input/%s/build.py' % plugin) - if plugin == 'ogr': OGR_BUILT = True - if plugin == 'gdal': GDAL_BUILT = True - if plugin == 'ogr' or plugin == 'gdal': - if GDAL_BUILT and OGR_BUILT: + for plugin in env['PLUGINS']: + if plugin in env['REQUESTED_PLUGINS']: + details = env['PLUGINS'][plugin] + if details['lib'] in env['LIBS']: + if env['PLUGIN_LINKING'] == 'shared': + SConscript('plugins/input/%s/build.py' % plugin) + if plugin == 'ogr': OGR_BUILT = True + if plugin == 'gdal': GDAL_BUILT = True + if plugin == 'ogr' or plugin == 'gdal': + if GDAL_BUILT and OGR_BUILT: + env['LIBS'].remove(details['lib']) + else: env['LIBS'].remove(details['lib']) + elif not details['lib']: + if env['PLUGIN_LINKING'] == 'shared': + # build internal datasource input plugins + SConscript('plugins/input/%s/build.py' % plugin) else: - env['LIBS'].remove(details['lib']) - elif not details['lib']: - if env['PLUGIN_LINKING'] == 'shared': - # build internal datasource input plugins - SConscript('plugins/input/%s/build.py' % plugin) - else: - color_print(1,"Notice: dependencies not met for plugin '%s', not building..." % plugin) - # also clear out locally built target - if os.path.exists('plugins/input/%s.input' % plugin): - os.unlink('plugins/input/%s.input' % plugin) + color_print(1,"Notice: dependencies not met for plugin '%s', not building..." % plugin) + if os.path.exists('plugins/input/%s.input' % plugin): + os.unlink('plugins/input/%s.input' % plugin) + elif os.path.exists('plugins/input/%s.input' % plugin): + os.unlink('plugins/input/%s.input' % plugin) create_uninstall_target(env, env['MAPNIK_LIB_DIR_DEST'], False) create_uninstall_target(env, env['MAPNIK_INPUT_PLUGINS_DEST'] , False) @@ -1829,7 +1831,7 @@ if not HELP_REQUESTED: if os.path.exists(plugin_path): if plugin not in env['REQUESTED_PLUGINS'] or env['PLUGIN_LINKING'] == 'static': color_print(3,"Notice: removing out of date plugin: '%s'" % plugin_path) - os.unlink(plugin_path) + os.unlink(plugin_path) # Build the c++ rundemo app if requested if env['DEMO']: