linux/debian/rules

109 lines
3.6 KiB
Plaintext
Raw Normal View History

#!/usr/bin/make -f
SHELL := sh -e
SOURCE := $(shell dpkg-parsechangelog -SSource)
VERSION := $(shell dpkg-parsechangelog -SVersion)
VERSION_UPSTREAM := $(shell echo "$(VERSION)" | sed -e 's,-[^-]*$$,,')
VERSION_BINNMU := $(shell echo "$(VERSION)" | sed -rne 's,.*\+b([0-9]+)$$,\1,p')
VERSION_SOURCE := $(patsubst %+b$(VERSION_BINNMU),%,$(VERSION))
include /usr/share/dpkg/architecture.mk
* Use generated rules, effectively remove second flavour resolver. * Implement generic support for cross compilation. * Install generated files in the correct headers packages. r3745: waldi | 2005-08-08 15:40:20 +0000 * debian/bin/gencontrol.py - Rename some variables. - Write debian/rules.gen. * debian/rules: Use debian/rules.gen. r3746: waldi | 2005-08-08 15:51:26 +0000 debian/bin/gencontrol.py: Simplify rules. r3747: waldi | 2005-08-08 16:22:29 +0000 Use generated rules for unpack, effectively remove second flavour resolver. * debian/Makefile: Updates. * debian/bin/gencontrol.py: Generate unpack rules. * debian/rules: Use new rules. r3748: waldi | 2005-08-08 17:03:32 +0000 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. r3752: waldi | 2005-08-08 18:13:27 +0000 Use generated rules for binary target. * debian/Makefile: Updates. * debian/bin/gencontrol.py: Generate binary rules. r3753: waldi | 2005-08-08 19:00:05 +0000 * debian/Makefile - Overwrite env. - Split binary target. * debian/bin/gencontrol.py: Update. * debian/rules: Call correct targets. r3756: waldi | 2005-08-08 20:07:31 +0000 * 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. r3793: waldi | 2005-08-09 19:57:44 +0000 * debian/Makefile - Fix directories. - Build anything in one subdir. * debian/bin/gencontrol.py: Call debian/Makefile from package root. * debian/rules: Updates. r3794: waldi | 2005-08-09 21:43:07 +0000 debian/bin/gencontrol.py: Updates. r3795: waldi | 2005-08-09 22:26:53 +0000 * 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. r3796: waldi | 2005-08-09 22:30:23 +0000 * debian/bin/gencontrol.py: Use debian/rules.real. * debian/rules.real: Move from debian/Makefile. r3797: waldi | 2005-08-09 22:39:24 +0000 debian/bin/gencontrol.py, debian/rules, debian/rules.real: Rename unpack to setup. r3798: waldi | 2005-08-09 22:52:43 +0000 debian/bin/gencontrol.py, debian/rules.real: Use DH_OPTIONS. r3799: waldi | 2005-08-09 22:53:37 +0000 debian/rules: Use host, not build architecture. r3815: waldi | 2005-08-10 11:53:38 +0000 debian/rules.real: Update targets. r3816: waldi | 2005-08-10 12:06:13 +0000 debian/rules.real: Move patch rules from debian/rules. r3817: waldi | 2005-08-10 12:22:26 +0000 debian/bin/gencontrol.py, debian/rules.real: Small fixes. r3818: waldi | 2005-08-10 12:29:17 +0000 debian/rules.real: Add seperate setup step for headers package. r3819: waldi | 2005-08-10 12:36:57 +0000 debian/bin/gencontrol.py, debian/rules, debian/rules.real: Add binary-indep. r3820: waldi | 2005-08-10 12:40:10 +0000 debian/bin/gencontrol.py: Fix typo. r3821: waldi | 2005-08-10 12:56:58 +0000 * debian/bin/gencontrol.py: Use binary-indep. * debian/rules.real: Move source package rules from debian/rules. r3822: waldi | 2005-08-10 13:11:24 +0000 * debian/bin/gencontrol.py: Use install-dummy. * debian/rules.real: Move tree package rules from debian/rules. r3823: waldi | 2005-08-10 13:41:30 +0000 * debian/bin/gencontrol.py: Fix typos. * debian/rules.real - Move doc package rules from debian/rules. - Fix some installation rules. r3824: waldi | 2005-08-10 13:55:41 +0000 debian/rules.real: Move patch package rules from debian/rules. r3825: waldi | 2005-08-10 14:17:33 +0000 debian/rules: Cleanup. r3826: waldi | 2005-08-10 14:37:03 +0000 debian/rules.real: Fix typos. r3827: waldi | 2005-08-10 14:57:07 +0000 debian: Update svn:ignore property. r3828: waldi | 2005-08-10 15:07:29 +0000 debian/rules.real - Move some install rules. - Support cross compilation. r3829: waldi | 2005-08-10 15:39:14 +0000 debian/rules.real: Realy rename the rules. r3830: waldi | 2005-08-10 17:35:54 +0000 debian/rules.real - Move one rule. - Fix permissions of source tar ball. Closes: 322409 r3832: waldi | 2005-08-10 18:57:51 +0000 debian/templates/control.headers.main.in: Fix command to install headers. r3833: waldi | 2005-08-10 20:30:48 +0000 * debian/bin/gencontrol.py: Remove dash from ABINAME. * debian/rules.real - Use abiname without dash. - Install patches with correct permissions. r3847: waldi | 2005-08-13 09:11:40 +0000 debian/templates/post-install.in: Install any executable file and files which matches *.sh and *.pl in the scripts directory. Closes: 322612 r3848: waldi | 2005-08-13 09:32:54 +0000 * arch/powerpc/defines: Add pseries definitions. * arch/powerpc/config.pseries: Move from arch/powerpc/noconfig.pseries. * bin/gencontrol.py - Export KPKG_SUBARCH. - Updates. * rules.real: Use KPKG_SUBARCH. r3853: waldi | 2005-08-14 10:01:06 +0000 debian/rules.real - Fix cross compile options for make-kpkg. - Fix architecture patches. - Remove asm-offsets.s workaround, pending real fix. r3854: waldi | 2005-08-14 12:07:36 +0000 debian/rules.real: Export version informations. r3855: waldi | 2005-08-14 12:39:57 +0000 debian/templates/post-install.in: Always install generated files. r3858: waldi | 2005-08-14 14:51:28 +0000 debian/rules.real: Integrate headers install fix. r3859: waldi | 2005-08-14 15:29:21 +0000 * debian/arch/powerpc/config.powerpc64 - Fix wrong formated entries. - Enable vscsi client. * debian/arch/powerpc/defines: Fix flavour name. * debian/README.PPC64: Remove. svn path=/trunk/kernel/source/linux-2.6/; revision=3860
2005-08-14 19:59:43 +00:00
include debian/rules.defs
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEBIAN_KERNEL_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
ifdef DEBIAN_KERNEL_JOBS
MAKEFLAGS += -j$(DEBIAN_KERNEL_JOBS)
endif
.NOTPARALLEL:
source: debian/control
dh_testdir
$(MAKE) -f debian/rules.gen source
setup: debian/control
dh_testdir
$(MAKE) -f debian/rules.gen setup_$(DEB_HOST_ARCH)
build: build-arch build-indep
build-arch: debian/control
dh_testdir
$(MAKE) -f debian/rules.gen build-arch_$(DEB_HOST_ARCH)
build-indep: debian/control
dh_testdir
$(MAKE) -f debian/rules.gen build-indep
binary: binary-indep binary-arch
binary-arch: build-arch
dh_testdir
$(MAKE) -f debian/rules.gen binary-arch_$(DEB_HOST_ARCH)
binary-indep: build-indep
dh_testdir
$(MAKE) -f debian/rules.gen binary-indep
DIR_ORIG = ../orig/$(SOURCE)-$(VERSION_UPSTREAM)
TAR_ORIG_NAME = $(SOURCE)_$(VERSION_UPSTREAM).orig.tar.xz
TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
* Use generated rules, effectively remove second flavour resolver. * Implement generic support for cross compilation. * Install generated files in the correct headers packages. r3745: waldi | 2005-08-08 15:40:20 +0000 * debian/bin/gencontrol.py - Rename some variables. - Write debian/rules.gen. * debian/rules: Use debian/rules.gen. r3746: waldi | 2005-08-08 15:51:26 +0000 debian/bin/gencontrol.py: Simplify rules. r3747: waldi | 2005-08-08 16:22:29 +0000 Use generated rules for unpack, effectively remove second flavour resolver. * debian/Makefile: Updates. * debian/bin/gencontrol.py: Generate unpack rules. * debian/rules: Use new rules. r3748: waldi | 2005-08-08 17:03:32 +0000 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. r3752: waldi | 2005-08-08 18:13:27 +0000 Use generated rules for binary target. * debian/Makefile: Updates. * debian/bin/gencontrol.py: Generate binary rules. r3753: waldi | 2005-08-08 19:00:05 +0000 * debian/Makefile - Overwrite env. - Split binary target. * debian/bin/gencontrol.py: Update. * debian/rules: Call correct targets. r3756: waldi | 2005-08-08 20:07:31 +0000 * 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. r3793: waldi | 2005-08-09 19:57:44 +0000 * debian/Makefile - Fix directories. - Build anything in one subdir. * debian/bin/gencontrol.py: Call debian/Makefile from package root. * debian/rules: Updates. r3794: waldi | 2005-08-09 21:43:07 +0000 debian/bin/gencontrol.py: Updates. r3795: waldi | 2005-08-09 22:26:53 +0000 * 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. r3796: waldi | 2005-08-09 22:30:23 +0000 * debian/bin/gencontrol.py: Use debian/rules.real. * debian/rules.real: Move from debian/Makefile. r3797: waldi | 2005-08-09 22:39:24 +0000 debian/bin/gencontrol.py, debian/rules, debian/rules.real: Rename unpack to setup. r3798: waldi | 2005-08-09 22:52:43 +0000 debian/bin/gencontrol.py, debian/rules.real: Use DH_OPTIONS. r3799: waldi | 2005-08-09 22:53:37 +0000 debian/rules: Use host, not build architecture. r3815: waldi | 2005-08-10 11:53:38 +0000 debian/rules.real: Update targets. r3816: waldi | 2005-08-10 12:06:13 +0000 debian/rules.real: Move patch rules from debian/rules. r3817: waldi | 2005-08-10 12:22:26 +0000 debian/bin/gencontrol.py, debian/rules.real: Small fixes. r3818: waldi | 2005-08-10 12:29:17 +0000 debian/rules.real: Add seperate setup step for headers package. r3819: waldi | 2005-08-10 12:36:57 +0000 debian/bin/gencontrol.py, debian/rules, debian/rules.real: Add binary-indep. r3820: waldi | 2005-08-10 12:40:10 +0000 debian/bin/gencontrol.py: Fix typo. r3821: waldi | 2005-08-10 12:56:58 +0000 * debian/bin/gencontrol.py: Use binary-indep. * debian/rules.real: Move source package rules from debian/rules. r3822: waldi | 2005-08-10 13:11:24 +0000 * debian/bin/gencontrol.py: Use install-dummy. * debian/rules.real: Move tree package rules from debian/rules. r3823: waldi | 2005-08-10 13:41:30 +0000 * debian/bin/gencontrol.py: Fix typos. * debian/rules.real - Move doc package rules from debian/rules. - Fix some installation rules. r3824: waldi | 2005-08-10 13:55:41 +0000 debian/rules.real: Move patch package rules from debian/rules. r3825: waldi | 2005-08-10 14:17:33 +0000 debian/rules: Cleanup. r3826: waldi | 2005-08-10 14:37:03 +0000 debian/rules.real: Fix typos. r3827: waldi | 2005-08-10 14:57:07 +0000 debian: Update svn:ignore property. r3828: waldi | 2005-08-10 15:07:29 +0000 debian/rules.real - Move some install rules. - Support cross compilation. r3829: waldi | 2005-08-10 15:39:14 +0000 debian/rules.real: Realy rename the rules. r3830: waldi | 2005-08-10 17:35:54 +0000 debian/rules.real - Move one rule. - Fix permissions of source tar ball. Closes: 322409 r3832: waldi | 2005-08-10 18:57:51 +0000 debian/templates/control.headers.main.in: Fix command to install headers. r3833: waldi | 2005-08-10 20:30:48 +0000 * debian/bin/gencontrol.py: Remove dash from ABINAME. * debian/rules.real - Use abiname without dash. - Install patches with correct permissions. r3847: waldi | 2005-08-13 09:11:40 +0000 debian/templates/post-install.in: Install any executable file and files which matches *.sh and *.pl in the scripts directory. Closes: 322612 r3848: waldi | 2005-08-13 09:32:54 +0000 * arch/powerpc/defines: Add pseries definitions. * arch/powerpc/config.pseries: Move from arch/powerpc/noconfig.pseries. * bin/gencontrol.py - Export KPKG_SUBARCH. - Updates. * rules.real: Use KPKG_SUBARCH. r3853: waldi | 2005-08-14 10:01:06 +0000 debian/rules.real - Fix cross compile options for make-kpkg. - Fix architecture patches. - Remove asm-offsets.s workaround, pending real fix. r3854: waldi | 2005-08-14 12:07:36 +0000 debian/rules.real: Export version informations. r3855: waldi | 2005-08-14 12:39:57 +0000 debian/templates/post-install.in: Always install generated files. r3858: waldi | 2005-08-14 14:51:28 +0000 debian/rules.real: Integrate headers install fix. r3859: waldi | 2005-08-14 15:29:21 +0000 * debian/arch/powerpc/config.powerpc64 - Fix wrong formated entries. - Enable vscsi client. * debian/arch/powerpc/defines: Fix flavour name. * debian/README.PPC64: Remove. svn path=/trunk/kernel/source/linux-2.6/; revision=3860
2005-08-14 19:59:43 +00:00
orig: $(DIR_ORIG)
rsync --delete --exclude /debian --exclude .svk --exclude .svn --exclude .git --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0
$(DIR_ORIG):
ifeq ($(TAR_ORIG),)
$(error Cannot find orig tarball $(TAR_ORIG_NAME))
else
mkdir -p ../orig
tar -C ../orig -xaf $(TAR_ORIG)
endif
maintainerclean:
rm -f debian/config.defines.dump debian/control debian/control.md5sum debian/linux-headers-* debian/linux-image-* debian/rules.gen
rm -rf $(filter-out debian .svk .svn .git, $(wildcard * .[^.]*))
clean: debian/control
dh_testdir
rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc debian/lib/python/debian_linux/__pycache__ $$(find debian -maxdepth 1 -type d -name 'linux-*') debian/*-modules-*-di* debian/kernel-image-*-di* debian/xen-linux-system-* debian/*-tmp
dh_clean
CONTROL_FILES = $(BUILD_DIR)/version-info $(wildcard debian/templates/*.in)
CONTROL_FILES += debian/config/defines $(wildcard debian/config/*/defines) $(wildcard debian/config/*/*/defines)
CONTROL_FILES += debian/installer/kernel-versions debian/installer/package-list
# debian/bin/gencontrol.py uses debian/changelog as input, but the
# output only depends on the source name and version. To avoid
# frequent changes to debian/control.md5sum, include only those fields
# in the checksum.
$(BUILD_DIR)/version-info: debian/changelog
mkdir -p $(@D)
printf >$@ 'Source: %s\nVersion: %s\n' $(SOURCE) $(VERSION_SOURCE)
debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES)
ifeq ($(wildcard debian/control.md5sum),)
$(MAKE) -f debian/rules debian/control-real
else
md5sum --check debian/control.md5sum --status || \
$(MAKE) -f debian/rules debian/control-real
endif
debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES)
# Hash randomisation makes the pickled config unreproducible
PYTHONHASHSEED=0 $<
md5sum $^ > debian/control.md5sum
@echo
@echo This target is made to fail intentionally, to make sure
@echo that it is NEVER run during the automated build. Please
@echo ignore the following error, the debian/control file has
@echo been generated SUCCESSFULLY.
@echo
exit 1
.PHONY: binary binary-% build build-% clean debian/control-real orig setup source