Skip to content

Commit f39e05f

Browse files
avargitster
authored andcommitted
Makefile: don't error out under DC_SHA1_EXTERNAL if DC_SHA1_SUBMODULE=auto
Fix a logic error in the initial introduction of DC_SHA1_EXTERNAL. If git.git has a sha1collisiondetection submodule checked out the logic to set DC_SHA1_SUBMODULE=auto would interact badly with the check for whether DC_SHA1_SUBMODULE was set. It would error out, meaning that there's no way to build git with DC_SHA1_EXTERNAL=YesPlease without deinit-ing the submodule. Instead, adjust the logic to only fire if the variable is to something else than "auto" which would mean it's a mistake on the part of whoever's building git, not just the Makefile tripping over its own logic. 1. 3964cbb ("sha1dc: allow building with the external sha1dc library", 2017-08-15) 2. cac87dc ("sha1collisiondetection: automatically enable when submodule is populated", 2017-07-01) Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1a4e40a commit f39e05f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,9 @@ else
14971497
LIB_OBJS += sha1dc_git.o
14981498
ifdef DC_SHA1_EXTERNAL
14991499
ifdef DC_SHA1_SUBMODULE
1500+
ifneq ($(DC_SHA1_SUBMODULE),auto)
15001501
$(error Only set DC_SHA1_EXTERNAL or DC_SHA1_SUBMODULE, not both)
1502+
endif
15011503
endif
15021504
BASIC_CFLAGS += -DDC_SHA1_EXTERNAL
15031505
EXTLIBS += -lsha1detectcoll

0 commit comments

Comments
 (0)