Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:30
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Possibly related (same subject, not in this thread)

Timo Hirvonen [off-list ref] writes:
Junio C Hamano [off-list ref] wrote:
quoted
By the way, I really started hating that we have $(GIT_VERSION)
in $(TRACK_CFLAGS).  Since the version string is tied to the
HEAD commit object name, having it in $(TRACK_CFLAGS) means that
every time I switch branches, make a new commit on top of the
current branch, or checkout-compile-and-then-make-local-change
sequence would force pretty much everything to be rebuilt.
...
quoted
For that matter, I do not think tracking prefix_SQ makes much
sense since what matters are bindir, gitexecdir and template_dir
which are already covered, and prefix is merely a convenience to
set these three (four, counting GIT_PYTHON_DIR; we probably
should add it to TRACK_CFLAGS).
Yes, only ALL_CFLAGS, bindir, gitexecdir, template_dir and
GIT_PYTHON_DIR should be in TRACK_CFLAGS.
Exactly my thinking.  Let's do it like this, then.

-- >8 --
Makefile: do not force unneeded recompilation upon GIT_VERSION changes

---
diff --git a/Makefile b/Makefile
index 55a84d4..d45f3dc 100644
--- a/Makefile
+++ b/Makefile
@@ -612,7 +612,7 @@ tags:
 	find . -name '*.[hcS]' -print | xargs ctags -a
 
 ### Detect prefix changes
-TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):$(GIT_VERSION):\
+TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):$(GIT_PYTHON_DIR_SQ):\
              $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
 
 GIT-CFLAGS: .FORCE-GIT-CFLAGS
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help