head aches in parser/Parser.hs
duncan.coutts at worc.ox.ac.uk
Tue Aug 5 15:28:33 EDT 2008
On Tue, 2008-08-05 at 16:15 +0100, Claus Reinke wrote:
> >>> It is confusing, though, that Cabal silently uses compiler/parser/Parser.hs,
> >>> if it is meant to generate and use compiler/dist-stage/Parser.hs.
> >>> There should be a Cabal warning:
> >>> "variant of generated file in source dir, using that instead of generated file".
> >> As far as I know, if you've got compiler/parser/Parser.hs
> >> and compiler/parser/Parser.y then Cabal ignores the .hs one and
> >> pre-processes the .y one into dist/ and uses the .hs from dist.
> >> If you're finding the opposite it's a bug and we need it reported with
> >> enough details to reproduce.
> to reproduce:
> - take a recent GHC HEAD repo
> - make distclean
> - put a fake and clearly buggy parser/Parser.hs in compiler/
> - for good measure, touch parser/Parser.y.pp (old make would
> have picked up on that clue)
> - sh boot; ./configure ...; make
> If I do that, I get an error in 'parser/Parser.hs' (note the location!).
> The whole thing doesn't seem to be driven directly by Cabal, but
> via a Makefile-stage1 generated by Cabal (make log attached).
I suspect that explains the difference in behaviour. You'll have to ask
Ian or Simon about the makefile stuff.
> As I said, it would be nice to have a warning if there is a file in the
> source dir that could be generated from another file in the source
> dir (but where the generated version should be in another place),
> and the build process should say in that warning whether it uses
> or ignores such files.
More information about the Cvs-ghc