Skip to contentSkip to conversation

tools: Handle existing link to acpi directory

PATCH In review Boris Ostrovsky 2 participants 2 messages Oct 23, 2016 – Oct 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: Handle existing link to acpi directory

The link to acpi include directory is not removed by Makefile's 'clean' target. This can lead to make failure when making xen/.dir target if we try to create the link again.

We can prevent this failure by (1) removing acpi link when cleaning up and (2) adding '-f' option to 'ln' (just like we do for other targets).

We should also add tools/include/acpi link to .gitignore.

---
 .gitignore             | 1 +
 tools/include/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
.gitignore +1 -0
index 4adeedb..6e5955e 100644
@@ -168,6 +168,7 @@ tools/hotplug/Linux/xen-hotplug-common.sh
 tools/hotplug/Linux/xendomains
 tools/hotplug/NetBSD/rc.d/xencommons
 tools/hotplug/NetBSD/rc.d/xendriverdomain
+tools/include/acpi
 tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
tools/include/Makefile +2 -2
index d95d837..f1af91c 100644
@@ -20,7 +20,7 @@ xen/.dir:
 	ln -sf ../xen-sys/$(XEN_OS) xen/sys
 	ln -sf $(addprefix $(XEN_ROOT)/xen/include/xen/,libelf.h elfstructs.h) xen/libelf/
 	ln -s ../xen-foreign xen/foreign
-	ln -s $(XEN_ROOT)/xen/include/acpi acpi
+	ln -sf $(XEN_ROOT)/xen/include/acpi acpi
 	touch $@
 
 # Not xen/xsm as that clashes with link to
@@ -60,7 +60,7 @@ install: all
 
 .PHONY: clean
 clean:
-	rm -rf xen xen-xsm
+	rm -rf xen xen-xsm acpi
 	$(MAKE) -C xen-foreign clean
 
 
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Boris Ostrovsky

The link to acpi include directory is not removed by Makefile's 'clean' target. This can lead to make failure when making xen/.dir target if we try to create the link again.

We can prevent this failure by (1) removing acpi link when cleaning up and (2) adding '-f' option to 'ln' (just like we do for other targets).

We should also add tools/include/acpi link to .gitignore.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel