ia64/xen-unstable

view buildconfigs/src.git-clone @ 18824:0b8c6c91c5a4

pv-on-hvm drivers: build fixes for Linux 2.6.27+

Make the drivers build properly in a 2.6.27 environment as well as
against a kernel with pv-ops Xen configured on (in the latter case
more work would be needed to also make the drivers work, as there's a
large number of duplicate exports).

Portions from Charles Arnold <carnold@novell.com>.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Nov 24 11:11:20 2008 +0000 (2008-11-24)
parents 7dee3b001d9f
children dc0d1200e3f3
line source
1 # Mercurial
2 GIT ?= git
4 LINUX_SRCDIR ?= linux-$(LINUX_VER).git
6 # The URL of the remote GIT repository
7 ifeq ($(XEN_LINUX_GIT_URL),)
8 .ERROR: XEN_LINUX_GIT_URL not specified
9 endif
11 # The name to use for the remote repository
12 XEN_LINUX_GIT_REMOTENAME ?= origin
14 # The branch in the remote repository
15 ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),)
16 .ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified
17 endif
19 XEN_LINUX_GIT_LOCALBRANCH ?= master
21 # Set XEN_LINUX_GITREV to update to a particlar revision.
22 XEN_LINUX_GITREV ?=
24 $(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
25 @set -e ; if [ -d $(LINUX_SRCDIR) ] && [ ! -d $(GIT_DIR) ] ; then \
26 echo "$(LINUX_SRCDIR) exists but is not a git repository." 1>&2 ; \
27 false ; \
28 fi
30 @set -e ; if [ ! -e $(LINUX_SRCDIR)/.git ] ; then \
31 mkdir $(LINUX_SRCDIR) ; \
32 cd $(LINUX_SRCDIR) ; \
33 $(GIT) init-db ; \
34 fi
36 @set -e ; cd $(LINUX_SRCDIR) ; \
37 if ! $(GIT) remote | grep -q $(XEN_LINUX_GIT_REMOTENAME) ; then \
38 echo "Adding remote git repository \`$(XEN_LINUX_GIT_URL)' as \`$(XEN_LINUX_GIT_REMOTENAME)'" ; \
39 $(GIT) remote add $(XEN_LINUX_GIT_REMOTENAME) $(XEN_LINUX_GIT_URL) ; \
40 fi
42 @echo "Updating remote \`$(XEN_LINUX_GIT_REMOTENAME)'"
43 @cd $(LINUX_SRCDIR) && $(GIT) fetch $(XEN_LINUX_GIT_REMOTENAME)
45 @set -e ; cd $(LINUX_SRCDIR) ; \
46 if ! $(GIT) branch -l | grep -q $(XEN_LINUX_GIT_LOCALBRANCH) ; then \
47 $(GIT) branch --track $(XEN_LINUX_GIT_LOCALBRANCH) \
48 $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \
49 $(GIT) checkout ; \
50 fi
52 @ set -e ; cd $(LINUX_SRCDIR) ; \
53 if [ -n "$(XEN_LINUX_GITREV)" ] ; then \
54 echo "Updating $(LINUX_SRCDIR) to revision \'$(XEN_LINUX_GITREV)'." ; \
55 $(GIT) reset --hard $(XEN_LINUX_GITREV) ; \
56 else \
57 $(GIT) reset --hard $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \
58 fi
60 touch $@