提交 bc2ed316 编写于 作者: Æ Ævar Arnfjörð Bjarmason 提交者: Junio C Hamano

Makefile: under "make dist", include the sha1collisiondetection submodule

Include the sha1collisiondetection submodule when running "make
dist". Even though we've been shipping the sha1collisiondetection
submodule[1] and using it by default if it's checked out[2] anyone
downloading git as a tarball would just get an empty
sha1collisiondetection/ directory.

Doing this automatically is a feature that's missing from git-archive,
but in the meantime let's bundle this up into the tarball we
ship. This ensures that the DC_SHA1_SUBMODULE flag does what's
intended even in an unpacked tarball, and more importantly means we're
building the exact same code from the same paths from git.git and from
the tarball.

I am not including all the files in the submodule, only the ones git
actually needs (and the licenses), only including some files like this
would be a useful feature if git-archive ever adds the ability to
bundle up submodules.

1. commit 86cfd61e ("sha1dc: optionally use sha1collisiondetection
   as a submodule", 2017-07-01)
2. cac87dc0 ("sha1collisiondetection: automatically enable when
   submodule is populated", 2017-07-01)
Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f39e05f2
......@@ -2642,6 +2642,21 @@ dist: git-archive$(X) configure
$(GIT_TARNAME)/configure \
$(GIT_TARNAME)/version \
$(GIT_TARNAME)/git-gui/version
ifdef DC_SHA1_SUBMODULE
@mkdir -p $(GIT_TARNAME)/sha1collisiondetection/lib
@cp sha1collisiondetection/LICENSE.txt \
$(GIT_TARNAME)/sha1collisiondetection/
@cp sha1collisiondetection/LICENSE.txt \
$(GIT_TARNAME)/sha1collisiondetection/
@cp sha1collisiondetection/lib/sha1.[ch] \
$(GIT_TARNAME)/sha1collisiondetection/lib/
@cp sha1collisiondetection/lib/ubc_check.[ch] \
$(GIT_TARNAME)/sha1collisiondetection/lib/
$(TAR) rf $(GIT_TARNAME).tar \
$(GIT_TARNAME)/sha1collisiondetection/LICENSE.txt \
$(GIT_TARNAME)/sha1collisiondetection/lib/sha1.[ch] \
$(GIT_TARNAME)/sha1collisiondetection/lib/ubc_check.[ch]
endif
@$(RM) -r $(GIT_TARNAME)
gzip -f -9 $(GIT_TARNAME).tar
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册