Hi again,

Fuck! The problem is different indeed!
As Patrick pointed out earlier, the problem with the import-paths is the -M 
run, not the normal compilation run.
/usr/bin/ghc -M wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs  \
  -iout/wxcore/imports -Iwxc/include
works fine with ghc-6.2, but ghc-6.4:
Could not find module `Graphics.UI.WXCore.WxcObject'
Therefore Patrick suggested to include -iwxcore/src/
However it should not be necessary for ghc, but I see why it needs it to 
produce the spurious line :-)
 Simon?

Another bug in ghc!
/usr/bin/ghc -M wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs  \
  -iout/wxcore/imports -Iwxc/include -iwxcore/src \
  -odir out/wxcore/imports/Graphics/UI/WXCore/
produces (among others):
out/wxcore/imports/Graphics/UI/WXCore//Graphics/UI/WXCore/WxcClassTypes.o : \ wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs
where you see that the -odir is not handled correctly.

Now I see the reason why I added the source directories to the import 
search-path in general. The current appoach for the depfiles (until the -odir 
thing is fixed):
 - include -isourcepath and NO -odir
 - use grep to get rid of the spurious dependency lines
 - use the old approach for renaming
(patch attached)

Cheers,
        Georg

On Thu, 17 Feb 2005 15:54:00 +0100, Daan Leijen <[EMAIL PROTECTED]> wrote:

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

This seems indeed much more sensible. I'll try this out with ghc 6.2.2.

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.

Simon??

Thanks again for your bug fixing,
-- Daan.




--

---- Georg Martius,  Tel: (+49 34297) 89434 ----
------- http://www.flexman.homeip.net ---------

Attachment: makefile.lib.diff
Description: Binary data

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to