Re: [PATCHv3 07/11] Makefile: split prefix flags from GIT-CFLAGS
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 20, 2012, 21:28 UTC
- Message-ID
- <20120620212833.GF6142@burratino>
- In-Reply-To
- <20120620183155.GG30995@sigill.intra.peff.net>
Jeff King wrote:
Show 7 quoted lines
> Most of the build targets do not care about the setting of > $prefix (or its derivative variables), but will be rebuilt > if the prefix changes. For most setups this doesn't matter > (they set prefix once and never change it), but for a setup > which puts each branch or version in its own prefix, this > unnecessarily causes a full rebuild whenever the branc is > changed.
Micronit: s/branc/branch/.
[...]
Show 16 quoted lines
> @@ -2385,14 +2391,22 @@ cscope: > $(FIND_SOURCE_FILES) | xargs cscope -b > > ### Detect prefix changes > -TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):\ > - $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\ > - $(localedir_SQ):$(USE_GETTEXT_SCHEME) > +TRACK_PREFIX = $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\ > + $(localedir_SQ) > + > +GIT-PREFIX: FORCE > + @FLAGS='$(TRACK_PREFIX)'; \ > + if test x"$$FLAGS" != x"`cat GIT-PREFIX 2>/dev/null`" ; then \ > + echo 1>&2 " * new prefix flags"; \ > + echo "$$FLAGS" >GIT-PREFIX; \ > + fi
Hmm, nothing to do with this particular patch but the above list includes gitexecdir and not htmldir. Is there any particular logic behind the list of variables?
Nit: I think it would be easier to understand a name like GIT-PATHS (making the absence of htmldir a bug, if not a particularly important one). No other complaints. :)
Thanks. Jonathan