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

Re: [XEN PATCH v6 07/31] build,include: rework compat-build-source.py

  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 13 Jul 2021 09:37:00 +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-SenderADCheck; bh=IPD3XeB9jTummquCVG4iXWuZyFEN+iUVjpUAtFM9rc8=; b=N7vIHszfK91kzpu6n6Hi4DW9gTsMyJhbaiKeCmPRZtODHkkB49W8ssNeIvLBGoDWHiS+yZhPIz/BeC1DhGeM0+i96TMZJm2ko8GTqO+ln0mcrtvmU9IL+dZnndbYvy6fx2qnTvPGUR0hTMmpbpZNMNcVNdTzvnd3XPCta5hTVzr4pcQnOg1yJVu060fNsV3MzSlqIBFEhrUJcBBtEoZu4mFmva1NqZSdF43+nlN1dN5GM2pu3Yk9u+P5U12o7x9gHNe65oHcK90lHsMlIL70g2RO1eV607LHh2xheMx91kEl5DS1tD+EvvhBmIXIHDI0K2qywIR9wWmuViE0H95cGw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S0YF8x3f7YU8e+mh3U0PnXv+9nOUe5EYnvxxtb7p5XvIZy/imaAOpdQAlEPUPxN92me/qjf/Ix56fcYPT9XfM1iDAzOa9QwQQ2uEYhUycCwCBOEHKamgZNxUNUtzv82H/kFfqDRajHks54o5FbUCCmu1SGqnXPV+5SA6b6uUxHZuvAlq2OGmiPq2gTWz1eH3enenkcFDvNdGefm+pJQfI5VxKdsd+uDIUvEol/htk+xvFuCnQib0pxMjytSiFXVFSUwZBU/YO88QJUF3V9xKoIPTBk4X+2GQxHktT6Gtuh2pwQUHaPLsmroO+O4HRaWarsiLPHlPykjLUkH1WqyUPQ==
  • 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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 13 Jul 2021 07:37:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.07.2021 16:35, Anthony PERARD wrote:
> On Wed, Jul 07, 2021 at 04:58:29PM +0200, Jan Beulich wrote:
>> On 01.07.2021 16:09, Anthony PERARD wrote:
>>> Improvement are:
>>> - give the path to xlat.lst as argument
>>> - include `grep -v` in compat-build-source.py script, we don't need to
>>>   write this in several scripted language.
>>> Also remove dependency on Makefile as the file generation doesn't
>>> depend on it anymore.
>> Did it before any more?
> Kind of, yes, there is "grep -v" that makes the Makefile part of the
> script that generates the target.
>> In the subsequent patch I can see more of
>> a reason to drop the dependency, but neither there nor here I'm
>> really convinced: In general I think every generate file would
>> better depend on the makefile containing the rule used for its
>> building, as a change to that rule means the target wants
>> rebuilding.
> Does that mean that nearly every single targets should depends on a
> "Makefile" or on "Rules.mk" ? :-)

Well, yes, I indeed think so.

> As for the current target "compat/%.c", with this patch applied, the
> only few things that the content of the file depends on is the script,
> the first dependency, and "xlat.lst" (also a dependency). So the
> Makefile doesn't play a role into what get's into the target, the
> "mkdir" and the "mv" don't really matter. If the rule where to be
> changed in a way that changed the content of the target, that would be
> wrong in my opinion, the change should be done in the script.
> If someone wanted to rewrite the script in a different language and thus
> renaming the script, that would be fine too as make would notice that
> the new script is newer that the target (as the file for the script as
> just been created).

Right, but e.g. adding an option to the scrip invocation would then
not trigger a rebuild.

> But, I guess we could start to use the "if_changed" macro here to
> detected rule changes.
> I really don't like when a target depends on a "Makefile" because that
> means the target gets rebuilt for unrelated reason so I'd like to avoid
> dependency on it when possible.

I can see the background of this viewpoint, but personally I think the
extra rebuilds are the price to pay to not have any rebuilds skipped
when they would be needed. Overall it is my understanding that to get
this more fine grained is what if_changed is for.




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