[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux: fix Makefile.xen generation when building external modules



Otherwise, the file will be (attempted to be) put in the (possibly
read-only) source tree.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- head-2009-05-29.orig/scripts/Makefile.build 2009-04-27 12:03:52.000000000 
+0200
+++ head-2009-05-29/scripts/Makefile.build      2009-06-05 11:13:18.000000000 
+0200
@@ -77,7 +77,8 @@ $(warning kbuild: Makefile.build is incl
 endif
 
 ifeq ($(CONFIG_XEN),y)
-$(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk 
$(srctree)/scripts/Makefile.build
+Makefile.xen := $(if 
$(KBUILD_EXTMOD),$(KBUILD_EXTMOD),$(objtree)/scripts)/Makefile.xen
+$(Makefile.xen): $(srctree)/scripts/Makefile.xen.awk 
$(srctree)/scripts/Makefile.build
        @echo '  Updating $@'
        $(if $(shell echo a | $(AWK) '{ print gensub(/a/, "AA", "g"); }'),\
         ,$(error 'Your awk program does not define gensub.  Use gawk or 
another awk with gensub'))
@@ -87,7 +88,7 @@ xen-src-single-used-m := $(patsubst $(sr
 xen-single-used-m      := $(xen-src-single-used-m:-xen.c=.o)
 single-used-m          := $(filter-out $(xen-single-used-m),$(single-used-m))
 
--include $(objtree)/scripts/Makefile.xen
+-include $(Makefile.xen)
 endif
 
 # ===========================================================================




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.