[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 1/2][4.15] tools/x86: don't rebuild cpuid-autogen.h every time



The first thing the "xen-dir" rule does is delete the entire xen/
subtree. Obviously this includes deleting xen/lib/x86/*autogen.h. As a
result there's no original version for $(move-if-changed ...) to compare
against, and hence the file and all its consumers would get rebuilt
every time. Instead only find and delete all the symlinks.

Fixes: eddf9559c977 ("libx86: generate cpuid-autogen.h in the libx86 include 
dir")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: Different approach.
---
Ian did suggest to pass -0r to xargs (and -print0 to find), but I
couldn't convince myself that these are standard compliant options. We
don't use any special characters in file names, so -print0 / -0
shouldn't be necessary at all. The stray rm invocation when there is no
output from find can be taken care of by passing -f to it.

--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -19,7 +19,7 @@ xen-foreign:
        $(MAKE) -C xen-foreign
 
 xen-dir:
-       @rm -rf xen acpi
+       find xen/ acpi/ -type l 2>/dev/null | xargs rm -f --
        mkdir -p xen/libelf acpi
        ln -s $(XEN_ROOT)/xen/include/public/COPYING xen/
        ln -s $(XEN_ROOT)/xen/include/public/*.h xen/




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.