r3796 - in people/waldi/kernel/source/linux-2.6/debian: . bin
Bastian Blank
waldi at costa.debian.org
Tue Aug 9 22:30:24 UTC 2005
Author: waldi
Date: 2005-08-09 22:30:23 +0000 (Tue, 09 Aug 2005)
New Revision: 3796
Added:
people/waldi/kernel/source/linux-2.6/debian/rules.real
Removed:
people/waldi/kernel/source/linux-2.6/debian/Makefile
Modified:
people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py
Log:
* debian/bin/gencontrol.py: Use debian/rules.real.
* debian/rules.real: Move from debian/Makefile.
Deleted: people/waldi/kernel/source/linux-2.6/debian/Makefile
===================================================================
--- people/waldi/kernel/source/linux-2.6/debian/Makefile 2005-08-09 22:26:53 UTC (rev 3795)
+++ people/waldi/kernel/source/linux-2.6/debian/Makefile 2005-08-09 22:30:23 UTC (rev 3796)
@@ -1,222 +0,0 @@
-#
-# This Makefile executes the unpack/build/binary targets for a single
-# subarch, which is passed in the subarch variable. Empty subarch
-# variable means that we are building for an arch without the subarch.
-# Additionally, variables version, abiname and ltver are
-# expected to be available (need to be exported from the parent process).
-# It is possible to override the flavours by setting the flavours
-# variable. It will also be passed a list of source files
-#
-SHELL := sh -e
-#
-# These variables control the behaviour of make-kpkg
-#
-# enable cross-compiling for m68k
-#DEB_HOST_ARCH := m68k
-#
-DEBIAN_UPSTREAM_VERSION := $(version)
-ifeq (,$(DEB_HOST_ARCH))
- DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
- DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-endif
-ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
- cross_compile := $(DEB_HOST_ARCH)
-endif
-export version DEBIAN_UPSTREAM_VERSION DEBIAN_STEM
-
-karch := $(DEB_HOST_ARCH)
-#
-# Build the list of common config files to be included
-#
-ifeq ($(SUBARCH),none)
- basedir := debian/arch/$(ARCH)
- append :=
-else
- basedir := debian/arch/$(ARCH)/$(SUBARCH)
- append := $(SUBARCH)-
-endif
-
-configs := $(notdir $(wildcard $(basedir)/config.*))
-configs := $(filter-out config, $(configs))
-ifndef flavours
- flavours := $(patsubst config.%,%,$(configs))
-endif
-
--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
-# of variables defined so far and provided by the arch/subarch
-# in Makefile.inc. @flavour@ in the expressions is going to be
-# replaced by the flavour for which the command is run.
-#
-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_image += --subarch $(build_subarch)
-endif
-ifdef 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
-ifndef headers_dirs
- headers_dirs = $(karch)
-endif
-ccommon = debian/arch/config debian/arch/$(karch)/config debian/arch/$(karch)/$(subarch)/config
-
-#
-# Targets
-#
-binary-subarch: install-subarch-$(ARCH)-$(SUBARCH)
-binary-flavour: install-flavour-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-
-build: $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-
-unpack-subarch: $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
-unpack-flavour: $(STAMPS_DIR)/unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-
-install-flavour-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/install-flavour-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-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) 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)
- rm -rf $(DIR)
- 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)
-
-$(BUILD_DIR)/header-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/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' \
- $< > $@
- chmod u+x $@
-#
-# The way to make the correct package names is to make a
-# subarch-specific post-install script...
-#
-ifdef extra_postinstall_command
- extra_command := $(extra_postinstall_command)
-else
- extra_command := true
-endif
-$(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/post-install.in
- sed -e 's, at initrd_modules@,$(initrd_modules),' \
- -e 's, at append_subarch@,$(append),' \
- -e 's, at extra_postinstall_command@,$(extra_command),' \
- $< > $@
-#
-# Generates the kernel config file for a subarch by merging
-# the arch-independent config file (arch/config),
-# arch-specific config file (arch/$(karch)/config),
-# and subarch specific one (arch/$(karch)/$(subarch)/config).
-# It is possible to avoid the inclusion of the arch-indep
-# config file by setting include_common_config = no in the
-# arch/$(karch)/Makefile.inc.
-#
-$(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR):
- @echo "configs=$(configs)"
- @echo "Generating configuration file $@:"
- rm -f $@
- for i in $(ccommon); do \
- if [ -f $${i} ]; then \
- cat $${i} >> $@; \
- fi; \
- done
-# Flavour config file must be present
- cat $(basedir)/config.$(FLAVOUR) >> $@
-
-srcfiles := $(filter-out debian linux-source-$(VERSION), $(wildcard *))
-patches := $(wildcard debian/patches-arch/$(SUBARCH).*)
-patches += $(wildcard debian/patches-arch/$(SUBARCH)_*)
-patches += $(wildcard debian/patches-arch/$(ARCH).*)
-patches += $(wildcard debian/patches-arch/$(ARCH)_*)
-patches := $(strip $(patches))
-$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
-$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH)
- mkdir -p $(DIR)
- cp -al $(srcfiles) $(DIR)
- mkdir -p $(DIR)/debian
- cp debian/changelog $(DIR)/debian
- cp debian/copyright $(DIR)/debian
- cp debian/control $(DIR)/debian/control
- touch $(DIR)/debian/official
- if [ -n '$(patches)' ]; then \
- cd $(DIR); \
- cat $(addprefix ../,$(patches)) | patch -p1; \
- fi
- 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
-# build-$(subarch)-% target, which creates the build directory.
-#
-# Some arches have extra arch/${ARCH}/kernel/asm-offsets.s files
-# which have to be included in linux-headers. The problem is that
-# they are only generated during build and we never performed a
-# full build in the directory $(kdir) where linux-headers are
-# built. So, after build we check whether current build arch has
-# such a file and symlink it into the $(kdir) if necessary. It will
-# then be picked up and included into the linux-headers package
-# by the headers-install script.
-#
-$(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_image) build
- cd $(DIR); $(if $(image_postproc),$(image_postproc),true)
- arch=$$(basename $$(readlink $(DIR)/include/asm)); \
- arch="$${arch#asm-}"; \
- src="arch/$${arch}/kernel/asm-offsets.s"; \
- dst="../$(DIR)/$${src}"; \
- if [ -f "$${src}" ] && [ ! -e "$${dst}" ]; then \
- cp -a "$$(pwd)/$${src}" "$${dst}"; \
- fi
- touch $@
-#
-# Creates a build directory for a particular flavour
-#
-$(STAMPS_DIR)/unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR): SOURCE_DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
-$(STAMPS_DIR)/unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-$(STAMPS_DIR)/unpack-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
- rm -rf $(DIR)
- cp -al $(SOURCE_DIR) $(DIR)
- cp $< $(DIR)/.config
- cd $(DIR); $(setup_env) $(kpkg_image) configure
- touch $@
-
-binary-dummy:
- dh_testdir
- dh_testroot
- dh_installchangelogs $(PACKAGES_ARG)
- dh_installdocs $(PACKAGES_ARG)
- dh_compress $(PACKAGES_ARG)
- dh_fixperms $(PACKAGES_ARG)
- dh_installdeb $(PACKAGES_ARG)
- dh_gencontrol $(PACKAGES_ARG) -- $(GENCONTROL_ARGS)
- dh_md5sums $(PACKAGES_ARG)
- dh_builddeb $(PACKAGES_ARG)
-
-.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-09 22:26:53 UTC (rev 3795)
+++ people/waldi/kernel/source/linux-2.6/debian/bin/gencontrol.py 2005-08-09 22:30:23 UTC (rev 3796)
@@ -344,10 +344,10 @@
subarch_makeflags = "ARCH='%s' SUBARCH='%s' VERSION='%s' DEBNUM='-%s'" % (arch, subarch_text, version, subarch_vars['abiname'])
cmds_binary = []
- cmds_binary.append(("$(MAKE) -f debian/Makefile binary-subarch %s" % subarch_makeflags,))
+ cmds_binary.append(("$(MAKE) -f debian/rules.real binary-subarch %s" % subarch_makeflags,))
cmds_build = []
cmds_unpack = []
- cmds_unpack.append(("$(MAKE) -f debian/Makefile unpack-subarch %s" % subarch_makeflags,))
+ cmds_unpack.append(("$(MAKE) -f debian/rules.real 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))
@@ -378,12 +378,12 @@
flavour_makeflags = subarch_makeflags + " FLAVOUR='%s'" % flavour
cmds_binary = []
- cmds_binary.append(("$(MAKE) -f debian/Makefile binary-flavour %s" % flavour_makeflags,))
- cmds_binary.append(("$(MAKE) -f debian/Makefile binary-dummy PACKAGES_ARG='%s'" % ' '.join(["-p%s" % i['Package'] for i in dummy_packages]),))
+ cmds_binary.append(("$(MAKE) -f debian/rules.real binary-flavour %s" % flavour_makeflags,))
+ cmds_binary.append(("$(MAKE) -f debian/rules.real binary-dummy PACKAGES_ARG='%s'" % ' '.join(["-p%s" % i['Package'] for i in dummy_packages]),))
cmds_build = []
- cmds_build.append(("$(MAKE) -f debian/Makefile build %s" % flavour_makeflags,))
+ cmds_build.append(("$(MAKE) -f debian/rules.real build %s" % flavour_makeflags,))
cmds_unpack = []
- cmds_unpack.append(("$(MAKE) -f debian/Makefile unpack-flavour %s" % flavour_makeflags,))
+ cmds_unpack.append(("$(MAKE) -f debian/rules.real 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))
@@ -407,7 +407,7 @@
makeflags = ""
if i.has_key('X-Version-Overwrite-Epoch'):
makeflags = "GENCONTROL_ARGS='-v1:%s'" % source_version
- cmds.append("$(MAKE) -f debian/Makefile binary-dummy PACKAGES_ARG='-p%s' %s" % (i['Package'], makeflags))
+ cmds.append("$(MAKE) -f debian/rules.real binary-dummy PACKAGES_ARG='-p%s' %s" % (i['Package'], makeflags))
makefile.append(("binary-%s:: binary-%s-extra" % (arch, arch), None))
makefile.append(("binary-%s-extra:" % arch, cmds))
Copied: people/waldi/kernel/source/linux-2.6/debian/rules.real (from rev 3795, people/waldi/kernel/source/linux-2.6/debian/Makefile)
More information about the Kernel-svn-changes
mailing list