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

Re: [XEN PATCH v8 30/47] build: rework "headers*.chk" prerequisite in include/


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 18 Jan 2022 11:41:01 +0000
  • Authentication-results: esa4.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>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Jan 2022 11:41:15 +0000
  • Ironport-data: A9a23:VghI4qpZDg+uwa212LMZThifWyReBmKTYhIvgKrLsJaIsI4StFCzt garIBnQOP7famKgKI8lbYqyoBhT6J/dmINmTARlqy02QihG9JuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlZT4vE2xbuKU5NTsY0idfic5Dndx4f5fs7Rh2NQw2IHpW1rlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnZ2QViZqLozvocgcXDRaPT1OAf0cqIaSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFIoZpnFnyyCfFfs8SIrPa67L+cVZzHE7gcUm8fP2O ZZCNWcwM0WojxtnFQ0mV5QSgr+RmiP1bCV29lHFvJAM2j2GpOB2+Oe0a4eEEjCQfu1OhVqRr G/C+2X/AzkZOcaZxD7D9Wij7sfQmQvrVYRUE6e3ntZ6jVvWymENBRk+UVq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r: A9a23:OB+0Iqu3VFTfxxSHTNlq0D9q7skDdtV00zEX/kB9WHVpmszxra 6TddAgpHvJYVcqKRQdcL+7VZVoLUmxyXcx2/h3AV7AZniFhILLFuFfBOLZqlWKcREWtNQttp uIG5IObuEYZmIasS+V2maFL+o=
  • Ironport-sdr: hesjMCSwHbE2QiGA8GD6g8Cr5Gw7sOHzM3frikIUszfVeKvsli9qhqpLNDge0JpgOB0kV6pBy8 /UPEriuD8LECow81JLRSqONyhjrYVbKkC2mhnW2mvMzz7UW/WOyaueZH6Zmptuvq01DKM1vx+N 1BLVUk4ZFv4N9aRWpdYDVW78kqiD0elFnGjP1zmFZBmVPsmMZWIzvld9iGIlYSR5mCwX6O/XuY 0gi5IF1YWN40p5lMyhCdZtO9MLQNKW/KZpXimIcR6ObnFct9Vdh+H5uzrIoT4UFJZfAaP9qIaQ pkuU5Te4gvcP4MvjhdlOozca
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Dec 21, 2021 at 03:07:52PM +0100, Jan Beulich wrote:
> On 25.11.2021 14:39, Anthony PERARD wrote:
> > @@ -81,10 +81,21 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
> >  
> >  all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk
> >  
> > -PUBLIC_HEADERS := $(filter-out $(src)/public/arch-% 
> > $(src)/public/dom0_ops.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h) 
> > $(public-y))
> > +public-hdrs-path := $(srcdir)/public
> >  
> > -PUBLIC_C99_HEADERS := $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h
> > -PUBLIC_ANSI_HEADERS := $(filter-out $(src)/public/%ctl.h 
> > $(src)/public/xsm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), 
> > $(PUBLIC_HEADERS))
> > +public-list-headers = $(wildcard $1/*.h $1/*/*.h)
> > +public-filter-headers = $(filter-out $(addprefix 
> > $(public-hdrs-path)/,$($1-filter)), $($1))
> > +
> > +public-c99-headers := io/9pfs.h io/pvcalls.h
> > +public-headers := $(call public-list-headers,$(public-hdrs-path)) 
> > $(public-y)
> > +public-ansi-headers := $(public-headers)
> 
> Personally I find it odd for public-c99-headers to be first in this group.
> Further down, in the upper-case counterparts, you have it at the end (still
> in context below).
> 
> > +public-headers-filter := dom0_ops.h arch-%
> 
> What is the criteria to be listed here vs ...
> 
> > +public-ansi-headers-filter := %ctl.h xsm/% %hvm/save.h 
> > $(public-headers-filter) $(public-c99-headers)
> 
> ... outside of that macro's expansion here? There's no other use of the
> macro that I can spot, so its presence is puzzling me.

The "%-filter" macro are used by the macro "public-filter-headers",
which takes "$(%)" and filter-out "$(%-filter)".

Currently, PUBLIC_ANSI_HEADERS is PUBLIC_HEADERS with headers
filtered-out.
And PUBLIC_HEADERS is public-y with headers filtered-out.

In my patch, I derive PUBLIC_ANSI_HEADERS from public-y, so I also need
to use the filter used to generate PUBLIC_HEADERS. So
$(public-headers-filter) is both used on its own and in the ansi-filter.

> > +PUBLIC_HEADERS := $(call public-filter-headers,public-headers)
> > +PUBLIC_ANSI_HEADERS := $(call public-filter-headers,public-ansi-headers)
> > +PUBLIC_C99_HEADERS := $(addprefix $(public-hdrs-path)/, 
> > $(public-c99-headers))
> 
> While benign right now, wouldn't it be more consistent if
> public-filter-headers was also applied in this last case? Or is
> there a reason not to?

It wouldn't work at the moment because $(public-c99-headers) aren't
prefix with "$(public-hdrs-path)" like $(public-headers). This is
because I'm using $(public-c99-headers) in
$(public-ansi-headers-filter).

Maybe I should just had the prefix to the c99-headers and removing the
prefix when using it in the filter, something like that:

    public-c99-headers := $(addprefix $(public-hdrs-path)/,io/9pfs.h 
io/pvcalls.h)
    public-ansi-headers-filter := %ctl.h xsm/% %hvm/save.h 
$(public-headers-filter) \
        $(patsubst $(public-hdrs-path)/%,%,$(public-c99-headers))

then I thin that would work:
    PUBLIC_C99_HEADERS := $(call public-filter-headers,public-c99-headers)

I could put an empty "public-c99-headers-filter :=" somewhere, just in
case one is looking for it later.

Thanks,

-- 
Anthony PERARD



 


Rackspace

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