/[kernel]/branches/linux-kernel-2.6.12/debian/rules
ViewVC logotype

Contents of /branches/linux-kernel-2.6.12/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3215 - (show annotations) (download)
Mon May 23 00:13:49 2005 UTC (8 years ago) by jurij-guest
Original Path: branches/kernel-image-2.6.11/debian/rules
File size: 2195 byte(s)
Some major changes: each flavour now has a separate
target, making the name of the flavour available to
make.
1 #!/usr/bin/make -f
2 #
3 # Required variables
4 #
5 version := 2.6.11
6 abiname := 1
7 ktver := 5
8 #
9 # Generally nothing needs to be modified below this line
10 #
11 SHELL := sh -e
12 kbpkg := kernel-kbuild-$(version)-$(abiname)
13 controls := $(wildcard arch/*/control.in arch/*/*/control.in)
14 karch := $(shell dpkg-architecture -qDEB_HOST_ARCH)
15 #
16 # If we are not passed a subarchs variable, we obtain the complete
17 # subarch list as a list of subdirectories in arch/$(karch). We
18 # also export the flavours variables, which allows to control which
19 # flavours are built.
20 #
21 ifndef subarchs
22 subarchs := $(shell find arch/$(karch) \
23 -type d -mindepth 1 -maxdepth 1 \
24 ! -name '.svn' ! -name 'patches' \
25 -printf '%f\n')
26 endif
27 ifeq (,$(subarchs))
28 subarchs := none
29 endif
30
31 export version abiname ktver kbuildver flavours
32
33 unpack: unpack-stamp
34 unpack-stamp:
35 dh_testdir
36 for i in $(subarchs); do \
37 $(MAKE) subarch=$${i} unpack; \
38 done
39 ln -s $$(command -v touch) bin/touch.orig
40 touch unpack-stamp
41
42 build: build-stamp
43 build-stamp: unpack-stamp
44 dh_testdir
45 for i in $(subarchs); do \
46 $(MAKE) subarch=$${i} build; \
47 done
48 touch build-stamp
49
50 clean:
51 dh_testdir
52 rm -f *-stamp-* *-stamp config.*
53 rm -f header-install-* post-install-* bin/touch.orig
54 rm -rf kernel-source-* build-* install-*
55 dh_clean
56
57 binary-indep: build
58 binary-arch: build
59 dh_testdir
60 for i in $(subarchs); do \
61 $(MAKE) subarch=$${i} binary; \
62 done
63
64 binary: binary-indep binary-arch
65
66 #
67 # Prepares debian/control by cat'ing together all the
68 # control files, substituting variables, removing all
69 # empty lines and inserting a newline before every
70 # line starting with 'Package:'
71 #
72 debian/control:
73 cat debian/control.in $(controls) | \
74 sed -e 's,@karch@,$(karch),g' \
75 -e 's,@version@,$(version),g' \
76 -e 's,@ktver@,$(ktver),g' \
77 -e 's,@abiname@,$(abiname),g' \
78 -e 's,@kbpkg@,$(kbpkg),g' | \
79 sed '/^[[:space:]]*$$/d' | \
80 sed 's/^Package:/\n&/g' > debian/control
81
82 .PHONY: clean build unpack binary-indep binary-arch binary

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5