-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.common
34 lines (31 loc) · 1.07 KB
/
Makefile.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
RPMBUILD := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
else echo rpm; fi)
MACH := $(shell uname -m)
KVERSION:=2.6.32
# marker is git tag
MARKER:=v2.6.32
SPECFILE:=kernel.spec
REDHAT:=$(shell pwd)
LASTCOMMIT:=$(shell git log -1 --format=format:%H `cat $(REDHAT)/lastcommit`)
CMARKER:=$(MARKER)
RPM:=$(REDHAT)/rpm
SRPMS:=$(RPM)/SRPMS
SOURCES:=$(RPM)/SOURCES
BUILD:=642
TESTPATCH:=$(REDHAT)/linux-kernel-test.patch
FILTERDIFF:=/usr/bin/filterdiff -x '*redhat/*' -x '*/.gitignore' \
-x '*/makefile' -x '*/Makefile'
SUBLEVEL := $(shell echo $(MARKER) | cut -f 3 -d '.' | cut -f 1 -d '-')
RCREV := $(shell echo $(MARKER) | cut -f 2 -d '-' -s | sed -e "s/rc//")
GITREV := $(shell echo $(MARKER) | cut -f 3 -d '-' -s | sed -e "s/git//")
ifneq ($(RCREV),)
RELEASED_KERNEL := 0
STAMP_VERSION := $(shell echo $(MARKER) | cut -f 1 -d '-' | sed -e "s/v//")
PREBUILD := "0."
else
RELEASED_KERNEL := 1
STAMP_VERSION := $(KVERSION)
PREBUILD := ""
endif
RC_PATCH := patch-2.6.$(SUBLEVEL)-rc$(RCREV).bz2
GIT_PATCH := patch-2.6.$(SUBLEVEL)-rc$(RCREV)-git$(GITREV).bz2