r3748 - in people/waldi/kernel/source/linux-2.6/debian: . bin

Bastian Blank waldi at costa.debian.org
Mon Aug 8 17:03:33 UTC 2005


Author: waldi
Date: 2005-08-08 17:03:32 +0000 (Mon, 08 Aug 2005)
New Revision: 3748

Modified:
   people/waldi/kernel/source/linux-2.6/debian/Makefile
   people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py
   people/waldi/kernel/source/linux-2.6/debian/rules
Log:
Use generated rules for build.

* debian/Makefile
  - Updates.
  - Generate bin/touch.orig.
* debian/bin/gencontrol.py: Generate build rules.
* debian/rules: Remove bin/touch.orig creation.


Modified: people/waldi/kernel/source/linux-2.6/debian/Makefile
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/Makefile	2005-08-08 16:22:29 UTC (rev 3747)
+++ people/waldi/kernel/source/linux-2.6/debian/Makefile	2005-08-08 17:03:32 UTC (rev 3748)
@@ -10,8 +10,6 @@
 # This Makefile is run from the debian subdir. 
 #
 SHELL  := sh -e
-debver := $(version)-$(abiname)
-debnum := -$(abiname)
 #
 # These variables control the behaviour of make-kpkg
 #
@@ -26,7 +24,7 @@
 ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
   cross_compile := $(DEB_HOST_ARCH)
 endif
-export version debnum DEBIAN_UPSTREAM_VERSION DEBIAN_STEM
+export version DEBIAN_UPSTREAM_VERSION DEBIAN_STEM
 
 karch := $(DEB_HOST_ARCH)
 #
@@ -60,9 +58,9 @@
 # replaced by the flavour for which the command is run. 
 #
 kpkg_headers_cmd := HEADER_CLEAN_HOOK='$(CURDIR)/header-install-$(subarch)'
-kpkg_headers_cmd += make-kpkg --append-to-version $(append)$(debnum)
+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)- at flavour@
+kpkg_build_cmd := make-kpkg --append-to-version $(DEBNUM)-$(FLAVOUR)
 kpkg_build_cmd += --stem linux
 ifdef build_subarch
   kpkg_build_cmd += --subarch $(build_subarch)
@@ -78,9 +76,9 @@
   kpkg_headers_cmd += --subarch $(headers_subarch)
 endif
 ifdef build_makeflags
-  export_makeflags := export MAKEFLAGS=$(build_makeflags)
+  export_makeflags := MAKEFLAGS=$(build_makeflags)
 else
-  export_makeflags := true
+  export_makeflags :=
 endif
 #
 # Note that next variable (kpkg_image_pre) is not going to be evaluated
@@ -113,9 +111,7 @@
 unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 	touch $@
 
-build: build-stamp-$(subarch)
-build-stamp-$(subarch): unpack-stamp-$(subarch) $(bstamps)
-	touch build-stamp-$(subarch)
+build: build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 
 binary-indep: build
 binary-arch: build headers-stamp $(istamps)
@@ -125,7 +121,7 @@
 	cp -al $< install-$*;
 	cd install-$*; 		\
 	$(export_makeflags); 	\
-	$(strip $(kpkg_image_pre) $(subst @flavour@,$*,$(kpkg_image_cmd)))
+	$(strip $(kpkg_image_pre) $(kpkg_image_cmd))
 	cat install-$*/debian/files >> files;
 	rm -rf install-$*;
 	touch install-stamp-$(subarch)-$*
@@ -219,11 +215,10 @@
 # then be picked up and included into the linux-headers package
 # by the headers-install script.
 #
-build-stamp-$(subarch)-%: build-$(subarch)-%
-	PATH=$$PWD/bin:$$PATH;					\
+build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) bin/touch.orig
 	cd $<;							\
-	$(export_makeflags);					\
-	$(subst @flavour@,$*,$(kpkg_build_cmd));		\
+	env -i PATH=$(CURDIR)/bin:$(PATH) $(export_makeflags)	\
+	$(kpkg_build_cmd);					\
 	$(if $(image_postproc),$(image_postproc),true);		\
 	arch=$$(basename $$(readlink include/asm));		\
 	arch="$${arch#asm-}";					\
@@ -232,7 +227,7 @@
 	if [ -f "$${src}" ] && [ ! -e "$${dst}" ]; then		\
 	  cp -a "$$(pwd)/$${src}" "$${dst}";			\
 	fi
-	touch build-stamp-$(subarch)-$*
+	touch $@
 #
 # Creates a build directory for a particular flavour
 #
@@ -254,4 +249,7 @@
 	dh_md5sums $(PACKAGES_ARG)
 	dh_builddeb $(PACKAGES_ARG)
 
+bin/touch.orig:
+	ln -fs $$(command -v touch) bin/touch.orig
+
 .PHONY: build unpack binary-indep binary-arch binary

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 16:22:29 UTC (rev 3747)
+++ people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py	2005-08-08 17:03:32 UTC (rev 3748)
@@ -374,11 +374,13 @@
                 for i in ('binary', 'build', 'unpack'):
                     makefile.append(("%s-%s-%s:: %s-%s-%s-%s" % (i, arch, subarch_text, i, arch, subarch_text, flavour), None))
                     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) -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,))
                 cmds_unpack = []
-                cmds_unpack.append(("$(MAKE) -C debian unpack ARCH='%s' SUBARCH='%s' FLAVOUR='%s' VERSION='%s'" % (arch, subarch_text, flavour, version),))
+                cmds_unpack.append(("$(MAKE) -C debian unpack %s" % cmd_args,))
                 makefile.append(("binary-%s-%s-%s-real:" % (arch, subarch_text, flavour), cmds_binary))
                 makefile.append(("build-%s-%s-%s-real:" % (arch, subarch_text, flavour), cmds_build))
                 makefile.append(("unpack-%s-%s-%s-real:" % (arch, subarch_text, flavour), cmds_unpack))

Modified: people/waldi/kernel/source/linux-2.6/debian/rules
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/rules	2005-08-08 16:22:29 UTC (rev 3747)
+++ people/waldi/kernel/source/linux-2.6/debian/rules	2005-08-08 17:03:32 UTC (rev 3748)
@@ -176,7 +176,6 @@
 debian/unpack-stamp: debian/patch-stamp
 	dh_testdir
 	$(MAKE) -f debian/rules.gen unpack-$(DEB_BUILD_ARCH)
-	ln -fs $$(command -v touch) debian/bin/touch.orig
 	touch $@
 
 build: debian/control debian/build-stamp




More information about the Kernel-svn-changes mailing list