From 51bed3afae330b8c1b8a87888cc3107cba560c12 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sun, 15 Oct 2023 15:59:57 +0200 Subject: nix: fix md5sum on MacOS The default on MacOS is `md5`, while Nix only has `md5sum` available. Therefore, make it possible to override the variable via the environment so that flake.nix can set the correct binary name. --- GNUmakefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 433356596..9084b145f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -32,9 +32,6 @@ export GOROOT = $(shell $(GO) env GOROOT) # Flags to pass to go test. GOTESTFLAGS ?= -# md5sum binary -MD5SUM = md5sum - # tinygo binary for tests TINYGO ?= $(call detect,tinygo,tinygo $(CURDIR)/build/tinygo) @@ -130,14 +127,14 @@ ifeq ($(OS),Windows_NT) USE_SYSTEM_BINARYEN ?= 1 else ifeq ($(shell uname -s),Darwin) - MD5SUM = md5 + MD5SUM ?= md5 CGO_LDFLAGS += -lxar USE_SYSTEM_BINARYEN ?= 1 else ifeq ($(shell uname -s),FreeBSD) - MD5SUM = md5 + MD5SUM ?= md5 START_GROUP = -Wl,--start-group END_GROUP = -Wl,--end-group else @@ -145,6 +142,9 @@ else END_GROUP = -Wl,--end-group endif +# md5sum binary default, can be overridden by an environment variable +MD5SUM ?= md5sum + # Libraries that should be linked in for the statically linked Clang. CLANG_LIB_NAMES = clangAnalysis clangAST clangASTMatchers clangBasic clangCodeGen clangCrossTU clangDriver clangDynamicASTMatchers clangEdit clangExtractAPI clangFormat clangFrontend clangFrontendTool clangHandleCXX clangHandleLLVM clangIndex clangLex clangParse clangRewrite clangRewriteFrontend clangSema clangSerialization clangSupport clangTooling clangToolingASTDiff clangToolingCore clangToolingInclusions CLANG_LIBS = $(START_GROUP) $(addprefix -l,$(CLANG_LIB_NAMES)) $(END_GROUP) -lstdc++ -- cgit v1.2.3