The documentation gives the following Tupfile in the section describing how to handle a generated header file:
: |> 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 That works fine in the example, but if you switch the order of the first two lines, yielding: : 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 then tup generates an error on the first rule, saying that the file triangle.h does not exist. Of course it does not exist, it is generated. Apparently it needs to know how before it is willing to accept an order-only dependency on that file. It took me a while to reduce the problems I was having to this, perhaps in part because the documentation is silent on the order dependency. It is odd that there is one and it took me a long time to realize this was the problem. (In my case, I build an executable that in turn is run by a rule to generate a header, which in turn is used to build the final executable. I must have all three in the right order or it does not work. Perhaps a note about order dependency would be useful to others. Even better, if possible simply make the rule order not relevant. -- -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/tup-users/2ea8d4ad-bb85-4ae7-8334-33d2439de175%40googlegroups.com.
