[Scons-users] generate alias list with descriptions
Brian Fitzgerald
bfitz at blizzard.com
Fri Feb 7 12:37:10 EST 2014
We do this with this bit of code at the end of the SConstruct, and it's quite possible it was cribbed from the SCons wiki.
First, this bit for setting an option
AddOption('--aliases',
dest='aliases',
action='store_true',
default=False,
help='List all available build targets')
and then this to actually show the aliases (we have a special call-out for the most important aliases, and if we were clever, we'd not print those twice, but it's not that important):
if GetOption('aliases'):
print 'Available Build Aliases:'
print '-----'
aliases = SCons.Node.Alias.default_ans.keys()
aliases.sort()
for x in aliases:
print x
print ''
print 'Build Groups:'
print '-----'
for x in filter(lambda x: 'build_' in x, aliases):
print x
Exit(0)
-----Original Message-----
From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of Philipp Kraus
Sent: Friday, February 07, 2014 1:09 AM
To: SCons mailing list users
Subject: [Scons-users] generate alias list with descriptions
Hello,
I have got a project with a lot of alias definitions. I would like to generate a list (for usability) which creates the alias name and a short description of the alias. How can I do this, is there some build-in support?
Thanks
Phil
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list