summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-04-09 23:25:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-09 23:25:43 (GMT)
commitcac5351363c5713248b8494e1e58e282c0a5bde7 (patch)
tree8d15f7e9b53b259a9a98eca8c071d9b080c4d4d5 /Makefile
parent5d806b74d5223d0c19afd023fea3b321cc5bc717 (diff)
parente6c531b80819a81b7ea37fc295f2edda5f345212 (diff)
downloadgit-cac5351363c5713248b8494e1e58e282c0a5bde7.zip
git-cac5351363c5713248b8494e1e58e282c0a5bde7.tar.gz
git-cac5351363c5713248b8494e1e58e282c0a5bde7.tar.bz2
Merge branch 'ab/pcre-v2'
Git can be built to use either v1 or v2 of the PCRE library, and so far, the build-time configuration USE_LIBPCRE=YesPlease instructed the build procedure to use v1, but now it means v2. USE_LIBPCRE1 and USE_LIBPCRE2 can be used to explicitly choose which version to use, as before. * ab/pcre-v2: Makefile: make USE_LIBPCRE=YesPlease mean v2, not v1 configure: detect redundant --with-libpcre & --with-libpcre1 configure: fix a regression in PCRE v1 detection
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 13 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index a1d8775..180a768 100644
--- a/Makefile
+++ b/Makefile
@@ -29,10 +29,10 @@ all::
# Perl-compatible regular expressions instead of standard or extended
# POSIX regular expressions.
#
-# Currently USE_LIBPCRE is a synonym for USE_LIBPCRE1, define
-# USE_LIBPCRE2 instead if you'd like to use version 2 of the PCRE
-# library. The USE_LIBPCRE flag will likely be changed to mean v2 by
-# default in future releases.
+# USE_LIBPCRE is a synonym for USE_LIBPCRE2, define USE_LIBPCRE1
+# instead if you'd like to use the legacy version 1 of the PCRE
+# library. Support for version 1 will likely be removed in some future
+# release of Git, as upstream has all but abandoned it.
#
# When using USE_LIBPCRE1, define NO_LIBPCRE1_JIT if the PCRE v1
# library is compiled without --enable-jit. We will auto-detect
@@ -1170,13 +1170,18 @@ ifdef NO_LIBGEN_H
COMPAT_OBJS += compat/basename.o
endif
-USE_LIBPCRE1 ?= $(USE_LIBPCRE)
+USE_LIBPCRE2 ?= $(USE_LIBPCRE)
-ifneq (,$(USE_LIBPCRE1))
- ifdef USE_LIBPCRE2
-$(error Only set USE_LIBPCRE1 (or its alias USE_LIBPCRE) or USE_LIBPCRE2, not both!)
+ifneq (,$(USE_LIBPCRE2))
+ ifdef USE_LIBPCRE1
+$(error Only set USE_LIBPCRE2 (or its alias USE_LIBPCRE) or USE_LIBPCRE1, not both!)
endif
+ BASIC_CFLAGS += -DUSE_LIBPCRE2
+ EXTLIBS += -lpcre2-8
+endif
+
+ifdef USE_LIBPCRE1
BASIC_CFLAGS += -DUSE_LIBPCRE1
EXTLIBS += -lpcre
@@ -1185,11 +1190,6 @@ ifdef NO_LIBPCRE1_JIT
endif
endif
-ifdef USE_LIBPCRE2
- BASIC_CFLAGS += -DUSE_LIBPCRE2
- EXTLIBS += -lpcre2-8
-endif
-
ifdef LIBPCREDIR
BASIC_CFLAGS += -I$(LIBPCREDIR)/include
EXTLIBS += -L$(LIBPCREDIR)/$(lib) $(CC_LD_DYNPATH)$(LIBPCREDIR)/$(lib)