RE: ghc --make + #include directories

2001-11-14 Thread Simon Marlow


 Thanks to ghc --make it is now common to compile files from a 
 different directory.
 This creates a new problem, in that if a file starts with a 
 {-# include c-header.h #-}
 directive, ghc will try to find c-header.h in the current 
 directory, not in the directory
 containing the source file.  So we need a way of changing the 
 gcc include path during
 compilation of .hc files to include the directory containing 
 the source file.

What's wrong with just saying -Idir whenever you say -idir?

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: ghc --make + #include directories

2001-11-14 Thread George Russell

Simon Marlow wrote:

 What's wrong with just saying -Idir whenever you say -idir?

This seems to work but for more complicated combinations the two options have slightly 
different formats.  For example, if I have several directories separated by colons, and
end the list with a superfluous colon (which arises naturally enough when the path is
auto-computed) I get messages like:

gcc: cannot specify -o with -c or -S and multiple compilations
/home/ger/uni /usr/local/pub-bkb/ghc/ghc-latest/bin/ghc -c util/WBFiles.hs 
-iutil:cvs: -Iutil:cvs: -package concurrent -package data -package net -package posix 
-package text -package util -package lang -fglasgow-exts -fallow-overlapping-instances 
-fallow-undecidable-instances -cpp -ddump-hi-diffs -H25M -recomp -fwarn-deprecations 
-Onot -DDEBUG -fvia-Cgcc: /usr/local/pub-bkb/ghc/ghc-5.02.1/lib/ghc-5.02.1/include: 
linker input file unused since linking not done
Source file changed or recompilation check turned off
INTERFACE UNCHANGED

gcc: cannot specify -o with -c or -S and multiple compilations
[falls over]

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



RE: ghc --make + #include directories

2001-11-14 Thread Simon Marlow


 Simon Marlow wrote:
 
  What's wrong with just saying -Idir whenever you say -idir?
 
 This seems to work but for more complicated combinations the 
 two options have slightly 
 different formats.  For example, if I have several 
 directories separated by colons, and
 end the list with a superfluous colon (which arises naturally 
 enough when the path is
 auto-computed) I get messages like:

Ok, that's a bug.  In the meantime, you'll have to remove the trailing
colon.

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users