aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-01-01 09:44:11 +0700
committerJunio C Hamano <gitster@pobox.com>2013-01-01 15:32:37 -0800
commitcebcab189aa7727af5027f0215e798bbe66f2815 (patch)
tree2c21813c10a95febfbf1400443bf231bb344245a /Makefile
parent6f1a31f0aae6dbd5414b81fb6c0f4ff087146fc5 (diff)
downloadgit-cebcab189aa7727af5027f0215e798bbe66f2815.tar.gz
git-cebcab189aa7727af5027f0215e798bbe66f2815.tar.xz
Makefile: add USE_WILDMATCH to use wildmatch as fnmatch
This is similar to NO_FNMATCH but it uses wildmatch instead of compat/fnmatch. This is an intermediate step to let wildmatch be used as fnmatch replacement for wider audience before it replaces fnmatch completely and compat/fnmatch is removed. fnmatch in test-wildmatch is not impacted by this and is the only place that NO_FNMATCH or NO_FNMATCH_CASEFOLD remain active when USE_WILDMATCH is set. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bc868d154..24e277481 100644
--- a/Makefile
+++ b/Makefile
@@ -99,6 +99,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.
#
@@ -1625,6 +1628,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