Skip to content

Commit fe8e686

Browse files
committed
Merge branch 'rj/sparse-flags'
Use of the sparse tool got easier to customize from the command line to help developers. * rj/sparse-flags: Makefile: improve SPARSE_FLAGS customisation config.mak.uname: remove obsolete SPARSE_FLAGS setting
2 parents 8f0f465 + 15caca2 commit fe8e686

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,11 @@ SPATCH = spatch
574574

575575
export TCL_PATH TCLTK_PATH
576576

577-
SPARSE_FLAGS =
577+
# user customisation variable for 'sparse' target
578+
SPARSE_FLAGS ?=
579+
# internal/platform customisation variable for 'sparse'
580+
SP_EXTRA_FLAGS =
581+
578582
SPATCH_FLAGS = --all-includes --patch .
579583

580584

@@ -2370,10 +2374,10 @@ gettext.sp gettext.s gettext.o: GIT-PREFIX
23702374
gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \
23712375
-DGIT_LOCALE_PATH='"$(localedir_relative_SQ)"'
23722376

2373-
http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SPARSE_FLAGS += \
2377+
http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SP_EXTRA_FLAGS += \
23742378
-DCURL_DISABLE_TYPECHECK
23752379

2376-
pack-revindex.sp: SPARSE_FLAGS += -Wno-memcpy-max-count
2380+
pack-revindex.sp: SP_EXTRA_FLAGS += -Wno-memcpy-max-count
23772381

23782382
ifdef NO_EXPAT
23792383
http-walker.sp http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
@@ -2387,7 +2391,7 @@ endif
23872391
ifdef USE_NED_ALLOCATOR
23882392
compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
23892393
-DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR
2390-
compat/nedmalloc/nedmalloc.sp: SPARSE_FLAGS += -Wno-non-pointer-null
2394+
compat/nedmalloc/nedmalloc.sp: SP_EXTRA_FLAGS += -Wno-non-pointer-null
23912395
endif
23922396

23932397
git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
@@ -2711,7 +2715,7 @@ SP_OBJ = $(patsubst %.o,%.sp,$(C_OBJ))
27112715

27122716
$(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
27132717
$(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \
2714-
$(SPARSE_FLAGS) $<
2718+
$(SPARSE_FLAGS) $(SP_EXTRA_FLAGS) $<
27152719

27162720
.PHONY: sparse $(SP_OBJ)
27172721
sparse: $(SP_OBJ)

config.mak.uname

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))
555555
RC = windres -O coff
556556
NATIVE_CRLF = YesPlease
557557
X = .exe
558-
SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
559558
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
560559
htmldir = doc/git/html/
561560
prefix =

0 commit comments

Comments
 (0)