1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-04 17:06:12 +02:00

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 425ca6710b (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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2022-03-03 17:04:17 +01:00 committed by Junio C Hamano
parent dad9cd7d51
commit fd15f8a5fa
2 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -23,3 +23,11 @@
#
# 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)