patch applied (ghc): Use /usr/bin/test if it exists, and fix test syntax.

Matthias Kilian kili at outback.escape.de
Fri Jul 10 13:17:24 EDT 2009


On Fri, Jul 10, 2009 at 10:19:20AM +0100, Simon Marlow wrote:
> >%.old: %
> >	@set -x&&  [ -f $@ ]&&  cmp -s $<  $@ || cp -p $<  $@
> >	touch $@
> >
> >And then simply change the `$(REALGOALS) all' rule to
> >
> >$(REALGOALS) all:	mk/config.mk mk/project.mk compiler/ghc.cabal
> >	@echo  "===--- updating makefiles phase 0"
[...]
> I'm afraid I don't understand how this is supposed to work... it looks 
> as if it wouldn't do anything, since you don't have a rule for 
> mk/config.mk.  The pattern rule matches mk/config.mk.old.

> What we need to do is to restore the timestamp on mk/config.mk if it has 
> been touched, but not changed, relative to mk/config.mk.old.  I don't 
> see anything in your version that does that.  I can see where you are 
> updating %.old if the new version is different, but not the crucial 
> timestamp reversal.

Yes, I missed the important bits, sorry for the noise. First, the
`$(REALGOALS) all' should depend on *.old (which is ugly), second,
the `touch $@' should be a `touch -r $@ $<', and I'm not sure wether
this works as good as the current solution.

Anyway, I'll do some testing this evening. If I find something that
actually works, I'll send a patch.

Ciao,
	Kili



More information about the Cvs-ghc mailing list