ia64/xen-unstable
changeset 19818:415505139333
Get rid of hardcoded pathes for stubdom and hotplug scripts
- Have the buid system generate a file which exports the install paths
for the hotplug scripts and stubdom / stubdom-dm
- Move file generation code from tools/python/Makefile into a gmake
macro
in Config.mk to avoid maintenance of three duplicates each with its
own
tweaks and bugs
- Export gmake variables into ioemu as shell variables
for upcoming ioemu patches
- Do above as a gmake macro to avoid maintenance of several duplicates
- Adjust hotplug scripts to find the right xen binaries from the
install directory
- Adjust stubdom-dm to use the install directories
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
- Have the buid system generate a file which exports the install paths
for the hotplug scripts and stubdom / stubdom-dm
- Move file generation code from tools/python/Makefile into a gmake
macro
in Config.mk to avoid maintenance of three duplicates each with its
own
tweaks and bugs
- Export gmake variables into ioemu as shell variables
for upcoming ioemu patches
- Do above as a gmake macro to avoid maintenance of several duplicates
- Adjust hotplug scripts to find the right xen binaries from the
install directory
- Adjust stubdom-dm to use the install directories
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue Jun 23 17:25:51 2009 +0100 (2009-06-23) |
parents | b7f73a7f3078 |
children | c1bdfb5c3c5c |
files | Config.mk stubdom/Makefile stubdom/stubdom-dm tools/Makefile tools/hotplug/Linux/block tools/hotplug/Linux/network-bridge tools/hotplug/Linux/network-nat tools/hotplug/Linux/network-route tools/hotplug/Linux/vif-bridge tools/hotplug/Linux/vif-nat tools/hotplug/Linux/vif-route tools/hotplug/Linux/xen-hotplug-cleanup tools/hotplug/Linux/xen-hotplug-common.sh tools/hotplug/NetBSD/block-nbsd tools/hotplug/NetBSD/vif-bridge-nbsd tools/hotplug/NetBSD/vif-ip-nbsd tools/hotplug/common/Makefile tools/python/Makefile |
line diff
1.1 --- a/Config.mk Tue Jun 23 17:24:14 2009 +0100 1.2 +++ b/Config.mk Tue Jun 23 17:25:51 2009 +0100 1.3 @@ -87,6 +87,28 @@ define absolutify_xen_root 1.4 export XEN_ROOT 1.5 endef 1.6 1.7 +define buildmakevars2shellvars 1.8 + PREFIX="$(PREFIX)"; \ 1.9 + XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)"; \ 1.10 + export PREFIX; \ 1.11 + export XEN_SCRIPT_DIR 1.12 +endef 1.13 + 1.14 +buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1))) 1.15 +define buildmakevars2file-closure 1.16 + .PHONY: genpath 1.17 + genpath: 1.18 + rm -f $(1); \ 1.19 + echo "SBINDIR=\"$(SBINDIR)\"" >> $(1); \ 1.20 + echo "BINDIR=\"$(BINDIR)\"" >> $(1); \ 1.21 + echo "LIBEXEC=\"$(LIBEXEC)\"" >> $(1); \ 1.22 + echo "LIBDIR=\"$(LIBDIR)\"" >> $(1); \ 1.23 + echo "PRIVATE_BINDIR=\"$(PRIVATE_BINDIR)\"" >> $(1); \ 1.24 + echo "XENFIRMWAREDIR=\"$(XENFIRMWAREDIR)\"" >> $(1); \ 1.25 + echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> $(1); \ 1.26 + echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> $(1) 1.27 +endef 1.28 + 1.29 ifeq ($(debug),y) 1.30 CFLAGS += -g 1.31 endif
2.1 --- a/stubdom/Makefile Tue Jun 23 17:24:14 2009 +0100 2.2 +++ b/stubdom/Makefile Tue Jun 23 17:25:51 2009 +0100 2.3 @@ -77,8 +77,12 @@ TARGET_LDFLAGS += -nostdlib -L$(CROSS_PR 2.4 2.5 TARGETS=ioemu c caml grub 2.6 2.7 +STUBDOMPATH="stubdompath.sh" 2.8 +genpath-target = $(call buildmakevars2file,$(STUBDOMPATH)) 2.9 +$(eval $(genpath-target)) 2.10 + 2.11 .PHONY: all 2.12 -all: build 2.13 +all: genpath build 2.14 ifeq ($(STUBDOM_SUPPORTED),1) 2.15 build: ioemu-stubdom c-stubdom pv-grub 2.16 else 2.17 @@ -270,8 +274,7 @@ libxc-$(XEN_TARGET_ARCH)/libxenctrl.a li 2.18 ioemu: cross-zlib cross-libpci libxc 2.19 [ -f ioemu/config-host.mak ] || \ 2.20 ( $(absolutify_xen_root); \ 2.21 - PREFIX=$(PREFIX); \ 2.22 - export PREFIX; \ 2.23 + $(buildmakevars2shellvars); \ 2.24 cd ioemu ; \ 2.25 LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) \ 2.26 TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \ 2.27 @@ -374,6 +377,7 @@ clean: 2.28 $(MAKE) -C caml clean 2.29 $(MAKE) -C c clean 2.30 rm -fr grub-$(XEN_TARGET_ARCH) 2.31 + rm -f $(STUBDOMPATH) 2.32 [ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(MAKE) -C libxc-$(XEN_TARGET_ARCH) clean 2.33 -[ ! -d ioemu ] || $(MAKE) -C ioemu clean 2.34
3.1 --- a/stubdom/stubdom-dm Tue Jun 23 17:24:14 2009 +0100 3.2 +++ b/stubdom/stubdom-dm Tue Jun 23 17:25:51 2009 +0100 3.3 @@ -5,6 +5,9 @@ 3.4 # dm script around stubdomains. 3.5 # 3.6 3.7 +. ./stubdompath.sh 3.8 +stubdom_configdir="${XEN_CONFIG_DIR}/stubdoms" 3.9 + 3.10 # To fit xterms nicely 3.11 height=339 3.12 3.13 @@ -80,7 +83,7 @@ term() { 3.14 ( 3.15 [ -n "$vncpid" ] && kill -9 $vncpid 3.16 xm destroy $domname-dm 3.17 - rm /etc/xen/stubdoms/$domname-dm 3.18 + rm ${stubdom_configdir}/$domname-dm 3.19 ) & 3.20 # We need to exit immediately so as to let xend do the commands above 3.21 exit 0 3.22 @@ -97,9 +100,9 @@ do 3.23 done 3.24 3.25 # Generate stubdom config file 3.26 -mkdir -p /etc/xen/stubdoms &>/dev/null 3.27 -echo "#This file is autogenerated, edit $domname instead!" > /etc/xen/stubdoms/$domname-dm 3.28 -echo "kernel = '/usr/lib/xen/boot/ioemu-stubdom.gz'" >> /etc/xen/stubdoms/$domname-dm 3.29 +mkdir -p ${stubdom_configdir} &>/dev/null 3.30 +echo "#This file is autogenerated, edit $domname instead!" > ${stubdom_configdir}/$domname-dm 3.31 +echo "kernel = '${XENFIRMWAREDIR}/ioemu-stubdom.gz'" >> ${stubdom_configdir}/$domname-dm 3.32 3.33 vfb="sdl=$sdl, opengl=$opengl" 3.34 test "$DISPLAY" && vfb="$vfb, display=$DISPLAY" 3.35 @@ -110,9 +113,9 @@ test "$vncpasswd" && vfb="$vfb, vncpassw 3.36 test "$keymap" && vfb="$vfb, keymap=$keymap" 3.37 test "$monitor" && vfb="$vfb, monitor=$monitor" 3.38 test "$serial" && vfb="$vfb, serial=$serial" 3.39 -echo "vfb = ['$vfb']" >> /etc/xen/stubdoms/$domname-dm 3.40 +echo "vfb = ['$vfb']" >> ${stubdom_configdir}/$domname-dm 3.41 3.42 -echo -n "disk = [ " >> /etc/xen/stubdoms/$domname-dm 3.43 +echo -n "disk = [ " >> ${stubdom_configdir}/$domname-dm 3.44 j=0 3.45 for i in `xenstore-ls /local/domain/$domid/device/vbd | grep 'backend =' | awk '{print $3}'` 3.46 do 3.47 @@ -126,13 +129,13 @@ do 3.48 vbd_devtype=`xenstore-read $vbd_front/device-type` 3.49 if [ $j -ne 0 ] 3.50 then 3.51 - echo -n "," >> /etc/xen/stubdoms/$domname-dm 3.52 + echo -n "," >> ${stubdom_configdir}/$domname-dm 3.53 fi 3.54 - echo -n "'$vbd_type:$vbd_disk,$vbd_dev:$vbd_devtype,$vbd_mode'" >> /etc/xen/stubdoms/$domname-dm 3.55 + echo -n "'$vbd_type:$vbd_disk,$vbd_dev:$vbd_devtype,$vbd_mode'" >> ${stubdom_configdir}/$domname-dm 3.56 j=$(( $j + 1 )) 3.57 done 3.58 -echo " ] " >> /etc/xen/stubdoms/$domname-dm 3.59 -echo -n "vif = [ " >> /etc/xen/stubdoms/$domname-dm 3.60 +echo " ] " >> ${stubdom_configdir}/$domname-dm 3.61 +echo -n "vif = [ " >> ${stubdom_configdir}/$domname-dm 3.62 j=0 3.63 for i in `xenstore-ls /local/domain/$domid/device/vif | grep 'backend =' | awk '{print $3}'` 3.64 do 3.65 @@ -141,13 +144,13 @@ do 3.66 vif_mac=`xenstore-read $i/mac` 3.67 if [ $j -ne 0 ] 3.68 then 3.69 - echo -n "," >> /etc/xen/stubdoms/$domname-dm 3.70 + echo -n "," >> ${stubdom_configdir}/$domname-dm 3.71 fi 3.72 - echo -n "'mac=$vif_mac'" >> /etc/xen/stubdoms/$domname-dm 3.73 + echo -n "'mac=$vif_mac'" >> ${stubdom_configdir}/$domname-dm 3.74 j=$(( $j + 1 )) 3.75 done 3.76 -echo " ] " >> /etc/xen/stubdoms/$domname-dm 3.77 -creation="xm create -c /etc/xen/stubdoms/$domname-dm target=$domid memory=32 extra=\"$extra\"" 3.78 +echo " ] " >> ${stubdom_configdir}/$domname-dm 3.79 +creation="xm create -c ${stubdom_configdir}/$domname-dm target=$domid memory=32 extra=\"$extra\"" 3.80 3.81 (while true ; do sleep 60 ; done) | /bin/sh -c "$creation" & 3.82 #xterm -geometry +0+0 -e /bin/sh -c "$creation ; echo ; echo press ENTER to shut down ; read" &
4.1 --- a/tools/Makefile Tue Jun 23 17:24:14 2009 +0100 4.2 +++ b/tools/Makefile Tue Jun 23 17:25:51 2009 +0100 4.3 @@ -97,10 +97,7 @@ ioemu-dir-find: 4.4 fi 4.5 set -e; \ 4.6 $(absolutify_xen_root); \ 4.7 - PREFIX=$(PREFIX); \ 4.8 - XEN_SCRIPT_DIR=$(XEN_SCRIPT_DIR); \ 4.9 - export PREFIX; \ 4.10 - export XEN_SCRIPT_DIR; \ 4.11 + $(buildmakevars2shellvars); \ 4.12 cd ioemu-dir; \ 4.13 ./xen-setup $(IOEMU_CONFIGURE_CROSS) 4.14 4.15 @@ -109,6 +106,7 @@ subdir-all-ioemu-dir subdir-install-ioem 4.16 subdir-clean-ioemu-dir: 4.17 set -e; if test -d ioemu-dir/.; then \ 4.18 $(absolutify_xen_root); \ 4.19 + $(buildmakevars2shellvars); \ 4.20 $(MAKE) -C ioemu-dir clean; \ 4.21 fi 4.22
5.1 --- a/tools/hotplug/Linux/block Tue Jun 23 17:24:14 2009 +0100 5.2 +++ b/tools/hotplug/Linux/block Tue Jun 23 17:25:51 2009 +0100 5.3 @@ -377,5 +377,5 @@ mount it read-write in a guest domain." 5.4 esac 5.5 5.6 # If we've reached here, $t is neither phy nor file, so fire a helper script. 5.7 -[ -x /etc/xen/scripts/block-"$t" ] && \ 5.8 - /etc/xen/scripts/block-"$t" "$command" $node 5.9 +[ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \ 5.10 + ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
6.1 --- a/tools/hotplug/Linux/network-bridge Tue Jun 23 17:24:14 2009 +0100 6.2 +++ b/tools/hotplug/Linux/network-bridge Tue Jun 23 17:25:51 2009 +0100 6.3 @@ -2,7 +2,7 @@ 6.4 #============================================================================ 6.5 # Default Xen network start/stop script. 6.6 # Xend calls a network script when it starts. 6.7 -# The script name to use is defined in /etc/xen/xend-config.sxp 6.8 +# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp 6.9 # in the network-script field. 6.10 # 6.11 # This script creates a bridge (default ${netdev}), adds a device
7.1 --- a/tools/hotplug/Linux/network-nat Tue Jun 23 17:24:14 2009 +0100 7.2 +++ b/tools/hotplug/Linux/network-nat Tue Jun 23 17:25:51 2009 +0100 7.3 @@ -2,7 +2,7 @@ 7.4 #============================================================================ 7.5 # Default Xen network start/stop script when using NAT. 7.6 # Xend calls a network script when it starts. 7.7 -# The script name to use is defined in /etc/xen/xend-config.sxp 7.8 +# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp 7.9 # in the network-script field. 7.10 # 7.11 # Usage: 7.12 @@ -18,6 +18,7 @@ 7.13 #============================================================================ 7.14 7.15 dir=$(dirname "$0") 7.16 +. "$dir/hotplugpath.sh" 7.17 . "$dir/xen-script-common.sh" 7.18 . "$dir/xen-network-common.sh" 7.19
8.1 --- a/tools/hotplug/Linux/network-route Tue Jun 23 17:24:14 2009 +0100 8.2 +++ b/tools/hotplug/Linux/network-route Tue Jun 23 17:25:51 2009 +0100 8.3 @@ -2,7 +2,7 @@ 8.4 #============================================================================ 8.5 # Default Xen network start/stop script. 8.6 # Xend calls a network script when it starts. 8.7 -# The script name to use is defined in /etc/xen/xend-config.sxp 8.8 +# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp 8.9 # in the network-script field. 8.10 # 8.11 # Usage: 8.12 @@ -17,6 +17,7 @@ 8.13 #============================================================================ 8.14 8.15 dir=$(dirname "$0") 8.16 +. "$dir/hotplugpath.sh" 8.17 . "$dir/xen-script-common.sh" 8.18 8.19 evalVariables "$@"
9.1 --- a/tools/hotplug/Linux/vif-bridge Tue Jun 23 17:24:14 2009 +0100 9.2 +++ b/tools/hotplug/Linux/vif-bridge Tue Jun 23 17:25:51 2009 +0100 9.3 @@ -1,12 +1,12 @@ 9.4 #!/bin/bash 9.5 #============================================================================ 9.6 -# /etc/xen/vif-bridge 9.7 +# ${XEN_SCRIPT_DIR}/vif-bridge 9.8 # 9.9 # Script for configuring a vif in bridged mode. 9.10 # The hotplugging system will call this script if it is specified either in 9.11 # the device configuration given to Xend, or the default Xend configuration 9.12 -# in /etc/xen/xend-config.sxp. If the script is specified in neither of those 9.13 -# places, then this script is the default. 9.14 +# in ${XEN_CONFIG_DIR}/xend-config.sxp. If the script is specified in 9.15 +# neither of those places, then this script is the default. 9.16 # 9.17 # Usage: 9.18 # vif-bridge (add|remove|online|offline)
10.1 --- a/tools/hotplug/Linux/vif-nat Tue Jun 23 17:24:14 2009 +0100 10.2 +++ b/tools/hotplug/Linux/vif-nat Tue Jun 23 17:25:51 2009 +0100 10.3 @@ -1,12 +1,12 @@ 10.4 #!/bin/bash 10.5 #============================================================================ 10.6 -# /etc/xen/vif-nat 10.7 +# ${XEN_SCRIPT_DIR}/vif-nat 10.8 # 10.9 # Script for configuring a vif in routed-nat mode. 10.10 # The hotplugging system will call this script if it is specified either in 10.11 # the device configuration given to Xend, or the default Xend configuration 10.12 -# in /etc/xen/xend-config.sxp. If the script is specified in neither of those 10.13 -# places, then vif-bridge is the default. 10.14 +# in ${XEN_CONFIG_DIR}/xend-config.sxp. If the script is specified in 10.15 +# neither of those places, then vif-bridge is the default. 10.16 # 10.17 # Usage: 10.18 # vif-nat (add|remove|online|offline)
11.1 --- a/tools/hotplug/Linux/vif-route Tue Jun 23 17:24:14 2009 +0100 11.2 +++ b/tools/hotplug/Linux/vif-route Tue Jun 23 17:25:51 2009 +0100 11.3 @@ -1,12 +1,12 @@ 11.4 #!/bin/bash 11.5 #============================================================================ 11.6 -# /etc/xen/vif-route 11.7 +# ${XEN_SCRIPT_DIR}/vif-route 11.8 # 11.9 # Script for configuring a vif in routed mode. 11.10 # The hotplugging system will call this script if it is specified either in 11.11 # the device configuration given to Xend, or the default Xend configuration 11.12 -# in /etc/xen/xend-config.sxp. If the script is specified in neither of those 11.13 -# places, then vif-bridge is the default. 11.14 +# in ${XEN_CONFIG_DIR}/xend-config.sxp. If the script is specified in 11.15 +# neither of those places, then vif-bridge is the default. 11.16 # 11.17 # Usage: 11.18 # vif-route (add|remove|online|offline)
12.1 --- a/tools/hotplug/Linux/xen-hotplug-cleanup Tue Jun 23 17:24:14 2009 +0100 12.2 +++ b/tools/hotplug/Linux/xen-hotplug-cleanup Tue Jun 23 17:25:51 2009 +0100 12.3 @@ -3,7 +3,7 @@ 12.4 dir=$(dirname "$0") 12.5 . "$dir/xen-hotplug-common.sh" 12.6 12.7 -# Claim the lock protecting /etc/xen/scripts/block. This stops a race whereby 12.8 +# Claim the lock protecting ${XEN_SCRIPT_DIR}/block. This stops a race whereby 12.9 # paths in the store would disappear underneath that script as it attempted to 12.10 # read from the store checking for device sharing. 12.11 # Any other scripts that do similar things will have to have their lock
13.1 --- a/tools/hotplug/Linux/xen-hotplug-common.sh Tue Jun 23 17:24:14 2009 +0100 13.2 +++ b/tools/hotplug/Linux/xen-hotplug-common.sh Tue Jun 23 17:25:51 2009 +0100 13.3 @@ -17,13 +17,14 @@ 13.4 13.5 13.6 dir=$(dirname "$0") 13.7 +. "$dir/hotplugpath.sh" 13.8 . "$dir/logging.sh" 13.9 . "$dir/xen-script-common.sh" 13.10 . "$dir/locking.sh" 13.11 13.12 exec 2>>/var/log/xen/xen-hotplug.log 13.13 13.14 -export PATH="/sbin:/bin:/usr/bin:/usr/sbin:$PATH" 13.15 +export PATH="${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/sbin:/bin:/usr/bin:/usr/sbin:$PATH" 13.16 export LANG="POSIX" 13.17 unset $(set | grep ^LC_ | cut -d= -f1) 13.18
14.1 --- a/tools/hotplug/NetBSD/block-nbsd Tue Jun 23 17:24:14 2009 +0100 14.2 +++ b/tools/hotplug/NetBSD/block-nbsd Tue Jun 23 17:25:51 2009 +0100 14.3 @@ -4,7 +4,10 @@ 14.4 # Called by xenbackendd 14.5 # Usage: block xsdir_backend_path state 14.6 14.7 -PATH=/bin:/usr/bin:/sbin:/usr/sbin 14.8 +DIR=$(dirname "$0") 14.9 +. "${DIR}/hotplugpath.sh" 14.10 + 14.11 +PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin 14.12 export PATH 14.13 14.14 error() {
15.1 --- a/tools/hotplug/NetBSD/vif-bridge-nbsd Tue Jun 23 17:24:14 2009 +0100 15.2 +++ b/tools/hotplug/NetBSD/vif-bridge-nbsd Tue Jun 23 17:25:51 2009 +0100 15.3 @@ -4,7 +4,10 @@ 15.4 # Called by xenbackendd 15.5 # Usage: vif-bridge xsdir_backend_path state 15.6 15.7 -PATH=/bin:/usr/bin:/sbin:/usr/sbin 15.8 +DIR=$(dirname "$0") 15.9 +. "${DIR}/hotplugpath.sh" 15.10 + 15.11 +PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin 15.12 export PATH 15.13 15.14 xpath=$1
16.1 --- a/tools/hotplug/NetBSD/vif-ip-nbsd Tue Jun 23 17:24:14 2009 +0100 16.2 +++ b/tools/hotplug/NetBSD/vif-ip-nbsd Tue Jun 23 17:25:51 2009 +0100 16.3 @@ -4,7 +4,10 @@ 16.4 # Called by xenbackendd 16.5 # Usage: vif-ip xsdir_backend_path state 16.6 16.7 -PATH=/bin:/usr/bin:/sbin:/usr/sbin 16.8 +DIR=$(dirname "$0") 16.9 +. "${DIR}/hotplugpath.sh" 16.10 + 16.11 +PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin 16.12 export PATH 16.13 16.14 xpath=$1
17.1 --- a/tools/hotplug/common/Makefile Tue Jun 23 17:24:14 2009 +0100 17.2 +++ b/tools/hotplug/common/Makefile Tue Jun 23 17:25:51 2009 +0100 17.3 @@ -1,17 +1,22 @@ 17.4 -XEN_ROOT = ../../../ 17.5 +XEN_ROOT = ../../.. 17.6 include $(XEN_ROOT)/tools/Rules.mk 17.7 17.8 +HOTPLUGPATH="hotplugpath.sh" 17.9 + 17.10 # OS-independent hotplug scripts go in this directory 17.11 17.12 -# Xen script dir and scripts to go there. 17.13 -XEN_SCRIPTS = 17.14 +# Xen scripts to go there. 17.15 +XEN_SCRIPTS = $(HOTPLUGPATH) 17.16 XEN_SCRIPT_DATA = 17.17 17.18 +genpath-target = $(call buildmakevars2file,$(HOTPLUGPATH)) 17.19 +$(eval $(genpath-target)) 17.20 + 17.21 .PHONY: all 17.22 -all: 17.23 +all: build 17.24 17.25 .PHONY: build 17.26 -build: 17.27 +build: genpath 17.28 17.29 .PHONY: install 17.30 install: all install-scripts 17.31 @@ -31,3 +36,4 @@ install-scripts: 17.32 17.33 .PHONY: clean 17.34 clean: 17.35 + rm -f $(HOTPLUGPATH)
18.1 --- a/tools/python/Makefile Tue Jun 23 17:24:14 2009 +0100 18.2 +++ b/tools/python/Makefile Tue Jun 23 17:25:51 2009 +0100 18.3 @@ -14,20 +14,11 @@ I18NSRCFILES = $(shell find xen/xm/ -nam 18.4 CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS)) 18.5 NLSDIR = $(SHAREDIR)/locale 18.6 XENPATH = "xen/util/path.py" 18.7 - 18.8 -.PHONY: build buildpy genpath 18.9 -genpath: 18.10 - rm -f $(XENPATH) 18.11 - echo "SBINDIR=\"$(SBINDIR)\"" >> $(XENPATH) 18.12 - echo "BINDIR=\"$(BINDIR)\"" >> $(XENPATH) 18.13 - echo "LIBEXEC=\"$(LIBEXEC)\"" >> $(XENPATH) 18.14 - echo "LIBDIR=\"$(LIBDIR)\"" >> $(XENPATH) 18.15 - echo "SHAREDIR=\"$(SHAREDIR)\"" >> $(XENPATH) 18.16 - echo "PRIVATE_BINDIR=\"$(PRIVATE_BINDIR)\"" >> $(XENPATH) 18.17 - echo "XENFIRMWAREDIR=\"$(XENFIRMWAREDIR)\"" >> $(XENPATH) 18.18 - echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> $(XENPATH) 18.19 - echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> $(XENPATH) 18.20 18.21 +genpath-target = $(call buildmakevars2file,$(XENPATH)) 18.22 +$(eval $(genpath-target)) 18.23 + 18.24 +.PHONY: build buildpy 18.25 buildpy: genpath 18.26 CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build 18.27