: |> sh gen_triangle.sh > %o |> triangle.h: foreach *.c | triangle.h |> gcc -Wall -c %f -o %o |> %B.o: *.o |> gcc %f -o %o |> hello
: foreach *.c | triangle.h |> gcc -Wall -c %f -o %o |> %B.o: |> sh gen_triangle.sh > %o |> triangle.h: *.o |> gcc %f -o %o |> hello
--
--
tup-users mailing list
email: tup-...@googlegroups.com
unsubscribe: tup-users+...@googlegroups.com
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 tup-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tup-users/2ea8d4ad-bb85-4ae7-8334-33d2439de175%40googlegroups.com.
My understanding was that order does not necessarily need to matter as rules are indeed declarative.
But, as your examples shows, it is non trivial to make tup able to understand the rules in any order.
You basically require two passes, or a way to encode glob patterns in the dependency tree. Globs can only range over files in the current directory, so that helps a bit. Now, encoding globs in the dependency tree would be funny becaus you could theoretically glob in other directories...
Tup dependency on rules order is not a fatality, but requires non-trivial patches to work.
-- G.
My understanding was that order does not necessarily need to matter as rules are indeed declarative.
But, as your examples shows, it is non trivial to make tup able to understand the rules in any order.
You basically require two passes, or a way to encode glob patterns in the dependency tree. Globs can only range over files in the current directory, so that helps a bit. Now, encoding globs in the dependency tree would be funny becaus you could theoretically glob in other directories...
Tup dependency on rules order is not a fatality, but requires non-trivial patches to work.
-- G.
On 8/09/19 20:57, Todd Doucet wrote:
Looking into some more, I guess tup has the idea that the rules generally are executed in order and that is a design decision that goes beyond order-only dependencies.
For example, even without any order-only dependencies, the following two Tupfiles would do different things (only the order of the lines is swapped):
First:: foreach *.cpp |> g++ -Wall -c %f -o %o |> %B.o
: *.o |> g++ %f -o %o |> hello
Second:: *.o |> g++ %f -o %o |> hello
: foreach *.cpp |> g++ -Wall -c %f -o %o |> %B.o
The first one would build the target “hello”, but the second one would not.
So I gather that one thinks of a Tupfile as a kind of build script with annotations and wildcards and similar, really designed to be executed in sequence. That might be in the docs even; I am quite new with tup.
If that is right, then my suggestion to make the order-only dependency not matter probably would not make much sense. Order is supposed to matter, for normal everyday things, if I understand it right.
--Todd
unsubscribe: tup-...@googlegroups.com
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 tup-...@googlegroups.com.
unsubscribe: tup-users+...@googlegroups.com
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 tup-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tup-users/8a4601db-4da4-4182-bbd5-751f45938b50%40googlegroups.com.
I thought Tup1) will collect all the possible dependency implicitly and explicitly, including commands and files and their interactions.2) tell users of missing dependency and help different developers without the background information to manage a large codebase dependency3) Thus that I can have fearless parallel build and consistent artifacts state for every same commit.But reading your feedback shows me that Tup is not that intelligent yet, as least for rules parsing.Is the statement correct?
To view this discussion on the web visit https://groups.google.com/d/msgid/tup-users/8a4601db-4da4-4182-bbd5-751f45938b50%40googlegroups.com.