Files
xen/tools/hotplug/common/Makefile
T
Anthony PERARD e47df5f77b tools/hotplug: Removing of "all" dependency from "install" rule.
The "install" rules depends on both "all" and "subdirs-install" and
"all" depends on "subdirs-all". This leads the "install" rules to call
both "subdirs-all" and "subdirs-install" which create a race with two
concurrent `make` within the same directory (systemd) trying to make the
same things (xen.conf) and failing.

Ultimatly, "install" should only depend on the things it needs to
install, and not on "all".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-10-14 10:03:12 +01:00

40 lines
808 B
Makefile

XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
HOTPLUGPATH="hotplugpath.sh"
# OS-independent hotplug scripts go in this directory
# Xen scripts to go there.
XEN_SCRIPTS =
XEN_SCRIPT_DATA = $(HOTPLUGPATH)
genpath-target = $(call buildmakevars2file,$(HOTPLUGPATH))
$(eval $(genpath-target))
.PHONY: all
all: build
.PHONY: build
build: $(HOTPLUGPATH)
.PHONY: install
install: install-scripts
.PHONY: install-scripts
install-scripts: build
[ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
set -e; for i in $(XEN_SCRIPTS); \
do \
$(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
done
set -e; for i in $(XEN_SCRIPT_DATA); \
do \
$(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
done
.PHONY: clean
clean:
rm -f $(HOTPLUGPATH)