summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-19 00:58:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-19 00:58:05 (GMT)
commit52bcf6e181eabe55266e6c8e85cfaf336a013f3d (patch)
treeed368264fc57551f3eac65d018174e31b18b56cf /Makefile
parent4831c23f75556df8906a508454d70faca0facd27 (diff)
parenteec6ab5423ea288bf9f75f021aeb27905337a089 (diff)
downloadgit-52bcf6e181eabe55266e6c8e85cfaf336a013f3d.zip
git-52bcf6e181eabe55266e6c8e85cfaf336a013f3d.tar.gz
git-52bcf6e181eabe55266e6c8e85cfaf336a013f3d.tar.bz2
Merge branch 'jc/dist-tarball-tweak'
Allow maintainers to tweak $(TAR) invocations done while making distribution tarballs. * jc/dist-tarball-tweak: Makefile: allow extra tweaking of distribution tarball
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3418e8c..f1b1bc8 100644
--- a/Makefile
+++ b/Makefile
@@ -3041,6 +3041,9 @@ quick-install-html:
### Maintainer's dist rules
+# Allow tweaking to hide local environment effects, like perm bits.
+# With GNU tar, "--mode=u+rwX,og+rX,og-w" would be a good idea, for example.
+TAR_DIST_EXTRA_OPTS =
GIT_TARNAME = git-$(GIT_VERSION)
dist: git-archive$(X) configure
./git-archive --format=tar \
@@ -3049,7 +3052,7 @@ dist: git-archive$(X) configure
@cp configure $(GIT_TARNAME)
@echo $(GIT_VERSION) > $(GIT_TARNAME)/version
@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version
- $(TAR) rf $(GIT_TARNAME).tar \
+ $(TAR) rf $(GIT_TARNAME).tar $(TAR_DIST_EXTRA_OPTS) \
$(GIT_TARNAME)/configure \
$(GIT_TARNAME)/version \
$(GIT_TARNAME)/git-gui/version
@@ -3063,7 +3066,7 @@ ifdef DC_SHA1_SUBMODULE
$(GIT_TARNAME)/sha1collisiondetection/lib/
@cp sha1collisiondetection/lib/ubc_check.[ch] \
$(GIT_TARNAME)/sha1collisiondetection/lib/
- $(TAR) rf $(GIT_TARNAME).tar \
+ $(TAR) rf $(GIT_TARNAME).tar $(TAR_DIST_EXTRA_OPTS) \
$(GIT_TARNAME)/sha1collisiondetection/LICENSE.txt \
$(GIT_TARNAME)/sha1collisiondetection/lib/sha1.[ch] \
$(GIT_TARNAME)/sha1collisiondetection/lib/ubc_check.[ch]
@@ -3097,7 +3100,7 @@ dist-doc:
$(RM) -r .doc-tmp-dir
mkdir .doc-tmp-dir
$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
- cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar .
+ cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_DIST_EXTRA_OPTS) .
gzip -n -9 -f $(htmldocs).tar
:
$(RM) -r .doc-tmp-dir
@@ -3107,7 +3110,7 @@ dist-doc:
man5dir=../.doc-tmp-dir/man5 \
man7dir=../.doc-tmp-dir/man7 \
install
- cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .
+ cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) .
gzip -n -9 -f $(manpages).tar
$(RM) -r .doc-tmp-dir