From: Chris Wright Subject: [PATCH] put xenstore headers in linux-public Date: Mon, 8 Aug 2005 15:45:07 -0700 Message-ID: <20050808224507.GG7762@shell0.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: rusty@rustcorp.com.au List-Id: xen-devel@lists.xenproject.org Directly including ../tools breaks building in separate object tree, as well as building from mkpatch patch (I believe Rik hit that one). This puts xenstore headers in linux-public. Signed-off-by: Chris Wright --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile Mon Aug 8 18:43:57 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile Mon Aug 8 15:15:06 2005 @@ -4,7 +4,3 @@ xenbus-objs += xenbus_comms.o xenbus-objs += xenbus_xs.o xenbus-objs += xenbus_probe.o - -XEN_TOOLS_DIR := "../tools" -vpath %.h $(XEN_TOOLS_DIR) -EXTRA_CFLAGS += -I $(XEN_TOOLS_DIR) diff -r 0229efe8ffe4 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Mon Aug 8 18:43:57 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Mon Aug 8 15:15:06 2005 @@ -30,7 +30,6 @@ #include #include -#include "xenstore/xenstored.h" #include #include #include @@ -39,6 +38,7 @@ #include #include #include +#include #include "xenbus_comms.h" #define streq(a, b) (strcmp((a), (b)) == 0) diff -r 0229efe8ffe4 linux-2.6-xen-sparse/mkbuildtree --- a/linux-2.6-xen-sparse/mkbuildtree Mon Aug 8 18:43:57 2005 +++ b/linux-2.6-xen-sparse/mkbuildtree Mon Aug 8 15:15:06 2005 @@ -74,6 +74,25 @@ ) } +# relative_lnfiles +# Creates a tree of symlinks in the current working directory that mirror +# in . should be relative to the current +# working directory. Symlinks in are ignored. Source-control files +# are ignored. +relative_lnfiles () +{ + local SYMLINK_DIR REAL_DIR pref i + SYMLINK_DIR=$PWD + REAL_DIR=$1 + shift + ( + cd $REAL_DIR + for i in "$*"; do + ln -sf ${REAL_DIR}/$i ${SYMLINK_DIR}/$i + done + ) +} + [ "$1" == "" ] && { echo "Syntax: $0 "; exit 1; } # Get absolute path to the destination directory @@ -109,3 +128,6 @@ cd ${AD}/include/asm-xen/xen-public relative_lndir ../../../${RS}/../xen/include/public +# More header links, specific to shared defn's for xenbus/xenstore +cd ${AD}/include/asm-xen/linux-public +relative_lnfiles ../../../${RS}/../tools/xenstore xenstored.h