From: Junio C Hamano Date: Tue, 19 Jun 2012 20:51:14 GMT Subject: Re: [PATCH 3/3] Makefile: split prefix flags from GIT-CFLAGS Message-ID: <7vmx3zyqil.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120619200354.GC14714@sigill.intra.peff.net> Jeff King writes: > 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. s/branc /branch /. I have to wonder if is this something we care about that much. The damage is not too bad from the point of view of linecount, but this embeds the implicit knowledge of dependencies from $prefix to various path variables to selected object files that embed these paths variables by scattering dependencies on GIT-PREFIX in the Makefile, which does not seem to scale very well. I wonder if it makes sense to have a single default-paths.o file that holds these strings and recompile only that file when any of the paths change, to localize the damage. Of course, the current users of GIT_HTML_PATH that expect they can do sizeof(GIT_HTML_PATH)-1 in place of strlen(GIT_HTML_PATH) may need to be adjusted if we go that route. Will queue, but we might want to rethink this a bit more. Thanks.