Why do I need one Tupfile for each directory?

I read a lot about tup build system .

Many places say that tup "does not support recursive rules" and that you need to have one Tupfile for each directory. But I did not see an official statement or explanation.

Is this statement correct?

If so, why and for what task is this problem? An example would be nice.

+4
source share
3 answers

It is worth noting that currently Tupfile can create files in another directory. You can always read files from different directories, so currently you can have one Tupfile for the whole project.

More information here: https://groups.google.com/d/msg/tup-users/h7B1YzdgCag/qsOpBs4DIQ8J (a bit dated) + https://groups.google.com/d/msg/tup-users/-w932WkPBkw / 7ckmHJ9WUCEJ (new syntax for using a group as input)

If you use the new LUA parser, you can also use the default Tupfile - see here http://gittup.org/tup/lua_parser.html and check the information on Tupdefault.lua

+5
source

Some answers already mentioned that the restriction is really one Tupfile in the directory where you want the output files, and not one Tupfile for each directory. In a recent commit, this restriction was relaxed , and tup allows you to place output files also in Tupfile subdirectories.

In addition, with options , you can generate output files anywhere in the build tree.

+4
source

The official expression can be found in the tup manual: http://gittup.org/tup/manual.html

You must create a file called "Tupfile" anywhere in the tup hierarchy that you want to create an output file based on the input files. input files can be anywhere in the tup hierarchy, but the output file must be written in the same directory as the tupfile.

(The quote is the first paragraph from the TUPFILES section of the manual)

AFAIK, this is a limitation that has something to do with how tup stores dependencies in subdir .tup , but I don't know the details.

+1
source

All Articles