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

Re: [XEN PATCH v6 17/31] build: convert binfile use to if_changed


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 12 Jul 2021 17:32:47 +0100
  • 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>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 12 Jul 2021 16:32:57 +0000
  • Ironport-hdrordr: A9a23:lLzoDKFazmVvpUcApLqEEseALOsnbusQ8zAXPiBKJCC9vPb5qy nOpoV+6faQslwssR4b9uxoVJPvfZq+z+8R3WByB8bAYOCOggLBQL2KhbGI/9SKIVydygcy78 Zdm6gVMqyMMbB55/yKnDVRxbwbsaa6GKPDv5ah8590JzsaDJ2Jd21Ce32m+ksdfnghObMJUK Cyy+BgvDSadXEefq2AdwM4t7iqnayzqHr+CyR2fyIa1A==
  • Ironport-sdr: SCMWdATDDpfEzRf6O7buMkpv1TprRQxLbNWdQM5/6DL202IqcZMASy0Fk7L5g4TH97zWlhTlbT +c0RDVKF50sHCgOJXzr9A9RPssML6Fs5oqj8616c+3BlTUHOf1fvvuAuz7S5Q2FnZCsUkEylXi f2CTVp4NUw/O8qQwHZChkD1kkkYCu3Aa16XTEHHrfnuNlco7ix/fWpEYZGCKDq5e3Y5ncSI0/3 86aFqUV9UcWZ2Ndo16BHFUo+Y7z57p0khSw7kbPSwhVyZfhQ0zd4i0MUpdRk7QTJL8MPeFjNqF Z/g=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jul 07, 2021 at 05:48:57PM +0200, Jan Beulich wrote:
> On 01.07.2021 16:09, Anthony PERARD wrote:
> > --- a/xen/common/Makefile
> > +++ b/xen/common/Makefile
> > @@ -80,8 +80,12 @@ config.gz: $(CONF_FILE)
> >  
> >  config_data.o: config.gz
> >  
> > -config_data.S: $(BASEDIR)/tools/binfile
> > -   $(SHELL) $(BASEDIR)/tools/binfile $@ config.gz xen_config_data
> > +quiet_cmd_binfile = BINFILE $@
> > +cmd_binfile = $(SHELL) $< $@ config.gz xen_config_data
> 
> This is an abuse of $< which I consider overly confusing:
> $(BASEDIR)/tools/binfile is not the input file to the rule. Instead
> the script generates an assembly file "out of thin air", with not
> input files at all. The rule and ...
> 
> > +config_data.S: $(BASEDIR)/tools/binfile FORCE
> 
> ... dependency shouldn't give a different impression. What would
> be nice (without having checked how difficult this might be) would
> be if quiet_cmd_binfile and cmd_binfile could move to xen/Rules.mk
> and merely be used from here (and the other location, where the
> same concern obviously applies).

I've though of having cmd_binfile in Rules.mk, but it's made more
complicated by having a "-i" flag used in flask/.

So one things I've writen was:

config_data.S: $(BASEDIR)/tools/binfile FORCE
       $(call if_changed,binfile,,config.gz xen_config_data)
flask-policy.S: $(BASEDIR)/tools/binfile FORCE
       $(call if_changed,binfile,-i,policy.bin xsm_flask_init_policy)

with:
cmd_binfile = $(SHELL) $(BASEDIR)/tools/binfile $(2) $@ $(3)

I thought this would be confusing, so I avoid it.
But maybe with the lists of flags at the end, it would be better:
   $(call if_changed,binfile,policy.bin xsm_flask_init_policy,-i)

Still want to move cmd_binfile to Rules.mk?

But I can at least spell "tools/binfile" instead of using $<.

Thanks,

-- 
Anthony PERARD



 


Rackspace

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