summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-03-11 13:26:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-14 22:27:50 (GMT)
commite6c531b80819a81b7ea37fc295f2edda5f345212 (patch)
treefa195e167bae2d6fe7b41d4e350f27ed365c2b18 /Makefile
parenta363f981ecf738979287882787b7323b9c7c6bfe (diff)
downloadgit-e6c531b80819a81b7ea37fc295f2edda5f345212.zip
git-e6c531b80819a81b7ea37fc295f2edda5f345212.tar.gz
git-e6c531b80819a81b7ea37fc295f2edda5f345212.tar.bz2
Makefile: make USE_LIBPCRE=YesPlease mean v2, not v1
Change the USE_LIBPCRE flag from being an alias for USE_LIBPCRE1 to being an alias for USE_LIBPCRE2. When support for v2 was added in my 94da9193a6 ("grep: add support for PCRE v2", 2017-06-01) the existing USE_LIBPCRE flag was left as meaning v1, with a note that this would likely change in a future release. That optional support for v2 first made it into Git version 2.14.0. The PCRE v2 support has been shown to be stable, and the upstream PCRE project is highly encouraging downstream users to move to v2, so it makes sense to give packagers of Git who haven't heard the news about PCRE v2 a further nudge to move to v2. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 13 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index de4b8f0..449ff71 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
@@ -1164,13 +1164,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
@@ -1179,11 +1184,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)