/[pkgs]/rpms/kernel/F-10/Makefile
ViewVC logotype

Contents of /rpms/kernel/F-10/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.92 - (show annotations) (download)
Wed Feb 4 19:24:03 2009 UTC (9 months, 2 weeks ago) by kyle
Branch: MAIN
CVS Tags: kernel-2_6_29_4-75_fc10, kernel-2_6_29-0_54_rc7_git3_fc10, kernel-2_6_29_3-60_fc10, kernel-2_6_29_2-45_rc1_fc10, kernel-2_6_29_1-41_fc10, kernel-2_6_29_1-38_fc10, kernel-2_6_29-3_fc10, kernel-2_6_29-0_67_rc8_git4_fc10, kernel-2_6_29_1-42_fc10, kernel-2_6_29_4-72_fc10, kernel-2_6_29-0_42_rc6_fc10, kernel-2_6_29-4_fc10, kernel-2_6_29_2-48_rc1_fc10, kernel-2_6_29-0_22_rc4_git1_fc10, kernel-2_6_29_1-36_fc10, kernel-2_6_29_4-80_fc10, kernel-2_6_29_6-93_fc10, kernel-2_6_29_5-84_fc10, kernel-2_6_29-0_19_rc3_git11_fc10, kernel-2_6_29_1-15_fc10, kernel-2_6_29-10_fc10, kernel-2_6_29_2-52_fc10, kernel-2_6_29-0_50_rc6_git5_fc10, kernel-2_6_29-0_20_rc3_git12_fc10, kernel-2_6_29-0_33_rc5_fc10, kernel-2_6_29_6-99_fc10, kernel-2_6_29-0_43_rc6_fc10, kernel-2_6_29_2-55_fc10, kernel-2_6_29-0_61_rc8_fc10, kernel-2_6_29-0_53_rc7_fc10, kernel-2_6_29-2_fc10, kernel-2_6_29-13_fc10, kernel-2_6_29_1-30_fc10, kernel-2_6_29_6-97_fc10, kernel-2_6_29-0_64_rc8_git4_fc10, kernel-2_6_29_5-88_fc10, kernel-2_6_29-0_41_rc6_fc10, HEAD
Changes since 1.91: +8 -2 lines
* Wed Feb 04 2009 Kyle McMartin <kyle@redhat.com> 2.6.29-0.13.rc3.git6
- Update pci msi defaults patch from rawhide.
1 # Makefile for source rpm: kernel
2 # $Id: Makefile,v 1.92 2009/02/04 19:24:03 kyle Exp $
3 NAME := kernel
4 SPECFILE := kernel.spec
5
6 # use noarch for make prep instead of the current CPU
7 # noarch creates and checks all config files not just the current one,
8 # in addition "i386" isn't a valid kernel target
9 PREPARCH = noarch
10
11 # we only check the .sign signatures
12 UPSTREAM_CHECKS = sign
13
14 # local targets we need to carry around in addition to the default sources
15 TARGETS = download
16
17 define find-makefile-common
18 for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
19 endef
20
21 MAKEFILE_COMMON := $(shell $(find-makefile-common))
22
23 ifeq ($(MAKEFILE_COMMON),)
24 # attept a checkout
25 define checkout-makefile-common
26 test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
27 endef
28
29 MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
30 endif
31
32 include $(MAKEFILE_COMMON)
33 include Makefile.config
34
35 extremedebug:
36 @perl -pi -e 's/# CONFIG_DEBUG_PAGEALLOC is not set/CONFIG_DEBUG_PAGEALLOC=y/' config-nodebug
37
38 debug:
39 @perl -pi -e 's/# CONFIG_SLUB_DEBUG_ON is not set/CONFIG_SLUB_DEBUG_ON=y/' config-nodebug
40 @perl -pi -e 's/# CONFIG_LOCK_STAT is not set/CONFIG_LOCK_STAT=y/' config-nodebug
41 @perl -pi -e 's/# CONFIG_DEBUG_STACK_USAGE is not set/CONFIG_DEBUG_STACK_USAGE=y/' config-nodebug
42 @perl -pi -e 's/# CONFIG_DEBUG_SLAB is not set/CONFIG_DEBUG_SLAB=y/' config-nodebug
43 @perl -pi -e 's/# CONFIG_DEBUG_MUTEXES is not set/CONFIG_DEBUG_MUTEXES=y/' config-nodebug
44 @perl -pi -e 's/# CONFIG_DEBUG_RT_MUTEXES is not set/CONFIG_DEBUG_RT_MUTEXES=y/' config-nodebug
45 @perl -pi -e 's/# CONFIG_DEBUG_RWSEMS is not set/CONFIG_DEBUG_RWSEMS=y/' config-nodebug
46 @perl -pi -e 's/# CONFIG_DEBUG_LOCK_ALLOC is not set/CONFIG_DEBUG_LOCK_ALLOC=y/' config-nodebug
47 @perl -pi -e 's/# CONFIG_PROVE_LOCKING is not set/CONFIG_PROVE_LOCKING=y/' config-nodebug
48 @perl -pi -e 's/# CONFIG_DEBUG_SPINLOCK is not set/CONFIG_DEBUG_SPINLOCK=y/' config-nodebug
49 @perl -pi -e 's/# CONFIG_DEBUG_VM is not set/CONFIG_DEBUG_VM=y/' config-nodebug
50 @perl -pi -e 's/# CONFIG_DEBUG_SLEEP_IN_IRQ is not set/CONFIG_DEBUG_SLEEP_IN_IRQ=y/' config-nodebug
51 @perl -pi -e 's/# CONFIG_FAULT_INJECTION is not set/CONFIG_FAULT_INJECTION=y/' config-nodebug
52 @perl -pi -e 's/# CONFIG_FAILSLAB is not set/CONFIG_FAILSLAB=y/' config-nodebug
53 @perl -pi -e 's/# CONFIG_FAIL_PAGE_ALLOC is not set/CONFIG_FAIL_PAGE_ALLOC=y/' config-nodebug
54 @perl -pi -e 's/# CONFIG_FAIL_MAKE_REQUEST is not set/CONFIG_FAIL_MAKE_REQUEST=y/' config-nodebug
55 @perl -pi -e 's/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/CONFIG_FAULT_INJECTION_DEBUG_FS=y/' config-nodebug
56 @perl -pi -e 's/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/' config-nodebug
57 @perl -pi -e 's/# CONFIG_DEBUG_SG is not set/CONFIG_DEBUG_SG=y/' config-nodebug
58 @perl -pi -e 's/# CONFIG_DEBUG_WRITECOUNT is not set/CONFIG_DEBUG_WRITECOUNT=y/' config-nodebug
59 @perl -pi -e 's/# CONFIG_DEBUG_OBJECTS is not set/CONFIG_DEBUG_OBJECTS=y/' config-nodebug
60 @perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_FREE is not set/CONFIG_DEBUG_OBJECTS_FREE=y/' config-nodebug
61 @perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_TIMERS is not set/CONFIG_DEBUG_OBJECTS_TIMERS=y/' config-nodebug
62 @perl -pi -e 's/# CONFIG_X86_PTDUMP is not set/CONFIG_X86_PTDUMP=y/' config-nodebug
63 @perl -pi -e 's/# CONFIG_CAN_DEBUG_DEVICES is not set/CONFIG_CAN_DEBUG_DEVICES=y/' config-nodebug
64 @perl -pi -e 's/# CONFIG_MODULE_FORCE_UNLOAD is not set/CONFIG_MODULE_FORCE_UNLOAD=y/' config-nodebug
65 @perl -pi -e 's/# CONFIG_SYSCTL_SYSCALL_CHECK is not set/CONFIG_SYSCTL_SYSCALL_CHECK=y/' config-nodebug
66 @perl -pi -e 's/# CONFIG_DEBUG_NOTIFIERS is not set/CONFIG_DEBUG_NOTIFIERS=y/' config-nodebug
67 @perl -pi -e 's/# CONFIG_PM_TEST_SUSPEND is not set/CONFIG_PM_TEST_SUSPEND=y/' config-generic
68 @perl -pi -e 's/# CONFIG_BOOT_TRACER is not set/CONFIG_BOOT_TRACER=y/' config-generic
69 @perl -pi -e 's/# CONFIG_PCI_MSI_DEFAULT_ON is not set/CONFIG_PCI_MSI_DEFAULT_ON=y/' config-generic
70
71 @# just in case we're going from extremedebug -> debug
72 @perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
73
74 @perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
75 @perl -pi -e 's/CONFIG_NR_CPUS=64/CONFIG_NR_CPUS=512/' config-x86_64-generic
76
77 release:
78 @perl -pi -e 's/CONFIG_SLUB_DEBUG_ON=y/# CONFIG_SLUB_DEBUG_ON is not set/' config-nodebug
79 @perl -pi -e 's/CONFIG_LOCK_STAT=y/# CONFIG_LOCK_STAT is not set/' config-nodebug
80 @perl -pi -e 's/CONFIG_DEBUG_STACK_USAGE=y/# CONFIG_DEBUG_STACK_USAGE is not set/' config-nodebug
81 @perl -pi -e 's/CONFIG_DEBUG_SLAB=y/# CONFIG_DEBUG_SLAB is not set/' config-nodebug
82 @perl -pi -e 's/CONFIG_DEBUG_MUTEXES=y/# CONFIG_DEBUG_MUTEXES is not set/' config-nodebug
83 @perl -pi -e 's/CONFIG_DEBUG_RT_MUTEXES=y/# CONFIG_DEBUG_RT_MUTEXES is not set/' config-nodebug
84 @perl -pi -e 's/CONFIG_DEBUG_RWSEMS=y/# CONFIG_DEBUG_RWSEMS is not set/' config-nodebug
85 @perl -pi -e 's/CONFIG_DEBUG_LOCK_ALLOC=y/# CONFIG_DEBUG_LOCK_ALLOC is not set/' config-nodebug
86 @perl -pi -e 's/CONFIG_PROVE_LOCKING=y/# CONFIG_PROVE_LOCKING is not set/' config-nodebug
87 @perl -pi -e 's/CONFIG_DEBUG_SPINLOCK=y/# CONFIG_DEBUG_SPINLOCK is not set/' config-nodebug
88 @perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-debug
89 @perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
90 @perl -pi -e 's/CONFIG_DEBUG_VM=y/# CONFIG_DEBUG_VM is not set/' config-nodebug
91 @perl -pi -e 's/CONFIG_DEBUG_SLEEP_IN_IRQ=y/# CONFIG_DEBUG_SLEEP_IN_IRQ is not set/' config-nodebug
92 @perl -pi -e 's/CONFIG_FAULT_INJECTION=y/# CONFIG_FAULT_INJECTION is not set/' config-nodebug
93 @perl -pi -e 's/CONFIG_FAILSLAB=y/# CONFIG_FAILSLAB is not set/' config-nodebug
94 @perl -pi -e 's/CONFIG_FAIL_PAGE_ALLOC=y/# CONFIG_FAIL_PAGE_ALLOC is not set/' config-nodebug
95 @perl -pi -e 's/CONFIG_FAIL_MAKE_REQUEST=y/# CONFIG_FAIL_MAKE_REQUEST is not set/' config-nodebug
96 @perl -pi -e 's/CONFIG_FAULT_INJECTION_DEBUG_FS=y/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/' config-nodebug
97 @perl -pi -e 's/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/' config-nodebug
98 @perl -pi -e 's/CONFIG_DEBUG_SG=y/# CONFIG_DEBUG_SG is not set/' config-nodebug
99 @perl -pi -e 's/CONFIG_DEBUG_WRITECOUNT=y/# CONFIG_DEBUG_WRITECOUNT is not set/' config-nodebug
100 @perl -pi -e 's/CONFIG_DEBUG_OBJECTS=y/# CONFIG_DEBUG_OBJECTS is not set/' config-nodebug
101 @perl -pi -e 's/CONFIG_DEBUG_OBJECTS_FREE=y/# CONFIG_DEBUG_OBJECTS_FREE is not set/' config-nodebug
102 @perl -pi -e 's/CONFIG_DEBUG_OBJECTS_TIMERS=y/# CONFIG_DEBUG_OBJECTS_TIMERS is not set/' config-nodebug
103 @perl -pi -e 's/CONFIG_X86_PTDUMP=y/# CONFIG_X86_PTDUMP is not set/' config-nodebug
104 @perl -pi -e 's/CONFIG_CAN_DEBUG_DEVICES=y/# CONFIG_CAN_DEBUG_DEVICES is not set/' config-nodebug
105 @perl -pi -e 's/CONFIG_MODULE_FORCE_UNLOAD=y/# CONFIG_MODULE_FORCE_UNLOAD is not set/' config-nodebug
106 @perl -pi -e 's/CONFIG_SYSCTL_SYSCALL_CHECK=y/# CONFIG_SYSCTL_SYSCALL_CHECK is not set/' config-nodebug
107 @perl -pi -e 's/CONFIG_DEBUG_NOTIFIERS=y/# CONFIG_DEBUG_NOTIFIERS is not set/' config-nodebug
108 @perl -pi -e 's/CONFIG_PM_TEST_SUSPEND=y/#\ CONFIG_PM_TEST_SUSPEND\ is\ not\ set/' config-generic
109 @perl -pi -e 's/CONFIG_BOOT_TRACER=y/#\ CONFIG_BOOT_TRACER\ is\ not\ set/' config-generic
110 @perl -pi -e 's/CONFIG_PCI_MSI_DEFAULT_ON=y/# CONFIG_PCI_MSI_DEFAULT_ON is not set/' config-generic
111
112 @perl -pi -e 's/CONFIG_NR_CPUS=512/CONFIG_NR_CPUS=64/' config-x86_64-generic
113
114 @perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
115
116 rhel:
117 @perl -pi -e 's/# CONFIG_PPC_64K_PAGES is not set/CONFIG_PPC_64K_PAGES=y/' config-powerpc64
118 @perl -pi -e 's/CONFIG_NR_CPUS=64/CONFIG_NR_CPUS=512/' config-x86_64-generic
119
120 reconfig:
121 @rm -f kernel-*-config
122 @VERSION="2.6.28" make -f Makefile.config configs
123 @scripts/reconfig.sh
124
125 force-tag: $(SPECFILE) $(COMMON_DIR)/branches
126 @$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)"
127
128 # since i386 isn't a target...
129 compile compile-short: DIST_DEFINES += --target $(shell uname -m)
130
131 # 'make local' also needs to build the noarch firmware package
132 local: noarch
133
134 #
135 # Hacks for building vanilla (unpatched) kernel rpms.
136 # Use "make vanilla-TARGET" like "make TARGET" (make vanilla-scratch-build).
137 #
138 vanilla-%: $(SPECFILE:.spec=-vanilla.spec)
139 @$(MAKE) $* SPECFILE=$<
140
141 $(SPECFILE:.spec=-vanilla.spec): $(SPECFILE)
142 @rm -f $@
143 (echo %define nopatches 1; cat $<) > $@
144
145 #scratch-build: NAME = $(shell rpm $(RPM_DEFINES) $(DIST_DEFINES) -q --qf "%{NAME}\n" --specfile $(SPECFILE)| head -1)
146 #scratch-build: test-srpm
147 # $(BUILD_CLIENT) build $(BUILD_FLAGS) --scratch $(TARGET) \
148 # $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm
149
150 # Dismal kludge for building via brew from cvs after "make vanilla-tag".
151 ifdef BEEHIVE_SRPM_BUILD
152 export CHECKOUT_TAG ?= $(shell sed s/^.// CVS/Tag)
153 tag-pattern = $(TAG_NAME)-$(TAG_VERSION)-0_%_$(TAG_RELEASE)
154 ifeq (,$(filter-out $(tag-pattern),$(CHECKOUT_TAG)))
155 variant := $(patsubst $(tag-pattern),%,$(CHECKOUT_TAG))
156 srpm: SPECFILE := $(wildcard $(SPECFILE:.spec=-$(variant).spec) \
157 $(SPECFILE:.spec=.t.$(variant).spec))
158 srpm beehive-sprm: RELEASE := 0.$(variant).$(RELEASE)
159 endif
160 endif
161
162 ifndef KVERSION
163 KVERSION := $(shell awk '$$1 == "%define" && $$2 == "base_sublevel" { \
164 print "2.6." $$3 \
165 }' $(SPECFILE))
166 endif
167
168 #
169 # Hacks for building kernel rpms from upstream code plus local GIT branches.
170 # Use "make git/BRANCH/TARGET" like "make TARGET".
171 # Use "make git/BRANCH-fedora/TARGET" to include Fedora patches on top.
172 #
173 ifndef GIT_SPEC
174 git/%:
175 @$(MAKE) GIT_SPEC=$(subst /,-,$(*D)) git-$(*F)
176 else
177 git-%: $(SPECFILE:.spec=.t.$(GIT_SPEC).spec)
178 @$(MAKE) GIT_SPEC= $* SPECFILE=$<
179 endif
180
181 #
182 # Your git-branches.mk file can define GIT_DIR, e.g.:
183 # GIT_DIR = ${HOME}/kernel/.git
184 # Make sure GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL are also set
185 # or your rpm changelogs will look like crap.
186 #
187 # For each branch it can define a variable branch-BRANCH or tag-BRANCH
188 # giving the parent of BRANCH to diff against in a separate patch. If
189 # the parent is unknown, it will use $(branch-upstream) defaulting to
190 # "refs/remotes/upstream/master".
191 #
192 # Defining tag-BRANCH means the tag corresponds to an upstream patch in
193 # the sources file, so that is used instead of generating a patch with
194 # git. If there is no tag-upstream defined, it will figure out a vNNN
195 # tag or vNNN-gitN pseudo-tag from the last patch in the sources file.
196 # For example:
197 # tag-some-hacks = v2.6.21-rc5
198 # branch-more-hacks = some-hacks
199 # Leads to patches:
200 # git diff v2.6.21-rc5..more-hacks > linux-2.6.21-rc5-some-hacks.patch
201 # git diff some-hacks..more-hacks > linux-2.6.21-rc5-more-hacks.patch
202 # Whereas having no git-branches.mk at all but doing
203 # "make GIT_DIR=... git/mybranch/test-srpm" does:
204 # id=`cat patch-2.6.21-rc5-git4.id` # auto-fetched via upstream file
205 # git diff $id..upstream > linux-2.6.21-rc5-git4-upstream.patch
206 # git diff upstream..mybranch > linux-2.6.21-rc5-git4-mybranch.patch
207 # If the upstream patch (or any branch patch) is empty it's left out.
208 #
209 git-branches.mk:;
210 -include git-branches.mk
211
212 branch-upstream ?= refs/remotes/upstream/master
213
214 ifdef GIT_DIR
215 export GIT_DIR
216 export GIT_AUTHOR_NAME
217 export GIT_AUTHOR_EMAIL
218 gen-patches ?= gen-patches
219
220 ifndef havespec
221 $(SPECFILE:.spec=.t.%-fedora.spec): $(SPECFILE) $(gen-patches) FORCE
222 ./$(gen-patches) --fedora < $< > $@ $(gen-patches-args)
223 $(SPECFILE:.spec=.t.%.spec): $(SPECFILE) $(gen-patches) FORCE
224 ./$(gen-patches) < $< > $@ $(gen-patches-args)
225 .PRECIOUS: $(SPECFILE:.spec=.t.%.spec) $(SPECFILE:.spec=.t.%-fedora.spec)
226 endif
227
228 spec-%: $(SPECFILE:.spec=.t.%.spec) ;
229 $(SPECFILE):;
230 FORCE:;
231
232 branch-of-* = $(firstword $(head-$*) $*)
233 gen-patches-args = --name $* v$(KVERSION) $(call heads,$(branch-of-*))
234 define heads
235 $(if $(tag-$1),$(filter-out v$(KVERSION),$(tag-$1)),\
236 $(call heads,$(firstword $(branch-$1) $(branch-upstream)))) $1
237 endef
238
239 files-%-fedora:
240 @echo $(SPECFILE:.spec=.t.$*-fedora.spec)
241 @$(call list-patches,$(branch-of-*))
242 files-%:
243 @echo $(SPECFILE:.spec=.t.$*.spec)
244 @$(call list-patches,$(branch-of-*))
245 define list-patches
246 $(if $(tag-$1),version=$(patsubst v%,%,$(tag-$1)),\
247 $(call list-patches,$(firstword $(branch-$1) $(branch-upstream)))); \
248 echo linux-$${version}-$(patsubst refs/remotes/%/master,%,$1).patch
249 endef
250
251 ifndef tag-$(branch-upstream)
252 tag-$(branch-upstream) := $(shell \
253 sed -n 's/^.* *//;s/\.bz2$$//;s/patch-/v/;/^v/h;$${g;p}' sources)
254 endif
255 endif

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2