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

[XEN PATCH v7 50/51] build: specify source tree in include/ for prerequisite


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 24 Aug 2021 11:50:37 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 24 Aug 2021 11:01:37 +0000
  • Ironport-hdrordr: A9a23:tKSuF65bio8NpUvPrAPXwPDXdLJyesId70hD6qhwISY6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU=
  • Ironport-sdr: 4jsNkiXImDfIJLLZOZGWIqMVlMjMO+QFBJMHH+BC9qi49EwwtiuItf0s49pDPfznhjdk6JHjce 3LUwotgP/JhkFXeBfHadoRrNp7M4KiCBWL1VkYooALtdr9cj1kTmhGEY6lNKvgYThaBFWmNgst zEQjxLGBIuYR8+TXC5OitDX1vJhDNkAooXAmz9ApP9lWiOJZyiFHyUYj0O2QvDHjk3XY8GIAZl 4n9B6IY1oSOkGkdR3zmlcZeY3nRXcCG8d3Y6TIn1u7YOVy2zmk6MofpzgZKwcWTUxZD+bSv6LD qL0Jzh/1WMby5042szX1/Q3e
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

When doing an out-of-tree build, and thus setting VPATH,
GNU Make 0.81 on Ubuntu Trusty complains about Circular dependency of
include/Makefile and include/xlat.lst and drop them. The build fails
later due to headers malformed.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 xen/include/Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/xen/include/Makefile b/xen/include/Makefile
index 2cd779a4108c..b94cfea74660 100644
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -42,19 +42,19 @@ endif
 .PHONY: all
 all: $(addprefix $(obj)/,$(headers-y))
 
-$(obj)/compat/%.h: $(obj)/compat/%.i $(src)/Makefile 
$(srctree)/tools/compat-build-header.py
+$(obj)/compat/%.h: $(obj)/compat/%.i $(srctree)/$(src)/Makefile 
$(srctree)/tools/compat-build-header.py
        $(PYTHON) $(srctree)/tools/compat-build-header.py <$< $(patsubst 
$(obj)/%,%,$@) >>$@.new; \
        mv -f $@.new $@
 
-$(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile
+$(obj)/compat/%.i: $(obj)/compat/%.c $(srctree)/$(src)/Makefile
        $(CPP) $(filter-out -Wa$(comma)% -include 
%/include/xen/config.h,$(XEN_CFLAGS)) $(cppflags-y) -o $@ $<
 
-$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(src)/Makefile 
$(srctree)/tools/compat-build-source.py
+$(obj)/compat/%.c: $(src)/public/%.h $(srctree)/$(src)/xlat.lst 
$(srctree)/$(src)/Makefile $(srctree)/tools/compat-build-source.py
        mkdir -p $(@D)
        $(PYTHON) $(srctree)/tools/compat-build-source.py 
$(srctree)/$(src)/xlat.lst <$< >$@.new
        mv -f $@.new $@
 
-$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst 
$(srctree)/tools/get-fields.sh $(src)/Makefile
+$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst 
$(srctree)/tools/get-fields.sh $(srctree)/$(src)/Makefile
        export PYTHON=$(PYTHON); \
        while read what name; do \
                $(SHELL) $(srctree)/tools/get-fields.sh "$$what" compat_$$name 
$< || exit $$?; \
@@ -62,7 +62,7 @@ $(obj)/compat/.xlat/%.h: $(obj)/compat/%.h 
$(obj)/compat/.xlat/%.lst $(srctree)/
        mv -f $@.new $@
 
 .PRECIOUS: $(obj)/compat/.xlat/%.lst
-$(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile
+$(obj)/compat/.xlat/%.lst: $(srctree)/$(src)/xlat.lst 
$(srctree)/$(src)/Makefile
        mkdir -p $(@D)
        grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re 
's,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new
        $(call move-if-changed,$@.new,$@)
@@ -70,7 +70,7 @@ $(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile
 xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 
's,^[?!][[:blank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(srctree)/$(src)/xlat.lst | 
uniq)
 xlat-y := $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y))
 
-$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) 
$(obj)/config/auto.conf $(src)/Makefile
+$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) 
$(obj)/config/auto.conf $(srctree)/$(src)/Makefile
        cat $(filter %.h,$^) >$@.new
        mv -f $@.new $@
 
@@ -97,7 +97,7 @@ PUBLIC_C99_HEADERS := $(addprefix $(hdrs-path)/, 
$(c99-headers))
 $(src)/public/io/9pfs.h-prereq := string
 $(src)/public/io/pvcalls.h-prereq := string
 
-$(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile
+$(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(srctree)/$(src)/Makefile
        for i in $(filter %.h,$^); do \
            $(CC) -x c -ansi -Wall -Werror -include stdint.h \
                  -S -o /dev/null $$i || exit 1; \
@@ -105,7 +105,7 @@ $(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile
        done >$@.new
        mv $@.new $@
 
-$(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Makefile
+$(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(srctree)/$(src)/Makefile
        rm -f $@.new
        $(foreach i, $(filter %.h,$^),                                        \
            echo "#include "\"$(i)\"                                          \
@@ -115,7 +115,7 @@ $(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Makefile
            || exit $$?; echo $(i) >> $@.new;)
        mv $@.new $@
 
-$(obj)/headers++.chk: $(PUBLIC_HEADERS) $(src)/Makefile
+$(obj)/headers++.chk: $(PUBLIC_HEADERS) $(srctree)/$(src)/Makefile
        rm -f $@.new
        if ! $(CXX) -v >/dev/null 2>&1; then                                  \
            touch $@.new;                                                     \
-- 
Anthony PERARD




 


Rackspace

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