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

[PATCH 1/2] tools/libs: fix header symlinking rule



Unlike pattern rules, ordinary rules with multiple targets have their
commands executed once per target. Hence when $(LIBHEADERS) expands to
more than just one item, multiple identical commands would have been
issued, which have been observed to cause build failures relatively
frequently after libx{c,l} code was moved to tools/libs/{ctrl,light}/.
Use a static pattern rule instead.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
I'm aware Jürgen has a series pending to entirely remove the rule in
question, but this being an isolated fix which ought to be easier to
review, I thought I'd still post it. Re-basing his series over this
change should be straightforward.
However, for the above reason I'm not bothering getting right the
theoretical case of headers in subdirs of the respective include/ being
mentioned in $(LIBHEADER).

--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -79,8 +79,8 @@ headers.chk: $(LIBHEADERSGLOB) $(AUTOINC
 libxen$(LIBNAME).map:
        echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >$@
 
-$(LIBHEADERSGLOB): $(LIBHEADERS)
-       for i in $(realpath $(LIBHEADERS)); do ln -sf $$i 
$(XEN_ROOT)/tools/include; done
+$(LIBHEADERSGLOB): $(XEN_ROOT)/tools/include/%.h: include/%.h
+       ln -sf $(CURDIR)/$< $(XEN_ROOT)/tools/include/
 
 lib$(LIB_FILE_NAME).a: $(LIB_OBJS)
        $(AR) rc $@ $^




 


Rackspace

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