Stop complaining about hash tool not found
If build_dir is set the zstd build complains about md5sum not being found. Fix this by checking if build_dir is set before checking and using the hash tool just like in lib/Makefile .
This commit is contained in:
committed by
Nick Terrell
parent
980f3bbf83
commit
e7647180cd
+2
-1
@@ -100,6 +100,8 @@ ZSTD_ALL_SRC = $(ZSTDLIB_LOCAL_SRC) $(ZSTD_CLI_SRC)
|
|||||||
ZSTD_ALL_OBJ := $(ZSTD_ALL_SRC:.c=.o)
|
ZSTD_ALL_OBJ := $(ZSTD_ALL_SRC:.c=.o)
|
||||||
|
|
||||||
UNAME := $(shell uname)
|
UNAME := $(shell uname)
|
||||||
|
|
||||||
|
ifndef BUILD_DIR
|
||||||
ifeq ($(UNAME), Darwin)
|
ifeq ($(UNAME), Darwin)
|
||||||
HASH ?= md5
|
HASH ?= md5
|
||||||
else ifeq ($(UNAME), FreeBSD)
|
else ifeq ($(UNAME), FreeBSD)
|
||||||
@@ -112,7 +114,6 @@ endif
|
|||||||
HASH ?= md5sum
|
HASH ?= md5sum
|
||||||
HAVE_HASH :=$(shell echo 1 | $(HASH) > /dev/null && echo 1 || echo 0)
|
HAVE_HASH :=$(shell echo 1 | $(HASH) > /dev/null && echo 1 || echo 0)
|
||||||
|
|
||||||
ifndef BUILD_DIR
|
|
||||||
HASH_DIR = conf_$(shell echo $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(ZSTD_FILES) | $(HASH) | cut -f 1 -d " ")
|
HASH_DIR = conf_$(shell echo $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(ZSTD_FILES) | $(HASH) | cut -f 1 -d " ")
|
||||||
ifeq ($(HAVE_HASH),0)
|
ifeq ($(HAVE_HASH),0)
|
||||||
$(info warning : could not find HASH ($(HASH)), needed to differentiate builds using different flags)
|
$(info warning : could not find HASH ($(HASH)), needed to differentiate builds using different flags)
|
||||||
|
|||||||
Reference in New Issue
Block a user