[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Wed, 13 Oct 2021 11:57:30 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • 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: Wed, 13 Oct 2021 10:58:02 +0000
  • Ironport-data: A9a23:zxZJPKwuugFiJ2tdgo56t+drwCrEfRIJ4+MujC+fZmUNrF6WrkVRz 2YcWG2GMq6PNmH2f4wiPIS1o0JS6pfRy4drGQE5qyAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAsLeNYYH1500s6w7di2tcAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt9Zxx Y5ilpyidSsCMPLGt/wiTRthED4raMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvV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o6jV28byLVVRpEyON0CENfqFoNI4Fw Ps6vJJE4QKIlRd3YM2NiTpZ9jrQIyVYAbknrJwTHKTilhEvlgNZeZXZByL7vMOPZtFLPhV4K zOYnvOf1bFVx06EeHsvD3ndm+FagM1W6hxNyVYDIXWPm8bE2aBrjEEAr2xvQ1QH1AhD3sJyJ nNvZh98Kqi59jt1gNROAjK3EAZbCRzFokH8xjPlToECo5VEgoAVEFAABA==
  • Ironport-hdrordr: A9a23:m0qQ/aADBMoBFhnlHems55DYdb4zR+YMi2TC1yhKJyC9Vvbo8/ xG/c5rsCMc5wx9ZJhNo7y90ey7MBThHP1OkOss1NWZPDUO0VHAROoJ0WKh+UyCJ8SXzJ866U 4KSclD4bPLYmRHsQ==
  • Ironport-sdr: 9aw6QF7gd3EGIj02fAF/tqqup6WIU9pNfpN8wkAqF5WtwgVflP6pHAtk+gE9Dmf6GA3zdz/c7Z b/eER/f473kLZ7gUIsvyR9hHZjavIEyEwfTsW33cDS2z+pWkVhBnjeJ17WR7Pdd7qgc2Yjbewi Ck/lgLQq9g9nNBYaSgx13McUT9P5yV2oEXezsrGPC/UbCa4DJc7F9ljHgqGJvwM2veTRl+H+KN TO1X3nwTFiyg1Y5G4hySFDMZU4ZVp9Fyo4Udxeke621TeEQpZVca7jjRS0rTONvIclsM8RC0EA acGjFaTNkGN+jWcW4VqkDA4d
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 11, 2021 at 02:39:26PM +0200, Jan Beulich wrote:
> 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?

$(extra-y) is treated the same way as $(obj-y), it is used to list item
to build in the current subdirectory. So there is no need to add $(obj)/

> > @@ -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. ...

I've limited this patch to add $(obj)/ and $(src)/ were needed, I think.

And yes, BASEDIR will need to go away.

> > --- 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 ?

BASEDIR will be dealt with later.

> > --- 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)?

It looks like they are the same but they are not, it doesn't matter if
they go out of sync, and they actually do in my patch series.

Thanks,

-- 
Anthony PERARD



 


Rackspace

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