On 04/22/2015 03:30 PM, Roman Cheplyaka wrote:
On 22/04/15 06:15, Spooge wrote:
On 04/22/2015 04:00 AM, [email protected] wrote:
Hi,
I tried writing (actually, generating) a Tupfile, and it is my
impression that rules that generate files must precede rules that use
those generated files. Is that correct?
I was a bit surprised by this, since it's usually a build system's
task to perform topological sorting.
If you specify generated file dependencies in the rule, Tup should order
them for you automatically. Tup should also give you an error if you
are missing required dependencies.
Thanks for the answer. Then I must be doing something wrong.
My Tupfile is attached. Here's the error I'm seeing with it:
tup error: Explicitly named file 'Tasty.hi' not found in subdir 'Test'
tup error: Error parsing Tupfile line 2
Line was: ': example/ex.hs | Test/Tasty.hi |> zsh -c 'ghc -c
example/ex.hs' |> example/ex.hi example/ex.o'
Given that Test/Tasty.hi is listed as a generated file on the next line,
why is tup expecting it to be in the filesystem?
Roman
That looks like it should work to me.
I'm unfamiliar with Haskell, but does "ghc -c Test/Tasty.hs" produce
"Tasty.hi" in the current dir or in the "Test" subdir?
Another thing you could try is running the line that generates Tasty.hi
alone (delete all the other lines) and see if it completes successfully.
Also, do you have existing build output in the directories? That might
confuse things - you can use a variant to see if that's a problem.
Either way though, I think something strange is happening. Yours is a
very basic use case and I've definitely done similar things with no
issues. If you don't have any hardware issues and there's a Tupfile
mistake, Tup should probably display an error.
I'd be glad to try it myself too if the code is somewhere I could get it.
Cheers,
Rendaw
--
--
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.