On 22.04.2015 09:32, Roman Cheplyaka wrote:
I made a minimal self-contained example, so that you don't need to
install Haskell and stuff: https://github.com/feuerbach/tup-test If
you run tup there, it'll fail with the above error. But if you swap
the lines around in the tupfile, it'll succeed. Roman
It seems commands in one Tupfile need to be ordered, tup only deals with
ordering between separate Tupfiles. Order-only inputs are however
necessary for parallel builds.
I guess the best person to answer your question and tell us whether it
was a deliberate design decision or just something that is not yet
implemented is Mike Shal, but - unfortunately - lately he rarely joins
the discussion...
There is one feature of tup that would allow you to do what you want -
<groups>. IMO it's one of the most important features of tup, but it's
not yet documented... For more info you need to check test/ folder of
the repository and search for "group" in the names. For example this one
does exactly what you want -
https://github.com/gittup/tup/blob/master/test/t3050-group-ordering.sh
So if you change your Tupfile like this:
: B.hs | <A.hi> |> ./compile B.hs |> B.o B.hi
: A.hs |> ./compile A.hs |> A.o A.hi <A.hi>
it will work the way you want it:
Konsole output
$ tup
[ tup ] [0.000s] Scanning filesystem...
tup warning: generated file 'A.o' was deleted outside of tup. This
file may be re-created on the next update.
tup warning: generated file 'B.hi' was deleted outside of tup. This
file may be re-created on the next update.
[tup ] [0.088s] Reading in new environment variables...
[tup ] [0.088s] No Tupfiles to parse.
[tup ] [0.088s] No files to delete.
[tup] [0.088s] Executing Commands...
1) [0.005s] ./compile A.hs
2) [0.005s] ./compile B.hs
[] 100%
[tup ] [0.181s] Updated.
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.