* [PATCH] make dist: allow using an installed version of git
@ 2016-08-27 10:29 Dennis Kaarsemaker
2016-09-01 17:43 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Dennis Kaarsemaker @ 2016-08-27 10:29 UTC (permalink / raw)
To: git
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.
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)
--
2.10.0-rc1-230-g8efea0f
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] make dist: allow using an installed version of git
2016-08-27 10:29 [PATCH] make dist: allow using an installed version of git Dennis Kaarsemaker
@ 2016-09-01 17:43 ` Junio C Hamano
2016-09-01 20:34 ` Dennis Kaarsemaker
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2016-09-01 17:43 UTC (permalink / raw)
To: Dennis Kaarsemaker; +Cc: git
Dennis Kaarsemaker <dennis@kaarsemaker.net> writes:
> 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.
>
> 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] make dist: allow using an installed version of git
2016-09-01 17:43 ` Junio C Hamano
@ 2016-09-01 20:34 ` Dennis Kaarsemaker
0 siblings, 0 replies; 3+ messages in thread
From: Dennis Kaarsemaker @ 2016-09-01 20:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On do, 2016-09-01 at 10:43 -0700, Junio C Hamano wrote:
> Dennis Kaarsemaker <dennis@kaarsemaker.net> writes:
>
> > 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.
Pity. Would save me quite a bit of tarball build time.
> 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.
That's why I didn't want to make it the default, but merely make it an
available option for saving some build time for people who know their
git is up-to-date enough.
D.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-01 21:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-27 10:29 [PATCH] make dist: allow using an installed version of git Dennis Kaarsemaker
2016-09-01 17:43 ` Junio C Hamano
2016-09-01 20:34 ` Dennis Kaarsemaker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).