ia64/xen-unstable

view tools/hotplug/common/Makefile @ 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>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jun 23 17:25:51 2009 +0100 (2009-06-23)
parents 887337323bd8
children
line source
1 XEN_ROOT = ../../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 HOTPLUGPATH="hotplugpath.sh"
6 # OS-independent hotplug scripts go in this directory
8 # Xen scripts to go there.
9 XEN_SCRIPTS = $(HOTPLUGPATH)
10 XEN_SCRIPT_DATA =
12 genpath-target = $(call buildmakevars2file,$(HOTPLUGPATH))
13 $(eval $(genpath-target))
15 .PHONY: all
16 all: build
18 .PHONY: build
19 build: genpath
21 .PHONY: install
22 install: all install-scripts
24 .PHONY: install-scripts
25 install-scripts:
26 [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
27 $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
28 set -e; for i in $(XEN_SCRIPTS); \
29 do \
30 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
31 done
32 set -e; for i in $(XEN_SCRIPT_DATA); \
33 do \
34 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
35 done
37 .PHONY: clean
38 clean:
39 rm -f $(HOTPLUGPATH)