Rendaw,
Thanks for your prompt response. I've both relished and dreaded the
opportunity to migrate to the lua parser ever since it's been merged into
the main branch of Tup... Relished, due to the potential afforded by
switching to a more expressive and powerful backend language. Dreaded
because the extent of my knowledge of lua is limited to cutting and pasting
lines of code into my Awesome WM config file.
> I support trying the lua parser! Here's a a simple example that should do
> what you want:
> for index, filename in ipairs(tup.glob('*.cc')) do
> if not string.find(filename, 'flycheck_') then
> tup.rule(filename, 'gcc %f -o %B.o', '%B.o')
> end
> end
>
>
Thanks for this sample code. This is definitely a major help and push
forward (who knows how long it would have taken me to figure out something
like this...)
> Of course, you'd have to fill in the blanks with your own compile
> statement. The loop could be nicer, with a goto-continue or something, or
> you could wrap tup.glob in a function to add filtering. Also, the natural
> analogue to bang-rules are functions.
>
> If you have other Lua questions I'd be glad to help (if I can).
>
>
Thanks for your help. I'm going to have to go through the documentation
online in a bit more detail for now -- truly, my build rules are extremely
simple, so it should not be a major challenge to convert them over to the
lua format.
I'll advise if I run into any difficulties.
Thanks again,
Shmuel
--
--
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.