]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Makefile: move $(comma), $(empty) and $(space) to shared.mak
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 3 Mar 2022 16:04:17 +0000 (17:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Mar 2022 22:14:55 +0000 (14:14 -0800)
Move these variables over to the shared.mak, we'll make use of them in
a subsequent commit.

Note that there's reason for these to be "simply expanded variables",
i.e. to use ":=" assignments instead of lazily expanded "="
assignments. We could use "=", but let's leave this as-is for now for
ease of review.

See 425ca6710b2 (Makefile: allow combining UBSan with other
sanitizers, 2017-07-15) for the commit that introduced these.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
shared.mak

index ce3627209479c946341649cc129d0b6db568584b..1e7a1277ce984a14f8be836a9eddf2a6549ca266 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1289,10 +1289,6 @@ endif
 ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 
-comma := ,
-empty :=
-space := $(empty) $(empty)
-
 ifdef SANITIZE
 SANITIZERS := $(foreach flag,$(subst $(comma),$(space),$(SANITIZE)),$(flag))
 BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE)
index 1dda948df09c8cd924c6a47ea96ca5626b2a3a5c..934bf428936f9f29a8b8a9f8913fde9c1df1cb5d 100644 (file)
 #
 #    info make --index-search=.DELETE_ON_ERROR
 .DELETE_ON_ERROR:
+
+### Global variables
+
+## comma, empty, space: handy variables as these tokens are either
+## special or can be hard to spot among other Makefile syntax.
+comma := ,
+empty :=
+space := $(empty) $(empty)