On Thu, 17 Feb 2005 14:48:11 +0100, Daan Leijen <[EMAIL PROTECTED]> wrote:
Georg Martius wrote:
Hi,
Patrick and I found some answers to the questions/problems we encountered.
Finally got the thing to work. (patches appended)
Great!
I have a possible fix:
add -odir out/... to the call of ghc -M. This produces correct paths
for the .o files.
Ok, this makes sense and, importantly, it also works for older ghc's
use "grep" to filter module A
Problem: the .hi files have still the source path.
Question @Daan: Why do they have to by in out/...? It seams to
complicate the thing.
Solution: "sed"
I fixed that in "makefile.lib".
I do not understand what you are saying here. Can you explain in more
detail? What is the issue with .hi files?
example:
src/A.hs (import src/B.hs with "import B")
ghc -M -odir out
depfile:
out/B.o: src/B.hs -- this line is new, as said before
out/A.o: src/A.hs
out/A.o: src/B.hi -- this line referes to a .hi, which is not there, it is
under out/B.hs
The original code in the makefile.lib replaced
(basename input.hs) with (basename output.o)
and
*.hi with *.o
which is a quite weird approach to the problem. I'am not sure but I think the
new approach is better:
let the .o files be correct through the -odir flag
replace (dir input)/FILE.hi with (dir output)/$FILE.o
However it is just a guess. The thing is that we have no rules for *.hs to
*.hi. If so it would be easier.
A more general question: We doesn't -ohi dir/filename.hi is not reflected in
the dependencies.
I tried:
ghc -M -odir out -ohi out/A.hi A.hs
but nothing changed.
2. correct import-search path
the make file calls ghc from the wxHaskell-root. Therefore
-icurrent/source/path has to be included. I fixed that in "makefile".
This is weird. It works with ghc-6.2.2, so there should not be an
extra include path. All files are referenced by absolute paths
everywhere! (that's why I use sed in the first place to process .d files)
Okay it was my fault.
If all dependencies are resolved correctly then it works fine, also with
ghc-6.4. Sorry!
The -i$({WXD|WXCORW|...}-SRCDIR) flags can be removed from the makefile.diff.
Cheers,
Georg
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users