r4203: waldi | 2005-09-14 20:57:40 +0200

Move compiler setting to package config.
 
 * debian/arch/alpha/defines, debian/arch/arm/defines,
   debian/arch/m68k/defines, debian/arch/sparc/defines:
   Add compiler setting.
 * debian/bin/gencontrol.py: Set COMPILER argument.
 * debian/lib/python/debian_linux.py: Add support for compiler setting.
 * debian/rules.real: Change MAKEFLAGS setup.
 
 r4204: waldi | 2005-09-14 21:43:27 +0200
 * debian/rules.real: Update header-install substitution.
 * debian/templates/header-install.in: Remove flavours file.
 
 r4205: waldi | 2005-09-14 21:54:56 +0200
 * debian/rules.real
   - Update post-install substitution.
   - Remove append variable.
 * debian/templates/post-install.in: Remove append substitution.

svn path=/dists/trunk/linux-2.6/; revision=4209
This commit is contained in:
Bastian Blank 2005-09-14 21:15:37 +00:00
parent 05dca86b1b
commit fe6e7f6ed9
9 changed files with 18 additions and 25 deletions

View File

@ -1,4 +1,5 @@
[base]
compiler: gcc-3.3
flavours: alpha-generic alpha-smp
suggests: aboot, fdutils

View File

@ -1,4 +1,5 @@
[base]
compiler: gcc-3.3
flavours:
footbridge
ixp4xx

View File

@ -1,4 +1,5 @@
[base]
compiler: gcc-3.3
flavours:
amiga
atari

View File

@ -1,4 +1,5 @@
[base]
compiler: gcc-3.3
flavours: sparc64 sparc64-smp
kpkg-subarch: sparc64
suggests: silo, fdutils

View File

@ -320,8 +320,9 @@ def process_real_flavour(packages, makefile, config, arch, subarch, flavour, var
makefile.append(("%s-%s-%s-%s:: %s-%s-%s-%s-real" % (i, arch, subarch, flavour, i, arch, subarch, flavour), None))
makeflags['FLAVOUR'] = flavour
if config_entry.has_key('kpkg-subarch'):
makeflags['KPKG_SUBARCH'] = config_entry['kpkg-subarch']
for i in (('compiler', 'COMPILER'), ('kpkg-subarch', 'KPKG_SUBARCH')):
if config_entry.has_key(i[0]):
makeflags[i[1]] = config_entry[i[0]]
makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()])
cmds_binary_arch = []
@ -413,8 +414,9 @@ def process_real_subarch(packages, makefile, config, arch, subarch, vars, makefl
makefile.append(("%s-%s-%s:: %s-%s-%s-real" % (i, arch, subarch, i, arch, subarch), None))
makeflags['SUBARCH'] = subarch
if config_entry.has_key('kpkg-subarch'):
makeflags['KPKG_SUBARCH'] = config_entry['kpkg-subarch']
for i in (('compiler', 'COMPILER'), ('kpkg-subarch', 'KPKG_SUBARCH')):
if config_entry.has_key(i[0]):
makeflags[i[1]] = config_entry[i[0]]
makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()])
cmds_binary_arch = []

View File

@ -27,6 +27,7 @@ class config(dict):
'arches': schema_item_list,
'available': schema_item_boolean,
'class': schema_item_string,
'compiler': schema_item_string,
'depends': schema_item_string,
'desc': schema_item_string,
'flavours': schema_item_list,

19
debian/rules.real vendored
View File

@ -16,10 +16,8 @@ DEB_BUILD_ARCH := $(shell dpkg-architecture -a$(ARCH) -qDEB_BUILD_ARCH)
#
ifeq ($(SUBARCH),none)
basedir := debian/arch/$(ARCH)
append :=
else
basedir := debian/arch/$(ARCH)/$(SUBARCH)
append := $(SUBARCH)-
endif
configs := $(notdir $(wildcard $(basedir)/config.*))
@ -40,7 +38,7 @@ include debian/rules.defs
# replaced by the flavour for which the command is run.
#
kpkg_header := HEADER_CLEAN_HOOK='$(CURDIR)/$(BUILD_DIR)/header-install-$(ARCH)-$(SUBARCH)'
kpkg_header += make-kpkg --append-to-version "$(append)$(KPKG_ABINAME)"
kpkg_header += make-kpkg --append-to-version "$(KPKG_ABINAME)"
kpkg_header += --arch $(ARCH)
kpkg_header += --stem linux
kpkg_header += --config defconfig
@ -57,11 +55,11 @@ ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
endif
setup_env := env -u ABINAME -u ARCH -u SUBARCH -u FLAVOUR -u VERSION
setup_env += DEBIAN_ABINAME=$(ABINAME) DEBIAN_FLAVOUR=$(FLAVOUR) DEBIAN_VERSION=$(VERSION)
ifdef build_makeflags
setup_env += MAKEFLAGS=$(build_makeflags)
else
setup_env += MAKEFLAGS=
setup_makeflags =
ifdef COMPILER
setup_makeflags += CC=$(COMPILER)
endif
setup_env += MAKEFLAGS="$(setup_makeflags)"
ifndef headers_dirs
headers_dirs = $(DEB_HOST_ARCH)
endif
@ -82,11 +80,7 @@ setup-subarch: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)
setup-flavour: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
$(BUILD_DIR)/header-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/header-install.in
sed -e 's,@kbpkg@,$(kbpkg),g' \
-e 's,@ksource_dir@,$(CURDIR)/$(kdir),g' \
-e 's,@flavours@,$(flavours),g' \
-e 's,@headers_dirs@,$(headers_dirs),g' \
$< > $@
sed -e 's,@headers_dirs@,$(headers_dirs),g' $< > $@
chmod u+x $@
#
# The way to make the correct package names is to make a
@ -99,7 +93,6 @@ else
endif
$(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/post-install.in
sed -e 's,@initrd_modules@,$(initrd_modules),' \
-e 's,@append_subarch@,$(append),' \
-e 's,@extra_postinstall_command@,$(extra_command),' \
-e 's,@headers_dirs@,$(headers_dirs),g' \
$< > $@

View File

@ -11,10 +11,6 @@ set -e
# archs do some *very* strange things...
rm -rf scripts
# Let's add the flavours that are built for a given arch.
# XXX: will probably need rethinking once the common headers are Arch: all.
echo @flavours@ >flavours
# XXX: once we're using a linux-headers-$(version)-$(debnum) that's Arch: all,
# we'll want to drop this bit of code. The asm-* directories should remain.

View File

@ -30,11 +30,8 @@ debhelper_post() {
# prefix is then used to form a destination directory
# to link to. For cases with subarch we need to link
# to linux-headers-$(subarch)-$(version)-$(abiname),
# not just linux-headers-$(version)-$(abiname). Note
# that the append_subarch substitution must contain a
# trailing dash, if it is non-empty.
# not just linux-headers-$(version)-$(abiname).
#
append='@append_subarch@'
prefix=$DEBIAN_VERSION-$DEBIAN_ABINAME
pkg=linux-headers-$prefix-$DEBIAN_FLAVOUR
top=$PWD/debian/$pkg