tools/hotplug: fix race during xen.conf creation
authorOlaf Hering <olaf@aepfle.de>
Wed, 1 Oct 2014 16:41:04 +0000 (18:41 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 6 Oct 2014 14:50:58 +0000 (15:50 +0100)
A make -j8 will call the xen.conf rule twice. The move-if-changed
macro may fail if the tmp file was already removed by the other make
process. Fix this by let the all target depend on install.
Also remove the generated file with make clean.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
[ ijc -- fixed s/of/if/ typo in commit message ]

tools/hotplug/Linux/systemd/Makefile

index dc98b6736717d14e07e6e35c2cfd3d33dd5f0915..90ba16e0f27b7ba1570516a64f020734eb5699d4 100644 (file)
@@ -21,10 +21,11 @@ ALL_XEN_SYSTEMD =   $(XEN_SYSTEMD_MODULES)  \
                        $(XEN_SYSTEMD_SERVICE)
 
 .PHONY: all
-all:   $(ALL_XEN_SYSTEMD)
+all:   install
 
 .PHONY: clean
 clean:
+       rm -f $(ALL_XEN_SYSTEMD)
 
 .PHONY: install
 install: $(ALL_XEN_SYSTEMD)