mirror of
https://github.com/git/git.git
synced 2024-05-19 15:16:08 +02:00
Makefile: refactor regex compat support
There was no tweakable knob to use the regex compat code; it was embedded in the mingw build. Since other platforms may want to use it, let's factor it out in the usual way for build configuration knobs. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4f4fa9c228
commit
02232adfd8
11
Makefile
11
Makefile
|
@ -194,6 +194,8 @@ all::
|
||||||
#
|
#
|
||||||
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
|
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
|
||||||
# memory allocators with the nedmalloc allocator written by Niall Douglas.
|
# memory allocators with the nedmalloc allocator written by Niall Douglas.
|
||||||
|
#
|
||||||
|
# Define NO_REGEX if you have no or inferior regex support in your C library.
|
||||||
|
|
||||||
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
|
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
|
||||||
@$(SHELL_PATH) ./GIT-VERSION-GEN
|
@$(SHELL_PATH) ./GIT-VERSION-GEN
|
||||||
|
@ -884,9 +886,10 @@ ifneq (,$(findstring MINGW,$(uname_S)))
|
||||||
USE_NED_ALLOCATOR = YesPlease
|
USE_NED_ALLOCATOR = YesPlease
|
||||||
UNRELIABLE_FSTAT = UnfortunatelyYes
|
UNRELIABLE_FSTAT = UnfortunatelyYes
|
||||||
OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
|
OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
|
||||||
COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch
|
NO_REGEX = YesPlease
|
||||||
|
COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch
|
||||||
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
|
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
|
||||||
COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/regex/regex.o compat/winansi.o
|
COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o
|
||||||
EXTLIBS += -lws2_32
|
EXTLIBS += -lws2_32
|
||||||
X = .exe
|
X = .exe
|
||||||
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
|
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
|
||||||
|
@ -1200,6 +1203,10 @@ endif
|
||||||
ifdef UNRELIABLE_FSTAT
|
ifdef UNRELIABLE_FSTAT
|
||||||
BASIC_CFLAGS += -DUNRELIABLE_FSTAT
|
BASIC_CFLAGS += -DUNRELIABLE_FSTAT
|
||||||
endif
|
endif
|
||||||
|
ifdef NO_REGEX
|
||||||
|
COMPAT_CFLAGS += -Icompat/regex
|
||||||
|
COMPAT_OBJS += compat/regex/regex.o
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef USE_NED_ALLOCATOR
|
ifdef USE_NED_ALLOCATOR
|
||||||
COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc
|
COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc
|
||||||
|
|
Loading…
Reference in New Issue