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

Re: [XEN PATCH v7 24/51] build: prepare to always invoke $(MAKE) from xen/, use $(obj)


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 11 Oct 2021 14:39:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y1HE2dfvuc9CnkzlTDnzsaV1VIoHjmm/8odqNlvgVSA=; b=A6503ZaQCsBYMF6+8zlcQVwoeJGOAWIrq4JFQtzkeuDNsxaBhxDwFGKvDLkgAPWfB8jfjcfLD/gERdN13BPub9kPplp+iKUNocwEdbuUeS+ab/pFcxrurzxLos7NJGO4a0Pj091qMqeekho8m/IlSVh07am7Nj+rFVHWbO7IxIvH+o/tans/zWwOhcodBGpFdOpgjI/BQI0BAuWjkls+ovUAVJYMulWNsm5rE5LV14KNZ2CponId4N7dxe+zZS/vIpC4D61SkLf2OTPrVicIrIa/jhWBgydW+buQ0G1LAvUqFVHn878EDg27Abk2F/J+dmbC31UADbPS+7yiGfiSrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=edBC4DTLqXIkjam25ZFRKbElzIIVHmfJ9ltTRUcVWfXzKIpFWVUA9xnPUNbrcSTcFNLwf8OdbiO1PqvV/fduH57kg9X/Qov5G6bjSweYi+kIpfFWeHi0zFPMm24Oa7oUOKoBHijP5mY7dqsT+zGR8hapnfRz5ZT7OwZEBUMjzK8Cfl8MhKrXNVAcWrsOYr1G0tF9oLbiEpF/HSGSfBlFe70P0/u+ObtMYJzTgyIm8t29dsiSbnSv85D/E/xVmkHNWVXAnsyfofpLUoK9RIg+dCUu19JK/oztRKqv9Y4yD6xzcmJskeJS6JaSxBP84ANrXFGSpgnDcJj4PXxP3ipRHw==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 11 Oct 2021 12:39:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2021 12:50, Anthony PERARD wrote:
> In a future patch, when building a subdirectory, we will set
> "obj=$subdir" rather than change directory.
> 
> Before that, we add "$(obj)" and "$(src)" in as many places as
> possible where we will need to know which subdirectory is been built.
> "$(obj)" is for files been generated during the build, and "$(src)" is
> for files present in the source tree.
> 
> For now, we set both to "." in Rules.mk and Makefile.clean.
> 
> A few places don't tolerate the addition of "./", this is because make
> remove the leading "./" in targets and dependencies in rules, so these
> will be change later.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Nevertheless a couple of remarks:

> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
>[...]
> @@ -192,25 +192,25 @@ note_file_option ?= $(note_file)
>  
>  ifeq ($(XEN_BUILD_PE),y)
>  extra-y += efi.lds

What about this? Does this for some reason also fall into the "cannot
be converted yet" group?

> @@ -222,14 +222,14 @@ $(TARGET).efi: FORCE
>  endif
>  
>  # These should already have been rebuilt when building the prerequisite of 
> "prelink.o"
> -efi/buildid.o efi/relocs-dummy.o: ;
> +$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ;
>  
>  .PHONY: include
>  include: $(BASEDIR)/arch/x86/include/asm/asm-macros.h
>  
> -asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P
> +$(obj)/asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P
>  
> -$(BASEDIR)/arch/x86/include/asm/asm-macros.h: asm-macros.i Makefile
> +$(BASEDIR)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i 
> $(src)/Makefile

Isn't this $(obj)/include/asm/asm-macros.h ? And in general doesn't
use of $(BASEDIR) need to go away then, e.g. ...

> --- a/xen/arch/x86/boot/Makefile
> +++ b/xen/arch/x86/boot/Makefile
> @@ -1,8 +1,8 @@
>  obj-bin-y += head.o
>  
> -DEFS_H_DEPS = defs.h $(BASEDIR)/include/xen/stdbool.h
> +DEFS_H_DEPS = $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h

... here needing to become $(src)/../../../include/xen/stdbool.h ?

> --- a/xen/scripts/Makefile.clean
> +++ b/xen/scripts/Makefile.clean
> @@ -3,11 +3,14 @@
>  # Cleaning up
>  # ==========================================================================
>  
> +obj := .
> +src := $(obj)

This repeats what is also getting added to Rules.mk. To prevent
the two going out of sync, wouldn't they better live in a central
place (e.g. scripts/defs.mk)?

Jan




 


Rackspace

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