From: Junio C Hamano Date: Mon, 16 Jul 2012 04:39:17 +0000 (-0700) Subject: Merge branch 'jn/makefile-cleanup' X-Git-Tag: v1.7.12-rc0~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d06414b9ce66137a7c7464fbc6ce3512c51dc3de;p=git.git Merge branch 'jn/makefile-cleanup' Tightens dependency rules to avoid unnecessary recompilation, and cleans up our Makefile in general. * jn/makefile-cleanup: Makefile: document ground rules for target-specific dependencies Makefile: move GIT-VERSION-FILE dependencies closer to use Makefile: build instaweb similar to other scripts Makefile: update scripts when build-time parameters change Makefile: do not replace @@GIT_VERSION@@ in shell scripts Makefile: split prefix flags from GIT-CFLAGS Makefile: be silent when only GIT_USER_AGENT changes Makefile: split GIT_USER_AGENT from GIT-CFLAGS Makefile: do not replace @@GIT_USER_AGENT@@ in scripts Makefile: apply dependencies consistently to sparse/asm targets Makefile: do not have git.o depend on common-cmds.h Makefile: fold XDIFF_H and VCSSVN_H into LIB_H Makefile: fold MISC_H into LIB_H Makefile: sort LIB_H list --- d06414b9ce66137a7c7464fbc6ce3512c51dc3de diff --cc Makefile index dc7090296,af95b70fd..285c660e1 --- a/Makefile +++ b/Makefile @@@ -1934,12 -1922,11 +1932,15 @@@ endi GIT_USER_AGENT_SQ = $(subst ','\'',$(GIT_USER_AGENT)) GIT_USER_AGENT_CQ = "$(subst ",\",$(subst \,\\,$(GIT_USER_AGENT)))" GIT_USER_AGENT_CQ_SQ = $(subst ','\'',$(GIT_USER_AGENT_CQ)) - BASIC_CFLAGS += -DGIT_USER_AGENT='$(GIT_USER_AGENT_CQ_SQ)' + GIT-USER-AGENT: FORCE + @if test x'$(GIT_USER_AGENT_SQ)' != x"`cat GIT-USER-AGENT 2>/dev/null`"; then \ + echo '$(GIT_USER_AGENT_SQ)' >GIT-USER-AGENT; \ + fi +ifdef DEFAULT_HELP_FORMAT +BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='"$(DEFAULT_HELP_FORMAT)"' +endif + ALL_CFLAGS += $(BASIC_CFLAGS) ALL_LDFLAGS += $(BASIC_LDFLAGS)