Re: RFC: Exclude config.sub and config.guess from
On Mon, Feb 11, 2008 at 04:42:34PM +0100, David Paleino wrote:
> Il giorno Mon, 11 Feb 2008 15:19:08 +0100 Daniel Leidert <firstname.lastname@example.org> ha scritto:
> > Copy the config.* scripts after the clean target has been called (e.g.
> > in the config.status target) then they are simply not part of the
> > diff.gz. Of course they would be after a second build run. If you care
> > and if you want to avoid this: preserve the original config.* scripts
> > and put them back in the clean-target. This increases the whole
> > debian/rules file for around 4 lines.
> > This *is* much more easier than any other suggestion I read in this
> > thread.
>  I know that using "[ ! test ] || ..." is pretty awkward, but it
> didn't work with "[ test ] &&". Maybe "&&" should be escaped somehow?
> I don't really know.
A set -e shell script doesn't terminate if a nonzero return value is a
part of a conditional/test. However in a makefile, the exit status of
the shell can be nonzero even if it was a due to a test "failing", so
you have to use [ ! ] || and not the more readable [ ] &&, since the sh
-c '' will still exit 1. For the same reason, you need to explicitly
exit 0 at the end of some scripts:
[ ] && foo
# Necessary due to the test