diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-25 12:34:55 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-25 12:34:55 -0800 |
commit | 9ecd9f5dc300235593e4d3e4ecff4448f2500bad (patch) | |
tree | 507832849bd8e8f3ec7bd5b0a55b915336a43df8 /Makefile | |
parent | Merge branch 'jc/doc-maintainer' (diff) | |
parent | Makefile: add USE_WILDMATCH to use wildmatch as fnmatch (diff) | |
download | tgif-9ecd9f5dc300235593e4d3e4ecff4448f2500bad.tar.xz |
Merge branch 'nd/retire-fnmatch'
Replace our use of fnmatch(3) with a more feature-rich wildmatch.
A handful patches at the bottom have been moved to nd/wildmatch to
graduate as part of that branch, before this series solidifies.
We may want to mark USE_WILDMATCH as an experimental curiosity a
bit more clearly (i.e. should not be enabled in production
environment, because it will make the behaviour between builds
unpredictable).
* nd/retire-fnmatch:
Makefile: add USE_WILDMATCH to use wildmatch as fnmatch
wildmatch: advance faster in <asterisk> + <literal> patterns
wildmatch: make a special case for "*/" with FNM_PATHNAME
test-wildmatch: add "perf" command to compare wildmatch and fnmatch
wildmatch: support "no FNM_PATHNAME" mode
wildmatch: make dowild() take arbitrary flags
wildmatch: rename constants and update prototype
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -105,6 +105,9 @@ all:: # Define NO_FNMATCH_CASEFOLD if your fnmatch function doesn't have the # FNM_CASEFOLD GNU extension. # +# Define USE_WILDMATCH if you want to use Git's wildmatch +# implementation as fnmatch +# # Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd # in the C library. # @@ -1225,6 +1228,9 @@ ifdef NO_FNMATCH_CASEFOLD COMPAT_OBJS += compat/fnmatch/fnmatch.o endif endif +ifdef USE_WILDMATCH + COMPAT_CFLAGS += -DUSE_WILDMATCH +endif ifdef NO_SETENV COMPAT_CFLAGS += -DNO_SETENV COMPAT_OBJS += compat/setenv.o |