[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 12 Jul 2021 15:35:20 +0100
  • Authentication-results: esa5.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: Mon, 12 Jul 2021 14:35:34 +0000
  • Ironport-hdrordr: A9a23:cxwA46sR2UW2DmtSTiIOCifV7skDZdV00zEX/kB9WHVpm6uj5q KTdZUgpHzJYVkqNU3I9ertBEDiexPhHPxOj7X5VI3KNGKNhILBFvAH0WKI+Vzd8kPFmdK1rp 0QFpRDNA==
  • Ironport-sdr: /H15ZIHrqPax3rtyH9+BJF5cIyPNLlOHesyC2rXS18ZSh1YUG31MVA8GtNDBEmiwMRVp9JkncT 9lnY4bvcj/kwXfmjIR9R95AwwyrjFhd+T/lbRqsV+XpewcCVhOjOp6pkHpgMq8meyK8b3kVNEI 7Rtmwu4gYb6NzFz+0+ipn6KsjbL8olEAXPBIok2dj94qYbjh1G7WvBgyo+n8BLw5fVRylzUCAw G/ZKAX2CQsNmPGZ7J4sXA2XQm8Hla2M4CEMOMEvejXAsu83js0KpGA/UtUXR+n8imnAg6OVqoy jXY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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

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

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.

> Therefore for the moment ...
> > Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> ... this holds only with the dependency kept in place. But I'll
> be happy to get convinced otherwise.


Anthony PERARD



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