Yes, it's very much possible to do these things with lua. But to me these 
operations are quite common and to involve lua scripts is a bit of a hassle 
instead o having a extra flag etc. The simplicity of tup somehow get lost when 
I need to write my own lua scripts for common operations. But maybe they are 
only common for me. These improvements would make things easier for lua newbies 
like me and probably easier when porting from other buildsystems.


> On 30 jan 2015, at 17:03, Freddie Chopin <[email protected]> wrote:
> 
>> On 01/30/2015 04:34 PM, Magnus Bodin wrote:
>> 
>> 1. Add a %F flag that gives the whole path /without/ the extension. I
>>    can't count how many times I wanted this flag.
>> 2. ...
>> 3. Some lighter versions of string manipulations. Like converting a
>>    string to upper or lower case. Replace a substring etc.
> 
> The two above are possible with LUA parser.
> 
>> 4. A way to specify a specific outputfile in rules where we have multiple 
>> output files. E.g:
> 
> This is also possible with LUA parser, because instead of the old syntax you 
> can write regular functions which take arguments, so in your function you'd 
> have easy access to both outputs if you pass them as arguments.
> 
> You can look for inspiration here - 
> https://github.com/DISTORTEC/distortos/blob/master/Tuprules.lua . The 
> functions actually still use %o and most of them don't have multiple outputs, 
> but to do what you want just replace uses of "%o" (or any other flag) with 
> the string variable output (or any variable you actually need) - from there 
> just extend the functions to use many variables (coming from function 
> arguments) in any place you want.
> 
> Regards,
> FCh
> 
> -- 
> -- 
> tup-users mailing list
> email: [email protected]
> unsubscribe: [email protected]
> options: http://groups.google.com/group/tup-users?hl=en
> --- You received this message because you are subscribed to a topic in the 
> Google Groups "tup-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/tup-users/yTVAUYsFj_E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to