On 10/24/2014 09:22 AM, DoUno wrote:
Have a look at this project, it may be of some value:
https://github.com/DISTORTEC/distortos/blob/master/Tuprules.lua
Thanks for mentioning my project (; This may not be a good example,
because this is a project for ARM Cortex-M3 microcontroller, so it
cannot be build with regular gcc - you need to have an arm-none-eabi-gcc
toolchain in your path (there's a link for one in README.md file).
Anyway - the build files can be easily adapted to any project, so I hope
they are of some use to anyone seeking example lua-tup files. These are
not so simple as the original tup parser, but lua is way more powerful!
As for the original question, the idea of variants is just a small
modification of normal tup behavior. When you are "in" your folder
hierarchy you can issue following commands:
- "tup" - updates everything, no matter where you are,
- "tup <directory>" - updates only the outputs from the given directory
(and everything that is needed by these outputs),
- "tup <output-file-name.ext>" - updates only the specified output file
(and everything that is needed to build that file).
So in case of the distortos project mentioned above, when you are in the
main hierarchy of the project, you can - for example - issue following
commands:
- "tup",
- "tup source" - build everything from the source/ subfolder,
- "tup test" - builds everything from the test/ subfolder,
- "tup output/source/scheduler/Scheduler.o" - builds only this single file,
- ...
So variants are just directories - you specify the folder and tup
updates everything in this folder - in case of variants this
"everything" is the whole project with it's variant-specific
configuration (tup.config).
I guess "tup" command can be treated as having implicit "$(TOP_DIR)"
argument (;
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 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.