better clearing of non requested or non buildable plugins

This commit is contained in:
Dane Springmeyer 2013-05-22 17:54:32 -07:00
parent 427308d654
commit 6155d90dd1

View file

@ -1796,27 +1796,29 @@ if not HELP_REQUESTED:
# Build the requested and able-to-be-compiled input plug-ins # Build the requested and able-to-be-compiled input plug-ins
GDAL_BUILT = False GDAL_BUILT = False
OGR_BUILT = False OGR_BUILT = False
for plugin in env['REQUESTED_PLUGINS']: for plugin in env['PLUGINS']:
details = env['PLUGINS'][plugin] if plugin in env['REQUESTED_PLUGINS']:
if details['lib'] in env['LIBS']: details = env['PLUGINS'][plugin]
if env['PLUGIN_LINKING'] == 'shared': if details['lib'] in env['LIBS']:
SConscript('plugins/input/%s/build.py' % plugin) if env['PLUGIN_LINKING'] == 'shared':
if plugin == 'ogr': OGR_BUILT = True SConscript('plugins/input/%s/build.py' % plugin)
if plugin == 'gdal': GDAL_BUILT = True if plugin == 'ogr': OGR_BUILT = True
if plugin == 'ogr' or plugin == 'gdal': if plugin == 'gdal': GDAL_BUILT = True
if GDAL_BUILT and OGR_BUILT: if plugin == 'ogr' or plugin == 'gdal':
if GDAL_BUILT and OGR_BUILT:
env['LIBS'].remove(details['lib'])
else:
env['LIBS'].remove(details['lib']) 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: else:
env['LIBS'].remove(details['lib']) color_print(1,"Notice: dependencies not met for plugin '%s', not building..." % plugin)
elif not details['lib']: if os.path.exists('plugins/input/%s.input' % plugin):
if env['PLUGIN_LINKING'] == 'shared': os.unlink('plugins/input/%s.input' % plugin)
# build internal datasource input plugins elif os.path.exists('plugins/input/%s.input' % plugin):
SConscript('plugins/input/%s/build.py' % plugin) os.unlink('plugins/input/%s.input' % 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)
create_uninstall_target(env, env['MAPNIK_LIB_DIR_DEST'], False) create_uninstall_target(env, env['MAPNIK_LIB_DIR_DEST'], False)
create_uninstall_target(env, env['MAPNIK_INPUT_PLUGINS_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 os.path.exists(plugin_path):
if plugin not in env['REQUESTED_PLUGINS'] or env['PLUGIN_LINKING'] == 'static': if plugin not in env['REQUESTED_PLUGINS'] or env['PLUGIN_LINKING'] == 'static':
color_print(3,"Notice: removing out of date plugin: '%s'" % plugin_path) 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 # Build the c++ rundemo app if requested
if env['DEMO']: if env['DEMO']: