r3795 - people/waldi/kernel/source/linux-2.6/debian

Bastian Blank waldi at costa.debian.org
Tue Aug 9 22:26:53 UTC 2005


Author: waldi
Date: 2005-08-09 22:26:53 +0000 (Tue, 09 Aug 2005)
New Revision: 3795

Added:
   people/waldi/kernel/source/linux-2.6/debian/rules.defs
Modified:
   people/waldi/kernel/source/linux-2.6/debian/Makefile
   people/waldi/kernel/source/linux-2.6/debian/rules
Log:
* debian/Makefile
  - Include debian/rules.defs.
  - Simplify kpkg command specs.
* debian/rules
  - Move directory definitions to debian/rules.defs.
  - Include debian/rules.defs.
* debian/rules.defs: Add.


Modified: people/waldi/kernel/source/linux-2.6/debian/Makefile
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/Makefile	2005-08-09 21:43:07 UTC (rev 3794)
+++ people/waldi/kernel/source/linux-2.6/debian/Makefile	2005-08-09 22:26:53 UTC (rev 3795)
@@ -44,6 +44,8 @@
 
 -include $(basedir)/Makefile.inc
 
+include debian/rules.defs
+
 #
 # Here we construct the command lines for different make-kpkg
 # calls (build, linux-image, linux-headers) based on the values
@@ -51,31 +53,23 @@
 # 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='$(BUILD_DIR)/header-install-$(ARCH)-$(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)
-kpkg_build_cmd += --stem linux
+kpkg_headers := HEADER_CLEAN_HOOK='$(CURDIR)/$(BUILD_DIR)/header-install-$(ARCH)-$(SUBARCH)'
+kpkg_headers += make-kpkg --append-to-version $(append)$(DEBNUM)
+kpkg_headers += --stem linux
+kpkg_headers += --config defconfig
+kpkg_image := make-kpkg --append-to-version $(DEBNUM)-$(FLAVOUR)
+kpkg_image += --stem linux
+kpkg_image += --initrd
 ifdef build_subarch
-  kpkg_build_cmd += --subarch $(build_subarch)
+  kpkg_image += --subarch $(build_subarch)
 endif
-# XXX: Instead of special-casing m68k here, we could make --arch and
-# --cross_compile options supported in Makefile.inc, and use them if
-#  DEB_HOST_ARCH != DEB_BUILD_ARCH..  -dil
-ifeq ($(cross_compile),m68k)
-  kpkg_headers_cmd +=  --arch m68k --cross_compile m68k-linux
-  kpkg_build_cmd +=  --arch m68k --cross_compile m68k-linux
-endif
 ifdef headers_subarch
-  kpkg_headers_cmd += --subarch $(headers_subarch)
+  kpkg_headers += --subarch $(headers_subarch)
 endif
 setup_env := env -i HOME=$(HOME) LOGNAME=$(LOGNAME) PATH=$(PATH)
 ifdef build_makeflags
   setup_env += MAKEFLAGS=$(build_makeflags)
 endif
-kpkg_image_cmd := $(kpkg_build_cmd) --initrd kernel_image
-kpkg_build_cmd += build
-kpkg_headers_cmd += kernel-headers
 ifndef headers_dirs
   headers_dirs = $(karch)
 endif
@@ -96,16 +90,17 @@
 install-flavour-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 	rm -rf $(DIR)
 	cp -al build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(DIR)
-	cd $(DIR); $(setup_env) $(kpkg_image_cmd)
+	cd $(DIR); $(setup_env) $(kpkg_image) kernel-image
 	cat $(DIR)/debian/files >> files
 	@for i in $$(awk '{ print $$1; }' $(DIR)/debian/files); do echo mv $$i ../..; mv $$i ../..; done
 	rm -rf $(DIR)
 
+install-subarch-$(ARCH)-$(SUBARCH): SOURCE_DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
 install-subarch-$(ARCH)-$(SUBARCH): DIR=$(BUILD_DIR)/install-subarch-$(ARCH)-$(SUBARCH)
-install-subarch-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH) $(BUILD_DIR/header-install-$(ARCH)-$(SUBARCH)
+install-subarch-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH) $(BUILD_DIR)/header-install-$(ARCH)-$(SUBARCH)
 	rm -rf $(DIR)
-	cp -al source-$(ARCH)-$(SUBARCH) $(DIR)
-	cd $(DIR); $(setup_env) $(kpkg_headers_cmd)
+	cp -al $(SOURCE_DIR) $(DIR)
+	cd $(DIR); $(setup_env) $(kpkg_headers) kernel-headers
 	cat $(DIR)/debian/files >> files
 	@for i in $$(awk '{ print $$1; }' $(DIR)/debian/files); do echo mv $$i ../..; mv $$i ../..; done
 	rm -rf $(DIR)
@@ -190,7 +185,7 @@
 $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 	ln -fs $$(command -v touch) debian/build/touch.orig
-	cd $(DIR); $(setup_env) PATH=$(CURDIR)/build:$(CURDIR)/bin:$(PATH) $(kpkg_build_cmd)
+	cd $(DIR); $(setup_env) PATH=$(CURDIR)/build:$(CURDIR)/bin:$(PATH) $(kpkg_image) build
 	cd $(DIR); $(if $(image_postproc),$(image_postproc),true)
 	arch=$$(basename $$(readlink $(DIR)/include/asm));		\
 	arch="$${arch#asm-}";					\
@@ -209,6 +204,7 @@
 	rm -rf $(DIR)
 	cp -al $(SOURCE_DIR) $(DIR)
 	cp $< $(DIR)/.config
+	cd $(DIR); $(setup_env) $(kpkg_image) configure
 	touch $@
 
 binary-dummy:

Modified: people/waldi/kernel/source/linux-2.6/debian/rules
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/rules	2005-08-09 21:43:07 UTC (rev 3794)
+++ people/waldi/kernel/source/linux-2.6/debian/rules	2005-08-09 22:26:53 UTC (rev 3795)
@@ -23,9 +23,7 @@
 
 export version abiname ltver kbuildver flavours major uver
 
-export BUILD_DIR = debian/build
-export STAMPS_DIR = debian/stamps
-export TEMPLATES_DIR = debian/templates
+include debian/rules.defs
 
 patch: debian/patch-stamp
 debian/patch-stamp: debian/bin/apply

Added: people/waldi/kernel/source/linux-2.6/debian/rules.defs
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/rules.defs	2005-08-09 21:43:07 UTC (rev 3794)
+++ people/waldi/kernel/source/linux-2.6/debian/rules.defs	2005-08-09 22:26:53 UTC (rev 3795)
@@ -0,0 +1,4 @@
+BUILD_DIR = debian/build
+STAMPS_DIR = debian/stamps
+TEMPLATES_DIR = debian/templates
+




More information about the Kernel-svn-changes mailing list