I missed to forward this message ...
--- Begin Message ---
Hi,
in the changelog you wrote
> * Apparently we do have a problem with dpkg-dev-1.9, which does
> create control files with missing 'Architecture:' lines. Fixes
> are welcome.
The following patch fixes the problem for a native build,
but will probably break on cross compiles:
--- ORIG/debian/rules.defs Sat May 5 19:05:46 2001
+++ ./debian/rules.defs Sat May 5 18:43:46 2001
@@ -33,9 +33,6 @@
# architecture dependent variables
#DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
-ifneq ($(TARGET),native)
-DEB_HOST_ARCH = $(TARGET)
-endif
DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
Anyway, here's what goin' on.
Try the following Makefile and Makefile2:
--- Makefile ---
include Makefile2
foo: foo2
$(MAKE) foo2 TARGET=native
foo2:
@echo --- make DEB_HOST_ARCH=$(DEB_HOST_ARCH)
@echo --- env DEB_HOST_ARCH=$${DEB_HOST_ARCH-unset}
--- Makefile2 ---
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq ($(TARGET),native)
DEB_HOST_ARCH = $(TARGET)
endif
and then
$ make foo
--- make DEB_HOST_ARCH=
--- env DEB_HOST_ARCH=unset
make foo2 TARGET=native
--- make DEB_HOST_ARCH=i386
--- env DEB_HOST_ARCH=unset
but when invoked from dpkg-buildpackage, DEB_HOST_ARCH is already
set in the environment, so let's try
$ DEB_HOST_ARCH=i386 make foo
--- make DEB_HOST_ARCH=
--- env DEB_HOST_ARCH=
make foo2 TARGET=native
--- make DEB_HOST_ARCH=
--- env DEB_HOST_ARCH=
Ouch! Now DEB_HOST_ARCH is set to an empty string in the environment.
With this setting dh_gencontrol will produce control files without
Architecture: lines. If you issue the dh_gencontrol by hand or
via `make -f debian/rules ...' DEB_HOST_ARCH isn't spilled into the
environment and the generated control files are OK.
DEB_HOST_ARCH gets its empty value from make which promotes
make variables that are already in the environment, but with
the value that has been assigned in the makefile:
(1) $ DEB_HOST_ARCH=i386 make foo
value OK in env
(2) Makefile2: DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
= 'i386', still OK for make
(3) Makefile2: DEB_HOST_ARCH =
because TARGET = '' (!= 'native')
(4) $(MAKE) foo2 TARGET=native
empty value passed via environment
(5) Makefile2: DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
= '' because `DEB_HOST_ARCH=fubar dpkg-architecture -qDEB_HOST_ARCH´
print 'fubar'
(6) Makefile2: now TARGET=native, so unchanged
(7) still empty in make file, passed in environment to commands
Cheers, Roderich
--
"Report all obscene mail to your Potsmaster"
Roderich Schupp mailto:[EMAIL PROTECTED]
ExperTeam GmbH http://www.experteam.de/
Munich, Germany
--- End Message ---