r920 - trunk/kernel/powerpc/kernel-patch-powerpc-2.6.7-2.6.7/debian
Jens Schmalzing
jensen@haydn.debian.org
Tue, 20 Jul 2004 18:01:27 -0600
Author: jensen
Date: 2004-07-20 18:01:11 -0600 (Tue, 20 Jul 2004)
New Revision: 920
Modified:
trunk/kernel/powerpc/kernel-patch-powerpc-2.6.7-2.6.7/debian/rules
Log:
Changed debian/rules to allow for partial builds all the way through.
For example, 'fakeroot debian/rules binary-flavour-powerpc-smp' will
configure, build, install, and package the powerpc-smp flavour.
Modified: trunk/kernel/powerpc/kernel-patch-powerpc-2.6.7-2.6.7/debian/rules
===================================================================
--- trunk/kernel/powerpc/kernel-patch-powerpc-2.6.7-2.6.7/debian/rules 2004-07-20 23:55:28 UTC (rev 919)
+++ trunk/kernel/powerpc/kernel-patch-powerpc-2.6.7-2.6.7/debian/rules 2004-07-21 00:01:11 UTC (rev 920)
@@ -7,6 +7,9 @@
# debhelper compatibility version
export DH_COMPAT=4
+# set the build architecture if necessary
+DEB_HOST_ARCH ?= $(shell dpkg --print-architecture)
+
# the flavours we're building for
flavours := $(shell grep -v ^\# debian/flavours)
@@ -82,7 +85,7 @@
cd $(KSOURCE); /usr/src/kernel-patches/all/$(kernel)/apply/debian
for file in $(shell debian/list patches); do patch -d $(KSOURCE) -p1 < patches/$$file; done
- $(MAKE) -s -C config default > $(KSOURCE)/.config
+ -$(MAKE) -s -C config default > $(KSOURCE)/.config
test -d $(KSOURCE)/debian || mkdir $(KSOURCE)/debian
cd debian; cp -p changelog control copyright $(KSOURCE)/debian
@@ -100,14 +103,15 @@
# create a separate build tree for a given flavour, add the flavour's
# .config and control files
-stamp-configure-flavour-$(flavour): stamp-configure-prepare
+stamp-configure-flavour-$(flavour): \
+stamp-configure-prepare
test -d $(dir $(KFLAVOUR)) || mkdir -p $(dir $(KFLAVOUR))
cp -al $(KSOURCE) $(KFLAVOUR)
rm -f $(KFLAVOUR)/.config $(KFLAVOUR)/debian/control
- $(MAKE) -s -C config $(flavour) > $(KFLAVOUR)/.config
+ -$(MAKE) -s -C config $(flavour) > $(KFLAVOUR)/.config
$(M4) debian/control-dummy.m4 > $(KFLAVOUR)/debian/control
touch $@
@@ -126,11 +130,11 @@
endif
stamp-build: \
-stamp-build-prepare \
+stamp-configure stamp-build-prepare \
$(foreach flavour,$(flavours),stamp-build-flavour-$(flavour))
touch $@
-stamp-build-prepare: stamp-configure
+stamp-build-prepare:
dh_testdir
touch $@
@@ -143,7 +147,8 @@
ifeq (1,$(MAKELEVEL))
# build the pmac kernel and the modules for a given flavour
-stamp-build-flavour-$(flavour):
+stamp-build-flavour-$(flavour): \
+stamp-configure-flavour-$(flavour) stamp-build-prepare
cd $(KFLAVOUR); make-kpkg build
touch $@
@@ -162,16 +167,20 @@
install: stamp-install
stamp-install: \
-stamp-build \
-stamp-install-prepare \
+stamp-build stamp-install-patch \
$(foreach flavour,$(flavours),stamp-install-flavour-$(flavour))
touch $@
-# do the usual checks, install the patch itself and the accompanying scripts
-stamp-install-prepare: debian/dirs debian/apply
+# do the usual checks
+stamp-install-prepare:
dh_testdir
dh_testroot
dh_clean
+
+ touch $@
+
+# install the patch itself and the accompanying scripts
+stamp-install-patch: stamp-install-prepare debian/dirs debian/apply
dh_installdirs
$(INSTALL_EXEC) debian/apply $(KPATCH)/apply/powerpc
@@ -195,7 +204,8 @@
# few things. Also, install the build infrastructure for modules from
# the kernel source.
-stamp-install-flavour-$(flavour):
+stamp-install-flavour-$(flavour): \
+stamp-build-flavour-$(flavour) stamp-install-prepare
# create and unpack the intermediate kernel image package
cd $(KFLAVOUR); make-kpkg kernel-image
@@ -299,7 +309,7 @@
# -e's/^\(my..kimage.*"vmlinu\)x/\1z/' > $(KIMAGE)/DEBIAN/$$file; \
# chmod 755 $(KIMAGE)/DEBIAN/$$file; done
-binary-kernel-image-$(kernel)-%: stamp-install
+binary-kernel-image-$(kernel)-%: stamp-install-flavour-$(flavour)
$(RECURSION) binary-image-package DH_OPTIONS=-pkernel-image-$(kernel)-$*
binary-image-package: binary-common-package
@@ -308,9 +318,9 @@
dh_md5sums
dh_builddeb
-binary-kernel-patch-%: stamp-install-prepare
+binary-kernel-patch-%: stamp-install-patch
$(RECURSION) binary-package DH_OPTIONS=-pkernel-patch-$*
-binary-kernel-%: stamp-install
+binary-kernel-%: stamp-install-flavour-$(flavour)
$(RECURSION) binary-package DH_OPTIONS=-pkernel-$*
binary-package: binary-common-package
dh_gencontrol