[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
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. Thanks, -- Anthony PERARD
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |