Makefile: move $(comma), $(empty) and $(space) to shared.mak
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>
Ævar Arnfjörð Bjarmason committed
Mar 3, 2022 at 17:04 UTC
fd15f8a5fa874bd25b25b3322407d65ca189e632
2 files changed
+8
-4
Makefile
-4
@@ -1289,10 +1289,6 @@ endif
1289
ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS)
1290
ALL_LDFLAGS = $(LDFLAGS)
1291
1292
-comma := ,
1293
-empty :=
1294
-space := $(empty) $(empty)
1295
-
1292
ifdef SANITIZE
1293
SANITIZERS := $(foreach flag,$(subst $(comma),$(space),$(SANITIZE)),$(flag))
1294
BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE)
shared.mak
+8
@@ -23,3 +23,11 @@
23
#
24
# info make --index-search=.DELETE_ON_ERROR
25
.DELETE_ON_ERROR:
26
+
27
+### Global variables
28
+
29
+## comma, empty, space: handy variables as these tokens are either
30
+## special or can be hard to spot among other Makefile syntax.
31
+comma := ,
32
+empty :=
33
+space := $(empty) $(empty)