Thread (49 messages) flat view 49 messages, 4 authors, 2016-06-15

Re: [PATCH 3/3] Makefile: split prefix flags from GIT-CFLAGS

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:08

Possibly related (same subject, not in this thread)

Jeff King [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help