[Scons-users] generate alias list with descriptions
    Philipp Kraus 
    philipp.kraus at flashpixx.de
       
    Thu Feb 13 05:03:58 EST 2014
    
    
  
Thanks that works well. I have added a dictionary to the env with this 
structure
{ "aliasname" : "alias description" }
So I add in my build scripts
env["aliasdefinition"]["aliasname"] = "some description"
env.Alias("aliasname", …)
After the GetOption I read if exists the dictionary and add within the 
for the description
Phil
On 2014-02-07 17:37:10 +0000, Brian Fitzgerald said:
> 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
> _______________________________________________
> 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