[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [XEN PATCH v3 16/23] xen/build: introduce if_changed and if_changed_rule
On Wed, Mar 04, 2020 at 04:45:36PM +0100, Jan Beulich wrote: > On 26.02.2020 12:33, Anthony PERARD wrote: > > The if_changed macro from Linux can record the command used to build a > > target then compare it on rebuild. Thus if a command has changed, for > > example due to introducing new flags in CFLAGS or due to using a > > different compiler, the target will be rebuilt. > > As to using a different compiler - I suppose this means "a compiler > with a different executable name" here? What about me having, say > gcc-5 in use, and then updating my system such that a 5.2 based > compiler of this name would be upgraded to a 5.4 based one of this > same name. If this newer compiler has better capabilities (that we > would want to use if available), would this or anything else trigger > a rebuild then too? I think I should have written "command line" instead of just "command". When writing about "different compiler" I was mostly thinking about GCC vs clang, not really about versions. I think Linux has something that detects when the compiler version changes, but that maybe to only trigger kconfig, to regenerate the .config file. But as you say, if the newer compiler has better capabilities, and the *FLAGS are changed, then that would trigger a rebuild if other dependency hasn't changed. I'll try to reword the commit message, and copy some documentation from Linux, since it has some for this. > > > --- a/.gitignore > > +++ b/.gitignore > > @@ -6,6 +6,7 @@ > > *.o > > *.d > > *.d2 > > +.*.cmd > > *.opic > > *.a > > *.so > > I admit these entries aren't sorted very well, but anyway - how > did you end up with this insertion point? There are entries I basically put it with the other dependency files, *.d and *.d2. > starting with . at the very top of the file. (As an aside, I > wonder why it's *.d and *.d2 rather than .*.d and .*.d2 .) I'll move .*.cmd to the top and ignore that .gitignore ignore more than necessary. > > --- a/xen/Makefile > > +++ b/xen/Makefile > > @@ -52,7 +52,57 @@ dist: install > > +ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) > > + quiet=silent_ > > +endif > > Throughout the above, can the uses of = please become consistent? > Preferable all with a blank on the left and - unless there's no > value getting assigned - one on the right, plus := preferred over > = where not prohibited by other constraints (none here afaics). I'll try. > > --- a/xen/scripts/Kbuild.include > > +++ b/xen/scripts/Kbuild.include > > @@ -2,11 +2,30 @@ > > #### > > # kbuild: Generic definitions > > > > +# Convenient variables > > +squote := ' > > +empty := > > +space := $(empty) $(empty) > > +space_escape := _-_SPACE_-_ > > +pound := \# > > Nit: To fit with the three ones above space_escape you want to > add two blanks here. Will do. Thanks, -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |