4ef7271a0d
New Features in Readline a. If a second consecutive completion attempt produces matches where the first did not, treat it as a new completion attempt and insert a match as appropriate. b. Bracketed paste mode works in more places: incremental search strings, vi overstrike mode, character search, and reading numeric arguments. c. Readline automatically switches to horizontal scrolling if the terminal has only one line. d. Unbinding all key sequences bound to a particular readline function now descends into keymaps for multi-key sequences. e. rl-clear-display: new bindable command that clears the screen and, if possible, the scrollback buffer (bound to emacs mode M-C-l by default). f. New active mark and face feature: when enabled, it will highlight the text inserted by a bracketed paste (the `active region') and the text found by incremental and non-incremental history searches. This is tied to bracketed paste and can be disabled by turning off bracketed paste. g. Readline sets the mark in several additional commands. h. Bracketed paste mode is enabled by default. There is a configure-time option (--enable-bracketed-paste-default) to set the default to on or off. i. Readline tries to take advantage of the more regular structure of UTF-8 characters to identify the beginning and end of characters when moving through the line buffer. j. The bindable operate-and-get-next command (and its default bindings) are now part of readline instead of a bash-specific addition. k. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
113 lines
3.8 KiB
Text
113 lines
3.8 KiB
Text
$NetBSD: patch-ae,v 1.20 2021/01/04 12:01:45 wiz Exp $
|
|
|
|
Libtoolify.
|
|
Pass -no-undefined to libtool for building shared library.
|
|
Don't ignore failures during installation.
|
|
Don't ignore failures building the examples.
|
|
Fix race condition so the examples are built *after* the library.
|
|
|
|
--- Makefile.in.orig 2020-10-29 19:48:14.000000000 +0000
|
|
+++ Makefile.in
|
|
@@ -18,6 +18,9 @@
|
|
RL_LIBRARY_VERSION = @LIBVERSION@
|
|
RL_LIBRARY_NAME = readline
|
|
|
|
+SHLIB_MAJOR = @SHLIB_MAJOR@
|
|
+SHLIB_MINOR = @SHLIB_MINOR@
|
|
+
|
|
PACKAGE = @PACKAGE_NAME@
|
|
VERSION = @PACKAGE_VERSION@
|
|
|
|
@@ -77,6 +80,7 @@ CTAGS = ctags -w
|
|
CFLAGS = @CFLAGS@
|
|
LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' @BRACKETED_PASTE@
|
|
CPPFLAGS = @CPPFLAGS@
|
|
+LDFLAGS = @LDFLAGS@ -no-undefined
|
|
|
|
DEFS = @DEFS@ @CROSS_COMPILE@
|
|
LOCAL_DEFS = @LOCAL_DEFS@
|
|
@@ -104,9 +108,15 @@ install_examples = @EXAMPLES_INSTALL_TAR
|
|
${RM} $@
|
|
$(CC) -c $(CCFLAGS) $<
|
|
|
|
+.SUFFIXES: .lo
|
|
+.c.lo:
|
|
+ ${RM} $@
|
|
+ $(LIBTOOL) --mode=compile $(CC) -c $(CCFLAGS) $<
|
|
+
|
|
# The name of the main library target.
|
|
LIBRARY_NAME = libreadline.a
|
|
STATIC_LIBS = libreadline.a libhistory.a
|
|
+LIBTOOL_LIBS = libreadline.la libhistory.la
|
|
|
|
# The C code source files for this library.
|
|
CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
|
|
@@ -163,8 +173,10 @@ TARGETS = @STATIC_TARGET@ @SHARED_TARGET
|
|
INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@
|
|
|
|
all: $(TARGETS)
|
|
+all-libtool: $(LIBTOOL_LIBS)
|
|
|
|
-everything: all examples
|
|
+everything: all .WAIT examples
|
|
+everything-libtool: all-libtool .WAIT examples
|
|
|
|
asan:
|
|
${MAKE} ${MFLAGS} ASAN_CFLAGS='${ASAN_XCFLAGS}' ASAN_LDFLAGS='${ASAN_XLDFLAGS}' everything
|
|
@@ -176,17 +188,33 @@ libreadline.a: $(OBJECTS)
|
|
$(AR) $(ARFLAGS) $@ $(OBJECTS)
|
|
-test -n "$(RANLIB)" && $(RANLIB) $@
|
|
|
|
+libreadline.la: $(OBJECTS:.o=.lo)
|
|
+ $(LIBTOOL) --mode=clean $(RM) $@
|
|
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS:.o=.lo) $(TERMCAP_LIB) \
|
|
+ -rpath $(libdir) -version-info $(SHLIB_MAJOR):$(SHLIB_MINOR) \
|
|
+ $(LDFLAGS)
|
|
+
|
|
libhistory.a: $(HISTOBJ) xmalloc.o xfree.o
|
|
$(RM) $@
|
|
$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o
|
|
-test -n "$(RANLIB)" && $(RANLIB) $@
|
|
|
|
+libhistory.la: $(HISTOBJ:.o=.lo) xmalloc.lo xfree.lo
|
|
+ $(LIBTOOL) --mode=clean $(RM) $@
|
|
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(HISTOBJ:.o=.lo) xmalloc.lo xfree.lo \
|
|
+ -rpath $(libdir) -version-info $(SHLIB_MAJOR):$(SHLIB_MINOR) \
|
|
+ $(LDFLAGS)
|
|
+
|
|
# Since tilde.c is shared between readline and bash, make sure we compile
|
|
# it with the right flags when it's built as part of readline
|
|
tilde.o: tilde.c
|
|
rm -f $@
|
|
$(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
|
|
|
|
+tilde.lo: tilde.c
|
|
+ $(LIBTOOL) --mode=clean rm -f $@
|
|
+ $(LIBTOOL) --mode=compile $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
|
|
+
|
|
readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
|
|
$(CC) $(CCFLAGS) -DREADLINE_LIBRARY -o $@ $(top_srcdir)/examples/rl.c ./libreadline.a ${TERMCAP_LIB}
|
|
|
|
@@ -223,8 +251,7 @@ documentation: force
|
|
-( cd doc && $(MAKE) $(MFLAGS) )
|
|
|
|
examples: force
|
|
- -test -d examples || mkdir examples
|
|
- -(cd examples && ${MAKE} ${MFLAGS} all )
|
|
+ (cd examples && ${MAKE} ${MFLAGS} all )
|
|
|
|
force:
|
|
|
|
@@ -281,6 +308,12 @@ install-examples: installdirs install-he
|
|
uninstall-examples: maybe-uninstall-headers
|
|
-( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
|
|
|
|
+install-libtool: installdirs $(LIBTOOL_LIBS) install-headers install-doc
|
|
+ -$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libreadline.la
|
|
+ $(LIBTOOL) --mode=install $(INSTALL) libreadline.la $(DESTDIR)$(libdir)
|
|
+ -$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libhistory.la
|
|
+ $(LIBTOOL) --mode=install $(INSTALL) libhistory.la $(DESTDIR)$(libdir)
|
|
+
|
|
install-doc: installdirs
|
|
$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
|
|
-( if test -d doc ; then \
|