From: Dennis Kaarsemaker <dennis@kaarsemaker.net>
To: git@vger.kernel.org
Subject: [PATCH] make dist: allow using an installed version of git
Date: Sat, 27 Aug 2016 12:29:33 +0200 [thread overview]
Message-ID: <20160827102929.GA11769@hurricane> (raw)
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
next reply other threads:[~2016-08-27 10:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-27 10:29 Dennis Kaarsemaker [this message]
2016-09-01 17:43 ` [PATCH] make dist: allow using an installed version of git Junio C Hamano
2016-09-01 20:34 ` Dennis Kaarsemaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160827102929.GA11769@hurricane \
--to=dennis@kaarsemaker.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.