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
maint
Junio C Hamano 2019-02-06 22:05:30 -08:00
commit fe8e68659d
2 changed files with 9 additions and 6 deletions

View File

@ -574,7 +574,11 @@ SPATCH = spatch


export TCL_PATH TCLTK_PATH export TCL_PATH TCLTK_PATH


SPARSE_FLAGS = # user customisation variable for 'sparse' target
SPARSE_FLAGS ?=
# internal/platform customisation variable for 'sparse'
SP_EXTRA_FLAGS =

SPATCH_FLAGS = --all-includes --patch . SPATCH_FLAGS = --all-includes --patch .




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


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


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


ifdef NO_EXPAT ifdef NO_EXPAT
http-walker.sp http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT http-walker.sp http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
@ -2387,7 +2391,7 @@ endif
ifdef USE_NED_ALLOCATOR ifdef USE_NED_ALLOCATOR
compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \ compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
-DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR
compat/nedmalloc/nedmalloc.sp: SPARSE_FLAGS += -Wno-non-pointer-null compat/nedmalloc/nedmalloc.sp: SP_EXTRA_FLAGS += -Wno-non-pointer-null
endif endif


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


$(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
$(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \ $(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \
$(SPARSE_FLAGS) $< $(SPARSE_FLAGS) $(SP_EXTRA_FLAGS) $<


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

View File

@ -555,7 +555,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))
RC = windres -O coff RC = windres -O coff
NATIVE_CRLF = YesPlease NATIVE_CRLF = YesPlease
X = .exe X = .exe
SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
htmldir = doc/git/html/ htmldir = doc/git/html/
prefix = prefix =