diff --git a/playground/eclipse/wscript b/playground/eclipse/wscript index 7d53ab79..f7601a5a 100644 --- a/playground/eclipse/wscript +++ b/playground/eclipse/wscript @@ -54,6 +54,7 @@ def options(opt): def configure(conf): + conf.env.ECLIPSE_EXTRA_TARGETS = ['test', 'lint', 'foo --bar'] conf.load('eclipse') # We recurse configurations in our submodules conf.recurse(module_list) diff --git a/waflib/extras/eclipse.py b/waflib/extras/eclipse.py index ef057e8a..8e61007f 100644 --- a/waflib/extras/eclipse.py +++ b/waflib/extras/eclipse.py @@ -10,6 +10,9 @@ Usage: def options(opt): opt.load('eclipse') +To add additional targets beside standard ones (configure, dist, install, check) +the environment ECLIPSE_EXTRA_TARGETS can be set (ie. to ['test', 'lint', 'docs']) + $ waf configure eclipse """ @@ -400,6 +403,8 @@ class eclipse(Build.BuildContext): addTargetWrap('dist', False) addTargetWrap('install', False) addTargetWrap('check', False) + for addTgt in getattr(self.env, 'ECLIPSE_EXTRA_TARGETS', []): + addTargetWrap(addTgt, False) storageModule = self.add(doc, cproject, 'storageModule', {'moduleId': 'cdtBuildSystem',