git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] make dist: allow using an installed version of git

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 1, 2016, 17:43 UTC
Message-ID
<xmqq4m5zy0qd.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160827102929.GA11769@hurricane>
Dennis Kaarsemaker <dennis@kaarsemaker.net> writes:
Show 5 quoted lines
> b1de9de2 back in 2005 ensured that we could create a tarball with 'make
> dist' even if git wasn't installed yet. These days however, chances are
> higher that a git version is available. Add a config.mak knob to allow
> people to choose to use the installed version of git to create the
> tarball and avoid the overhead of building git-archive.
Thanks, but not interested.

We do not know what vintage of "git" happens to be installed on the platform, but we know how "git archive" we ship with the source ought to behave.

Show 38 quoted lines
>
> Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
> ---
>  Makefile | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index d96ecb7..3dabb75 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -378,6 +378,9 @@ all::
>  #
>  # to say "export LESS=FRX (and LV=-c) if the environment variable
>  # LESS (and LV) is not set, respectively".
> +#
> +# Define USE_INSTALLED_GIT_ARCHIVE if you don't want to build git-archive as
> +# part of 'make dist', but are happy to rely on a git version on you $PATH
>  
>  GIT-VERSION-FILE: FORCE
>  	@$(SHELL_PATH) ./GIT-VERSION-GEN
> @@ -2423,8 +2426,15 @@ quick-install-html:
>  ### Maintainer's dist rules
>  
>  GIT_TARNAME = git-$(GIT_VERSION)
> -dist: git-archive$(X) configure
> -	./git-archive --format=tar \
> +ifndef USE_INSTALLED_GIT_ARCHIVE
> +	GIT_ARCHIVE = ./git-archive$(X)
> +	GIT_ARCHIVE_DEP = git-archive$(X)
> +else
> +	GIT_ARCHIVE = git archive
> +	GIT_ARCHIVE_DEP =
> +endif
> +dist: $(GIT_ARCHIVE_DEP) configure
> +	$(GIT_ARCHIVE) --format=tar \
>  		--prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar
>  	@mkdir -p $(GIT_TARNAME)
>  	@cp configure $(GIT_TARNAME)
Previous: Dennis KaarsemakerNext: Dennis Kaarsemaker
Message 2 of 3 in “make dist: allow using an installed version of git”
  1. make dist: allow using an installed version of gitDennis Kaarsemaker, Aug 27, 2016
  2. Junio C HamanoSep 1, 2016
  3. Dennis KaarsemakerSep 1, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.