From af95f5e28d656f291853cafb2b6fbc9ee27bc0ba Mon Sep 17 00:00:00 2001 From: Jurij Smakov Date: Thu, 19 May 2005 23:10:25 +0000 Subject: [PATCH] Fixed the generation of config files for all cases. Minor corrections to the documentation. svn path=/branches/kernel-image-2.6.11/; revision=3198 --- README | 7 +++--- TODO | 2 -- debian/rules.subarch | 52 +++++++++++++++++++++++--------------------- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/README b/README index caf0ee420..6c126fc0f 100644 --- a/README +++ b/README @@ -28,8 +28,6 @@ For architecture without subarches: For architecture with subarches: - y concatenating: - arch/config.common arch//config.common arch///config.common @@ -89,8 +87,9 @@ this file include the setting of the following variables: include_common_config - Setting it to 'no' will prevent the common kernel config from being - included for this particular architecture. Typical usage: + Setting it to 'no' (without quotes) will prevent the common kernel + config from being included for this particular architecture. + Typical usage: include_common_config := no diff --git a/TODO b/TODO index 2a92e0c80..e0f8f14e8 100644 --- a/TODO +++ b/TODO @@ -11,5 +11,3 @@ Major TODO items remaining: * Various remaining kludges (stripping and sparc32/sparc64 stuff on sparc, for example). - -* Config file generation for arches with subarches is probably broken. diff --git a/debian/rules.subarch b/debian/rules.subarch index d623efcd8..6a28eee95 100755 --- a/debian/rules.subarch +++ b/debian/rules.subarch @@ -20,17 +20,20 @@ ifeq (,$(DEB_HOST_ARCH)) endif export version debnum DEBIAN_UPSTREAM_VERSION -karch := $(DEB_HOST_ARCH) +karch := $(DEB_HOST_ARCH) +# +# Build the list of common config files to be included +# ifeq ($(subarch),none) basedir := arch/$(karch) else basedir := arch/$(karch)/$(subarch) endif -default := $(basedir)/config.default -configs := $(notdir $(wildcard $(basedir)/config.*)) -configs := $(filter-out config.common config.default, $(configs)) -tkdir := kernel-source-$(version) -kdir := kernel-source-$(version)-$(subarch) +default := $(basedir)/config.default +configs := $(notdir $(wildcard $(basedir)/config.*)) +configs := $(filter-out config.common config.default, $(configs)) +tkdir := kernel-source-$(version) +kdir := kernel-source-$(version)-$(subarch) ifndef flavours flavours := $(patsubst config.%,%,$(configs)) endif @@ -68,7 +71,10 @@ kpkg_headers_cmd += kernel-headers ifndef headers_dirs headers_dirs = $(karch) endif - +ifneq (no,$(include_common_config)) + ccommon := arch/config.common +endif +ccommon += arch/$(karch)/config.common arch/$(karch)/$(subarch)/config.common # # TODO: # * Check that make oldconfig does not actually @@ -136,7 +142,10 @@ header-install-$(subarch): header-install.in -e 's,@headers_extra@,$(headers_extra),g' \ header-install.in > header-install-$(subarch) chmod u+x header-install-$(subarch) - +# +# The way to make the correct package names is to make a +# subarch-specific post-install script... +# post-install: post-install.in sed -e 's,@initrd_modules@,$(initrd_modules),' \ post-install.in > post-install @@ -147,25 +156,18 @@ post-install: post-install.in # and subarch specific one (arch/$(karch)/config.subarch). # It is possible to avoid the inclusion of the arch-indep # config file by setting include_common_config = no in the -# arch/$(karch)/Makefile.inc. Absense of any of the above -# files is ignored. +# arch/$(karch)/Makefile.inc. # config.%: - @echo -n "Generating configuration file $@ ..." - arch='$(basedir)/config.common'; \ - subarch='$(basedir)/$@'; \ - include=''; \ - if [ '$(include_common_config)' != 'no' ]; then \ - include='arch/config.common'; \ - fi; \ - if [ -f "$${arch}" ]; then \ - include="$${include} $${arch}"; \ - fi; \ - if [ -f "$${subarch}" ]; then \ - include="$${include} $${subarch}"; \ - fi; \ - cat $${include} > $@ - @echo " done." + @echo "Generating configuration file $@:" + rm -f $@ + for i in $(ccommon); do \ + if [ -f $${i} ]; then \ + cat $${i} >> $@; \ + fi; \ + done +# Flavour config file must be present + cat $(basedir)/$@ >> $@ # # TODO: subarch specific patches #