Re: Outdated GNU config (config.{sub,guess}) and autotools-dev
On Sun, 22 Jul 2001, Lars Wirzenius wrote:
> > The dh_autotools functionality is very easy to emulate. Just add:
> > -test -r /usr/share/misc/config.sub && \
> > cp -f /usr/share/misc/config.sub config.sub
> > -test -r /usr/share/misc/config.guess && \
> > cp -f /usr/share/misc/config.guess config.guess
> > to the clean target of debian/rules.
>
> Using the "-" directive to make is almost always a bad idea, as it tends
> to cause make to ignore surprising errors. For example, in this particular
> case, if the source directory happens to be mounted read-only, make will
> not stop, even if the cp command fails. This is not a particularly fatal
> error, but it is still not what should be happening. Writing those
> shell commands in the following pattern is a better idea:
>
> if [ -r /usr/share/misc/config.sub ]
> then
> cp /usr/share/misc/config.sub config.sub
> fi
>
> With this code, if the cp fails, then make will stop, as it should.
>
Build-Depend: autotools-dev
cp -a /usr/share/misc/config.sub config.sub
There is no need for special casing it, if you build-depend. Using -a, the
timestamps will be copied, so it won't fool make needlessly.
Reply to: