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

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

From: Timo Hirvonen <hidden>
Date: 2016-06-15 22:42:30

Junio C Hamano [off-list ref] wrote:
Yakov Lerner [off-list ref] writes:
quoted
Before this patch, -DDEFAULT_GIT_TEMPLATE_DIR was passed on compilation
command line to all and every %c compiled. In fact the macro
is used by only one .c file, and unused by all other .c files.
Remove -DDEFAULT_GIT_TEMPLATE_DIR where unused. Follow the examlpe of 
exec_cmd.o. Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used. 
Thanks.

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.
I think this already makes sure git is compiled if version changes:

# These can record GIT_VERSION
git$X git.spec \
        $(patsubst %.sh,%,$(SCRIPT_SH)) \
        $(patsubst %.perl,%,$(SCRIPT_PERL)) \
        $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
        : GIT-VERSION-FILE

$ git grep GIT_VERSION *.sh *.perl
git-send-email.perl:	my $gitversion = '@@GIT_VERSION@@';
git-send-email.perl:	if ($gitversion =~ m/..GIT_VERSION../) {

Only git-send-email and git needs to depend on GIT_VERSION.
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.

-- 
http://onion.dynserv.net/~timo/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help