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

Bastian Blank waldi at costa.debian.org
Mon Aug 8 20:07:32 UTC 2005


Author: waldi
Date: 2005-08-08 20:07:31 +0000 (Mon, 08 Aug 2005)
New Revision: 3756

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:
* debian/Makefile
  - Split unpack target.
  - Don't generate stamp files for install targets.
  - Update dir names.
* debian/bin/gencontrol.py: Split unpack target.
* debian/rules: Remove new stamp files.


Modified: people/waldi/kernel/source/linux-2.6/debian/Makefile
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/Makefile	2005-08-08 19:03:10 UTC (rev 3755)
+++ people/waldi/kernel/source/linux-2.6/debian/Makefile	2005-08-08 20:07:31 UTC (rev 3756)
@@ -40,8 +40,6 @@
 
 configs := $(notdir $(wildcard $(basedir)/config.*))
 configs := $(filter-out config, $(configs))
-tkdir   := linux-source-$(VERSION)
-kdir    := linux-source-$(VERSION)-$(SUBARCH)
 ifndef flavours
   flavours := $(patsubst config.%,%,$(configs))
 endif
@@ -57,7 +55,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-$(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)
@@ -90,37 +88,39 @@
 #
 # Targets
 #
-unpack: unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+binary-subarch: install-subarch-$(ARCH)-$(SUBARCH)
+binary-flavour: install-flavour-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 
-build: build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+build: stamp-build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 
-binary-subarch: install-headers-stamp-$(ARCH)-$(SUBARCH)
+unpack-subarch: stamp-source-$(ARCH)-$(SUBARCH)
+unpack-flavour: stamp-unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 
-binary-flavour: install-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-
-install-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=install-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-install-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+install-flavour-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=install-flavour-dir-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+install-flavour-$(ARCH)-$(SUBARCH)-$(FLAVOUR): stamp-build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 	rm -rf $(DIR)
 	cp -al build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(DIR)
 	cd $(DIR); $(setup_env) $(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 $@
 
-install-headers-stamp-$(ARCH)-$(SUBARCH): $(kdir) header-install-$(SUBARCH)
-	cd $(kdir); $(setup_env) $(kpkg_headers_cmd)
+install-subarch-$(ARCH)-$(SUBARCH): DIR=install-subarch-dir-$(ARCH)-$(SUBARCH)
+install-subarch-$(ARCH)-$(SUBARCH): stamp-source-$(ARCH)-$(SUBARCH) header-install-$(ARCH)-$(SUBARCH)
+	rm -rf $(DIR)
+	cp -al source-$(ARCH)-$(SUBARCH) $(DIR)
+	cd $(DIR); $(setup_env) $(kpkg_headers_cmd)
+	cat $(DIR)/debian/files >> files
 	@for i in $$(awk '{ print $$1; }' $(DIR)/debian/files); do echo mv $$i ../..; mv $$i ../..; done
-	cat $(kdir)/debian/files >> files
-	touch $@
+	rm -rf $(DIR)
 
-header-install-$(SUBARCH): templates/header-install.in
+header-install-$(ARCH)-$(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)
+            $< > $@
+	chmod u+x $@
 #
 # The way to make the correct package names is to make a
 # subarch-specific post-install script...
@@ -162,24 +162,21 @@
 patches  += $(wildcard patches-arch/$(ARCH).*)
 patches  += $(wildcard patches-arch/$(ARCH)_*)
 patches  := $(strip $(patches))
-# substitute() and friends is duplicated in debian/rules; this should
-# be cleaned up in the long term.  watch out for relative paths, as
-# debian/rules runs in the top level directory, while debian/Makefile
-# runs from the debian directory!
-$(kdir): post-install-$(ARCH)-$(SUBARCH)
-	mkdir -p $(tkdir)
-	cp -al $(srcfiles) $(tkdir)
-	mkdir -p $(tkdir)/debian
-	cp changelog $(tkdir)/debian
-	cp copyright $(tkdir)/debian
-	cp control $(tkdir)/debian/control
-	touch $(tkdir)/debian/official
+stamp-source-$(ARCH)-$(SUBARCH): DIR=source-$(ARCH)-$(SUBARCH)
+stamp-source-$(ARCH)-$(SUBARCH): post-install-$(ARCH)-$(SUBARCH)
+	mkdir -p $(DIR)
+	cp -al $(srcfiles) $(DIR)
+	mkdir -p $(DIR)/debian
+	cp changelog $(DIR)/debian
+	cp copyright $(DIR)/debian
+	cp control $(DIR)/debian/control
+	touch $(DIR)/debian/official
 	if [ -n '$(patches)' ]; then			\
-	  cd $(tkdir);					\
+	  cd $(DIR);					\
 	  cat $(addprefix ../,$(patches)) | patch -p1;	\
 	fi
-	install $< $(tkdir)/debian/post-install
-	mv $(tkdir) $@
+	install $< $(DIR)/debian/post-install
+	touch $@
 #
 # This target performs a build for a particular flavour. Note
 # that in this file it should be always placed *before* the
@@ -194,8 +191,8 @@
 # then be picked up and included into the linux-headers package
 # by the headers-install script.
 #
-build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-build-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+stamp-build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+stamp-build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): stamp-unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
 	ln -fs $$(command -v touch) bin/touch.orig
 	cd $(DIR);						\
 	$(setup_env) PATH=$(CURDIR)/bin:$(PATH) 		\
@@ -204,7 +201,7 @@
 	arch=$$(basename $$(readlink include/asm));		\
 	arch="$${arch#asm-}";					\
 	src="arch/$${arch}/kernel/asm-offsets.s";		\
-	dst="../$(kdir)/$${src}";				\
+	dst="../$(DIR)/$${src}";				\
 	if [ -f "$${src}" ] && [ ! -e "$${dst}" ]; then		\
 	  cp -a "$$(pwd)/$${src}" "$${dst}";			\
 	fi
@@ -212,10 +209,11 @@
 #
 # Creates a build directory for a particular flavour
 #
-unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-unpack-stamp-$(ARCH)-$(SUBARCH)-$(FLAVOUR): config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(kdir)
+stamp-unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR): SOURCE_DIR=source-$(ARCH)-$(SUBARCH)
+stamp-unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+stamp-unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR): config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) stamp-source-$(ARCH)-$(SUBARCH)
 	rm -rf $(DIR)
-	cp -al $(kdir) $(DIR)
+	cp -al $(SOURCE_DIR) $(DIR)
 	cp $< $(DIR)/.config
 	touch $@
 

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 19:03:10 UTC (rev 3755)
+++ people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py	2005-08-08 20:07:31 UTC (rev 3756)
@@ -357,6 +357,7 @@
             cmds_binary.append(("$(MAKE) -C debian binary-subarch %s" % subarch_makeflags,))
             cmds_build = []
             cmds_unpack = []
+            cmds_unpack.append(("$(MAKE) -C debian unpack-subarch %s" % subarch_makeflags,))
             makefile.append(("binary-%s-%s-real:" % (arch, subarch_text), cmds_binary))
             makefile.append(("build-%s-%s-real:" % (arch, subarch_text), cmds_build))
             makefile.append(("unpack-%s-%s-real:" % (arch, subarch_text), cmds_unpack))
@@ -392,7 +393,7 @@
                 cmds_build = []
                 cmds_build.append(("$(MAKE) -C debian build %s" % flavour_makeflags,))
                 cmds_unpack = []
-                cmds_unpack.append(("$(MAKE) -C debian unpack %s" % flavour_makeflags,))
+                cmds_unpack.append(("$(MAKE) -C debian unpack-flavour %s" % flavour_makeflags,))
                 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 19:03:10 UTC (rev 3755)
+++ people/waldi/kernel/source/linux-2.6/debian/rules	2005-08-08 20:07:31 UTC (rev 3756)
@@ -201,7 +201,7 @@
 	rm -f version.Debian
 	rm -rf linux-source-$(version)
 	cd debian;						\
-	rm -f *-stamp-* *-stamp config.* *.kpatches.arch; 	\
+	rm -f stamp-* *-stamp config.* *.kpatches.arch; 	\
 	rm -f header-install-* post-install-* bin/touch.orig;	\
 	rm -rf linux-source-* build-* install-*
 	dh_clean




More information about the Kernel-svn-changes mailing list