Skip to content

Commit 52bcf6e

Browse files
committed
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
2 parents 4831c23 + eec6ab5 commit 52bcf6e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3041,6 +3041,9 @@ quick-install-html:
30413041

30423042
### Maintainer's dist rules
30433043

3044+
# Allow tweaking to hide local environment effects, like perm bits.
3045+
# With GNU tar, "--mode=u+rwX,og+rX,og-w" would be a good idea, for example.
3046+
TAR_DIST_EXTRA_OPTS =
30443047
GIT_TARNAME = git-$(GIT_VERSION)
30453048
dist: git-archive$(X) configure
30463049
./git-archive --format=tar \
@@ -3049,7 +3052,7 @@ dist: git-archive$(X) configure
30493052
@cp configure $(GIT_TARNAME)
30503053
@echo $(GIT_VERSION) > $(GIT_TARNAME)/version
30513054
@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version
3052-
$(TAR) rf $(GIT_TARNAME).tar \
3055+
$(TAR) rf $(GIT_TARNAME).tar $(TAR_DIST_EXTRA_OPTS) \
30533056
$(GIT_TARNAME)/configure \
30543057
$(GIT_TARNAME)/version \
30553058
$(GIT_TARNAME)/git-gui/version
@@ -3063,7 +3066,7 @@ ifdef DC_SHA1_SUBMODULE
30633066
$(GIT_TARNAME)/sha1collisiondetection/lib/
30643067
@cp sha1collisiondetection/lib/ubc_check.[ch] \
30653068
$(GIT_TARNAME)/sha1collisiondetection/lib/
3066-
$(TAR) rf $(GIT_TARNAME).tar \
3069+
$(TAR) rf $(GIT_TARNAME).tar $(TAR_DIST_EXTRA_OPTS) \
30673070
$(GIT_TARNAME)/sha1collisiondetection/LICENSE.txt \
30683071
$(GIT_TARNAME)/sha1collisiondetection/lib/sha1.[ch] \
30693072
$(GIT_TARNAME)/sha1collisiondetection/lib/ubc_check.[ch]
@@ -3097,7 +3100,7 @@ dist-doc:
30973100
$(RM) -r .doc-tmp-dir
30983101
mkdir .doc-tmp-dir
30993102
$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
3100-
cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar .
3103+
cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_DIST_EXTRA_OPTS) .
31013104
gzip -n -9 -f $(htmldocs).tar
31023105
:
31033106
$(RM) -r .doc-tmp-dir
@@ -3107,7 +3110,7 @@ dist-doc:
31073110
man5dir=../.doc-tmp-dir/man5 \
31083111
man7dir=../.doc-tmp-dir/man7 \
31093112
install
3110-
cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .
3113+
cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) .
31113114
gzip -n -9 -f $(manpages).tar
31123115
$(RM) -r .doc-tmp-dir
31133116

0 commit comments

Comments
 (0)