r3752 - in people/waldi/kernel/source/linux-2.6/debian: . bin
Bastian Blank
waldi at costa.debian.org
Mon Aug 8 18:13:28 UTC 2005
Author: waldi
Date: 2005-08-08 18:13:27 +0000 (Mon, 08 Aug 2005)
New Revision: 3752
Modified:
people/waldi/kernel/source/linux-2.6/debian/Makefile
people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py
Log:
Use generated rules for binary target.
* debian/Makefile: Updates.
* debian/bin/gencontrol.py: Generate binary rules.
Modified: people/waldi/kernel/source/linux-2.6/debian/Makefile
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/Makefile 2005-08-08 18:12:17 UTC (rev 3751)
+++ people/waldi/kernel/source/linux-2.6/debian/Makefile 2005-08-08 18:13:27 UTC (rev 3752)
@@ -57,7 +57,7 @@
# in Makefile.inc. @flavour@ in the expressions is going to be
# replaced by the flavour for which the command is run.
#
-kpkg_headers_cmd := HEADER_CLEAN_HOOK='$(CURDIR)/header-install-$(subarch)'
+kpkg_headers_cmd := HEADER_CLEAN_HOOK='$(CURDIR)/header-install-$(SUBARCH)'
kpkg_headers_cmd += make-kpkg --append-to-version $(append)$(DEBNUM)
kpkg_headers_cmd += --stem linux --config defconfig
kpkg_build_cmd := make-kpkg --append-to-version $(DEBNUM)-$(FLAVOUR)
@@ -80,14 +80,6 @@
else
export_makeflags :=
endif
-#
-# Note that next variable (kpkg_image_pre) is not going to be evaluated
-# immediately. When referenced, the variable $* will have the current
-# flavour for which the command is executed. So if this flavour will
-# happen to be in the image_prefix_flavours list, the call to make-kpkg
-# will be prepended with contents if image_prefix.
-#
-kpkg_image_pre = $(if $(filter $*,$(image_prefix_flavours)),$(image_prefix))
kpkg_image_cmd := $(kpkg_build_cmd) --initrd kernel_image
kpkg_build_cmd += build
kpkg_headers_cmd += kernel-headers
@@ -95,53 +87,39 @@
headers_dirs = $(karch)
endif
ccommon = arch/config arch/$(karch)/config arch/$(karch)/$(subarch)/config
-#
-# Here we build lists of directories and stamps which we will depend on.
-# For each class of such targets there is a pattern rule which will catch
-# it and do the right thing.
-#
-bdirs := $(addprefix build-$(subarch)-, $(flavours))
-bstamps := $(addprefix build-stamp-$(subarch)-, $(flavours))
-istamps := $(addprefix install-stamp-$(subarch)-, $(flavours))
#
# Targets
#
unpack: unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
- touch $@
build: build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-binary-indep: build
-binary-arch: build headers-stamp $(istamps)
- mv *.deb ../..
+binary: install-headers-stamp-$(ARCH)-$(SUBARCH) install-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-install-stamp-$(subarch)-%: build-$(subarch)-% build-stamp-$(subarch)-%
- cp -al $< install-$*;
- cd install-$*; \
- $(export_makeflags); \
- $(strip $(kpkg_image_pre) $(kpkg_image_cmd))
- cat install-$*/debian/files >> files;
- rm -rf install-$*;
- touch install-stamp-$(subarch)-$*
+install-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=install-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+install-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+ rm -rf $(DIR)
+ cp -al build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(DIR);
+ cd $(DIR); $(export_makeflags) env -i $(kpkg_image_cmd)
+ cat $(DIR)/debian/files >> files
+ @for i in $$(awk '{ print $$1; }' $(DIR)/debian/files); do echo mv $$i ../..; mv $$i ../..; done
+ rm -rf $(DIR)
+ touch $@
-headers-stamp: $(kdir)
- # The headers config is now automatically generated via the kernel's
- # defconfig target. Woo!
- cd $(kdir); $(kpkg_headers_cmd)
+install-headers-stamp-$(ARCH)-$(SUBARCH): $(kdir) header-install-$(SUBARCH)
+ cd $(kdir); env -i PATH=$(PATH) $(kpkg_headers_cmd)
+ @for i in $$(awk '{ print $$1; }' $(DIR)/debian/files); do echo mv $$i ../..; mv $$i ../..; done
cat $(kdir)/debian/files >> files
- touch headers-stamp
+ touch $@
-binary: binary-indep binary-arch
-
-header-install-$(subarch): templates/header-install.in
+header-install-$(SUBARCH): templates/header-install.in
sed -e 's, at kbpkg@,$(kbpkg),g' \
-e 's, at ksource_dir@,$(CURDIR)/$(kdir),g' \
-e 's, at flavours@,$(flavours),g' \
-e 's, at headers_dirs@,$(headers_dirs),g' \
- templates/header-install.in > header-install-$(subarch)
- chmod u+x header-install-$(subarch)
+ templates/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...
@@ -215,8 +193,9 @@
# then be picked up and included into the linux-headers package
# by the headers-install script.
#
-build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) bin/touch.orig
- cd $<; \
+build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR) bin/touch.orig
+ cd $(DIR); \
env -i PATH=$(CURDIR)/bin:$(PATH) $(export_makeflags) \
$(kpkg_build_cmd); \
$(if $(image_postproc),$(image_postproc),true); \
@@ -231,11 +210,12 @@
#
# Creates a build directory for a particular flavour
#
-build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(kdir)
- rm -rf $@-tmp
- cp -al $(kdir) $@-tmp
- cp $< $@-tmp/.config
- mv $@-tmp $@
+unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(kdir)
+ rm -rf $(DIR)
+ cp -al $(kdir) $(DIR)
+ cp $< $(DIR)/.config
+ touch $@
binary-dummy:
dh_testdir
Modified: people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py 2005-08-08 18:12:17 UTC (rev 3751)
+++ people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py 2005-08-08 18:13:27 UTC (rev 3752)
@@ -376,6 +376,7 @@
makefile.append(("%s-%s-%s-%s:: %s-%s-%s-%s-real" % (i, arch, subarch_text, flavour, i, arch, subarch_text, flavour), None))
cmd_args = "ARCH='%s' SUBARCH='%s' FLAVOUR='%s' VERSION='%s' DEBNUM='-%s'" % (arch, subarch_text, flavour, version, flavour_vars['abiname'])
cmds_binary = []
+ cmds_binary.append(("$(MAKE) -C debian binary %s" % cmd_args,))
cmds_binary.append(("$(MAKE) -f debian/Makefile binary-dummy PACKAGES_ARG='%s'" % ' '.join(["-p%s" % i['Package'] for i in dummy_packages]),))
cmds_build = []
cmds_build.append(("$(MAKE) -C debian build %s" % cmd_args,))
More information about the Kernel-svn-changes
mailing list