Commit a66b51c6 authored by Junio C Hamano's avatar Junio C Hamano

Merge branch 'ab/sha1dc-build'

Push the submodule version of collision-detecting SHA-1 hash
implementation a bit harder on builders.

* ab/sha1dc-build:
  sha1dc_git.h: re-arrange an ifdef chain for a subsequent change
  Makefile: under "make dist", include the sha1collisiondetection submodule
  Makefile: don't error out under DC_SHA1_EXTERNAL if DC_SHA1_SUBMODULE=auto
parents b2e45c69 aa9b3b25
......@@ -1513,7 +1513,9 @@ else
LIB_OBJS += sha1dc_git.o
ifdef DC_SHA1_EXTERNAL
ifdef DC_SHA1_SUBMODULE
ifneq ($(DC_SHA1_SUBMODULE),auto)
$(error Only set DC_SHA1_EXTERNAL or DC_SHA1_SUBMODULE, not both)
endif
endif
BASIC_CFLAGS += -DDC_SHA1_EXTERNAL
EXTLIBS += -lsha1detectcoll
......@@ -2668,6 +2670,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
......
/* Plumbing with collition-detecting SHA1 code */
#ifdef DC_SHA1_SUBMODULE
#include "sha1collisiondetection/lib/sha1.h"
#elif defined(DC_SHA1_EXTERNAL)
#ifdef DC_SHA1_EXTERNAL
#include <sha1dc/sha1.h>
#elif defined(DC_SHA1_SUBMODULE)
#include "sha1collisiondetection/lib/sha1.h"
#else
#include "sha1dc/sha1.h"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment