]> xenbits.xensource.com Git - xen.git/commitdiff
build: don't export building_out_of_srctree
authorJan Beulich <jbeulich@suse.com>
Fri, 5 May 2023 07:10:28 +0000 (09:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 May 2023 07:10:28 +0000 (09:10 +0200)
I don't view a variable of this name as suitable for exporting, the more
that it carries entirely redundant information. The reasons for its
introduction in Linux commit 051f278e9d81 ("kbuild: replace
KBUILD_SRCTREE with boolean building_out_of_srctree") also don't apply
to us. Ditch exporting of the variable, replacing uses suitably.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
xen/Makefile
xen/arch/x86/boot/Makefile
xen/scripts/Makefile.host

index 5166403cff737d6a4c18265c4516c36dd72640c2..745a3fadab290d3f91655643d4f848d0595dacbf 100644 (file)
@@ -208,7 +208,7 @@ endif
 objtree := .
 VPATH := $(srctree)
 
-export building_out_of_srctree srctree objtree VPATH
+export srctree objtree VPATH
 
 export XEN_ROOT := $(abs_srctree)/..
 
index d6bc8fc084ae68cbc4880b570d00da8ba6c3e370..03d8ce3a9e48f11ec125c69c6404afbf5b272230 100644 (file)
@@ -14,7 +14,7 @@ $(obj)/head.o: $(head-bin-objs:.o=.bin)
 CFLAGS_x86_32 := $(subst -m64,-m32 -march=i686,$(XEN_TREEWIDE_CFLAGS))
 $(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS))
 CFLAGS_x86_32 += -Werror -fno-builtin -g0 -msoft-float
-ifdef building_out_of_srctree
+ifneq ($(abs_objtree),$(abs_srctree))
 CFLAGS_x86_32 += -I$(objtree)/include
 endif
 CFLAGS_x86_32 += -I$(srctree)/include
index d6c358095ee823f328294594dd23e42b11f47a42..ed248475755d719c3e6993af679be3f86d781652 100644 (file)
@@ -88,7 +88,7 @@ _hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
                  $(HOSTCXXFLAGS_$(target-stem).o)
 
 # $(objtree)/$(obj) for including generated headers from checkin source files
-ifdef building_out_of_srctree
+ifneq ($(abs_objtree),$(abs_srctree))
 _hostc_flags   += -I $(objtree)/$(obj)
 _hostcxx_flags += -I $(objtree)/$(obj)
 endif