pkgsrc/devel/readline/patches/patch-ae
jmmv e85877b913 Update readline to 4.3.
Changes in this version are mostly bugfixes; some new functionality
has been added as well. For an exhaustive list of changes, please
look at the CHANGES file included in the distribution.
2002-12-07 17:39:47 +00:00

81 lines
2.5 KiB
Text

$NetBSD: patch-ae,v 1.8 2002/12/07 17:39:48 jmmv Exp $
--- Makefile.in.orig Thu Jan 24 16:15:24 2002
+++ Makefile.in
@@ -18,6 +18,9 @@
RL_LIBRARY_VERSION = @LIBVERSION@
RL_LIBRARY_NAME = readline
+SHLIB_MAJOR = @SHLIB_MAJOR@
+SHLIB_MINOR = @SHLIB_MINOR@
+
srcdir = @srcdir@
VPATH = .:@srcdir@
top_srcdir = @top_srcdir@
@@ -80,11 +83,12 @@ GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT
.c.o:
${RM} $@
- $(CC) -c $(CCFLAGS) $<
+ $(LIBTOOL) $(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 \
@@ -133,6 +137,8 @@ INSTALL_TARGETS = @STATIC_INSTALL_TARGET
all: $(TARGETS)
+all-la: $(LIBTOOL_LIBS)
+
everything: all examples
static: $(STATIC_LIBS)
@@ -142,6 +148,12 @@ libreadline.a: $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS)
-test -n "$(RANLIB)" && $(RANLIB) $@
+libreadline.la: $(OBJECTS)
+ ${LIBTOOL} ${RM} $@
+ ${LIBTOOL} ${CC} -o $@ ${OBJECTS:.o=.lo} \
+ -rpath $(libdir) \
+ -version-info ${SHLIB_MAJOR}:${SHLIB_MINOR}
+
libhistory.a: $(HISTOBJ) xmalloc.o
$(RM) $@
$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
@@ -151,13 +163,27 @@ libhistory.a: $(HISTOBJ) xmalloc.o
# 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
+ $(LIBTOOL) $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
-readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
- $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB}
+libhistory.la: $(HISTOBJ) xmalloc.o
+ ${LIBTOOL} $(RM) $@
+ ${LIBTOOL} ${CC} -o $@ ${HISTOBJ:.o=.lo} xmalloc.lo \
+ -rpath $(libdir) \
+ -version-info ${SHLIB_MAJOR}:${SHLIB_MINOR}
+
+readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./$(LIBRARY_NAME)
+ ${LIBTOOL} $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ ./examples/rl.c ./$(LIBRARY_NAME) ${TERMCAP_LIB}
lint: force
$(MAKE) $(MFLAGS) CCFLAGS='$(GCC_LINT_CFLAGS)' static
+
+install-la: installdirs $(LIBTOOL_LIBS) install-headers
+ ${LIBTOOL} ${INSTALL_DATA} libreadline.la $(libdir)
+ ${LIBTOOL} ${INSTALL_DATA} libhistory.la $(libdir)
+ -( if test -d doc ; then \
+ cd doc && \
+ ${MAKE} ${MFLAGS} infodir=$(infodir) install; \
+ fi )
Makefile makefile: config.status $(srcdir)/Makefile.in
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status