From: Junio C Hamano Date: Thu, 15 Mar 2018 22:10:58 +0000 (-0700) Subject: Merge branch 'ab/pcre-v2' into next X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e77b1169036182c32a7606d5d521c4e63c671749?hp=-c Merge branch 'ab/pcre-v2' into next 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 --- e77b1169036182c32a7606d5d521c4e63c671749 diff --combined Makefile index a1d8775adb,449ff71f45..180a768690 --- a/Makefile +++ b/Makefile @@@ -29,10 -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 @@@ -296,12 -296,6 +296,12 @@@ # # Define NO_PERL if you do not want Perl scripts or libraries at all. # +# Define NO_PERL_CPAN_FALLBACKS if you do not want to install bundled +# copies of CPAN modules that serve as a fallback in case the modules +# are not available on the system. This option is intended for +# distributions that want to use their packaged versions of Perl +# modules, instead of the fallbacks shipped with Git. +# # Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python # but /usr/bin/python2.7 on some platforms). # @@@ -1170,13 -1164,18 +1170,18 @@@ ifdef NO_LIBGEN_ 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 -1184,6 +1190,6 @@@ ifdef NO_LIBPCRE1_JI 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) @@@ -2310,22 -2304,14 +2310,22 @@@ po/build/locale/%/LC_MESSAGES/git.mo: p LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm) LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL)) +LIB_CPAN := $(wildcard perl/FromCPAN/*.pm perl/FromCPAN/*/*.pm) +LIB_CPAN_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_CPAN)) ifndef NO_PERL all:: $(LIB_PERL_GEN) +ifndef NO_PERL_CPAN_FALLBACKS +all:: $(LIB_CPAN_GEN) +endif +NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS)) endif perl/build/lib/%.pm: perl/%.pm $(QUIET_GEN)mkdir -p $(dir $@) && \ - sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' < $< > $@ + sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' \ + -e 's|@@NO_PERL_CPAN_FALLBACKS@@|$(NO_PERL_CPAN_FALLBACKS_SQ)|g' \ + < $< > $@ perl/build/man/man3/Git.3pm: perl/Git.pm $(QUIET_GEN)mkdir -p $(dir $@) && \