diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-04-29 03:02:10 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-05-02 13:06:11 -0400 |
commit | c6a5e4030320c934bca70471d04aa9e7d8e2cd67 (patch) | |
tree | f9176bb14dac4d9da63347e27682dfb809afa257 /Makefile | |
parent | dc6716b83d3f90f8b1b2c611fe4f9f7c9fb14f5e (diff) | |
download | git-c6a5e4030320c934bca70471d04aa9e7d8e2cd67.tar.gz |
git-gui: Track our own embedded values and rebuild when they change
Like core-Git we now track the values that we embed into our shell
script wrapper, and we "recompile" that wrapper if they are changed.
This concept was lifted from git.git's Makefile, where a similar
thing was done by Eygene Ryabinkin. Too bad it wasn't just done
here in git-gui from the beginning, as the git.git Makefile support
for GIT-GUI-VARS was really just because git-gui doesn't do it on
its own.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -53,7 +53,19 @@ $(GITGUI_BUILT_INS): git-gui $(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@ # These can record GITGUI_VERSION -$(patsubst %.sh,%,$(SCRIPT_SH)): GIT-VERSION-FILE +$(patsubst %.sh,%,$(SCRIPT_SH)): GIT-VERSION-FILE GIT-GUI-VARS + +TRACK_VARS = \ + $(subst ','\'',SHELL_PATH='$(SHELL_PATH_SQ)') \ + $(subst ','\'',TCLTK_PATH='$(TCLTK_PATH_SQ)') \ +#end TRACK_VARS + +GIT-GUI-VARS: .FORCE-GIT-GUI-VARS + @VARS='$(TRACK_VARS)'; \ + if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \ + echo 1>&2 " * new locations or Tcl/Tk interpreter"; \ + echo 1>$@ "$$VARS"; \ + fi all:: $(ALL_PROGRAMS) @@ -67,7 +79,8 @@ dist-version: @echo $(GITGUI_VERSION) > $(TARDIR)/version clean:: - rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE + rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE GIT-GUI-VARS .PHONY: all install dist-version clean .PHONY: .FORCE-GIT-VERSION-FILE +.PHONY: .FORCE-GIT-GUI-VARS |