Skip to content

Commit fd15f8a

Browse files
avargitster
authored andcommitted
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 425ca67 (Makefile: allow combining UBSan with other sanitizers, 2017-07-15) for the commit that introduced these. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dad9cd7 commit fd15f8a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,10 +1289,6 @@ endif
12891289
ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS)
12901290
ALL_LDFLAGS = $(LDFLAGS)
12911291

1292-
comma := ,
1293-
empty :=
1294-
space := $(empty) $(empty)
1295-
12961292
ifdef SANITIZE
12971293
SANITIZERS := $(foreach flag,$(subst $(comma),$(space),$(SANITIZE)),$(flag))
12981294
BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE)

shared.mak

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@
2323
#
2424
# info make --index-search=.DELETE_ON_ERROR
2525
.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)

0 commit comments

Comments
 (0)