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

Re: [rules] "config:" -> "build:" -> "stage:" -> "binary:"

On Fri, Jul 23, 1999 at 11:08:34PM -0700, Karl M. Hegbloom wrote:
> >>>>> "Marcus" == Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:
> >>>>> On Mon, Jul 19, 1999 at 06:31:08AM -0700, Karl M. Hegbloom wrote:
>     karlheg> I like to have a "debian/rules config" target distinct
>     karlheg> from the "build" target.
>     Marcus> Definitely. I am always annoyed by rules files that start
>     Marcus> to clean the source when I want to continue on an
>     Marcus> interrupted target (while trying to make it work on the
>     Marcus> Hurd). Ideally, we would just continue were we broke, or,
>     Marcus> at least, start from a point that is not too time
>     Marcus> consuming.
>  Yes.  I've got XEmacs set up so that it ought to config and build
>  fine on Hurd with no changes. (x-fingers, 10 iterations... then a few
>  more it'll work this times...)  Hurd has `uname -s' and `tr', right?
>  (of course it does; don't answer that.)
>  On my box, it'll config as `i386-debian-linux', and if I ran Hurd, it 
>  would be ... (guessing) `i386-debian-hurd'.

That's completely wrong :)

Sorry, but you should have taken a look at the recent packaging manual,
section 3.1.8 and 3.2.1. The debian/rules make file will get the following
make variables passed on by dpkg-buildpackage:


The difference between build and host is for cross compilation purpose.
The *_ARCH is the Debian name (i386, hurd-i386, alpha etc).
GNU_SYSTEM = $GNU_CPU-$GNU_TYPE is the GNU architecture specification

Please, this is important to make this work: Do not mess around with uname
and other stuff. Just accept the above make variables, and everything will
work fine. You should not use "debian" as the vendor by the way, see
Debian policy section 5.1

To support old packaging build, insert:

DEB_BUILD_ARCH := $(shell dpkg --print-installation-architecture)
DEB_BUILD_GNU_CPU := $(patsubst hurd-%,%,$(DEB_BUILD_ARCH))
ifeq ($(filter-out hurd-%,$(DEB_BUILD_ARCH)),)


at the top of the make file. As you can see, the correct name is
"i386-gnu" for the Hurd. Don't use "dpkg --print-architecture", don't use
"dpkg --print-gnu-build-architecture".

I will comment on the rest of your mail later, but this was too important so
I answered this right now before going offline again.

BTW, the new dpkg-architecture tool is part of policy but not of dpkg yet. A
patch is available in the bug Reports, but our Keen DPKG Maintainer (tm) has
not released a new version since... I forgot counting

Please see http://bugs.debian.org/33659


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

Reply to: