Skip to content

Commit 93e7031

Browse files
rscharfegitster
authored andcommitted
Makefile: use git init/add/commit/archive for dist-doc
Reduce the dependency on external tools by generating the distribution archives for HTML documentation and manpages using git commands instead of tar. This gives the archive entries the same meta data as those in the dist archive for binaries. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d4a3924 commit 93e7031

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,11 +3105,15 @@ artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \
31053105
htmldocs = git-htmldocs-$(GIT_VERSION)
31063106
manpages = git-manpages-$(GIT_VERSION)
31073107
.PHONY: dist-doc distclean
3108-
dist-doc:
3108+
dist-doc: git$X
31093109
$(RM) -r .doc-tmp-dir
31103110
mkdir .doc-tmp-dir
31113111
$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
3112-
cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_DIST_EXTRA_OPTS) .
3112+
./git -C .doc-tmp-dir init
3113+
./git -C .doc-tmp-dir add .
3114+
./git -C .doc-tmp-dir commit -m htmldocs
3115+
./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \
3116+
> $(htmldocs).tar
31133117
gzip -n -9 -f $(htmldocs).tar
31143118
:
31153119
$(RM) -r .doc-tmp-dir
@@ -3119,7 +3123,11 @@ dist-doc:
31193123
man5dir=../.doc-tmp-dir/man5 \
31203124
man7dir=../.doc-tmp-dir/man7 \
31213125
install
3122-
cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) .
3126+
./git -C .doc-tmp-dir init
3127+
./git -C .doc-tmp-dir add .
3128+
./git -C .doc-tmp-dir commit -m manpages
3129+
./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \
3130+
> $(manpages).tar
31233131
gzip -n -9 -f $(manpages).tar
31243132
$(RM) -r .doc-tmp-dir
31253133

0 commit comments

Comments
 (0)