[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with debian/rules



On Wed, Jan 05, 2000 at 07:43:56PM +0000, Julian Gilbey wrote:
> Also, what happens if DEB_HOST_ARCH has not been set, for example, if
> debian/rules is run manually?  You could add the following before your
> section:
> 
> ifeq ($(DEB_HOST_ARCH),)
>      DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
> endif

Usually, it is sufficient to unconditionally set

DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)

because dpkg-architecture will notice if the environment variables are set.
However, we face environment and make variables here, and if you set the
make variables but do not set the environment, you get different behaviour.
This is ill-advised anyway, as dpkg and friends will base their decision on
the environment as well. So always set the environment and make variables,
or set the environment only and unconditionally set the make variables in
the rules file like above.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
Marcus.Brinkmann@ruhr-uni-bochum.de,     marcus@gnu.org    PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       brinkmd@debian.org


Reply to: