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:
parent
dad9cd7d51
commit
fd15f8a5fa
4
Makefile
4
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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user