summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam>2001-06-05 22:15:01 +0000
committerjlam <jlam>2001-06-05 22:15:01 +0000
commit06467619f98c3bf0bcebfa052fcfea9b550f20a2 (patch)
tree56ac5ae1b9cae98e06115e331eaa75e5df635ab8 /devel
parentc662d8855922fa61438b819e70f38b3563dfbdcf (diff)
downloadpkgsrc-06467619f98c3bf0bcebfa052fcfea9b550f20a2.tar.gz
Modify target that generates the libtool archive for libedit to not use
libtool internals. Fix from Nick Hudson <skrll@netbsd.org>. Conditionalize visibility of target on USE_LIBTOOL, since it's useless otherwise.
Diffstat (limited to 'devel')
-rw-r--r--devel/readline/buildlink.mk42
1 files changed, 19 insertions, 23 deletions
diff --git a/devel/readline/buildlink.mk b/devel/readline/buildlink.mk
index 4bea87380c7..c8458f09a9f 100644
--- a/devel/readline/buildlink.mk
+++ b/devel/readline/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.6 2001/05/29 18:00:05 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.7 2001/06/05 22:15:01 jlam Exp $
#
# This Makefile fragment is included by packages that use readline().
#
@@ -55,10 +55,10 @@ BUILDLINK_INCDIR?= ${WRKDIR}/include
BUILDLINK_LIBDIR?= ${WRKDIR}/lib
BUILDLINK_TARGETS+= link-readline-headers
-BUILDLINK_TARGETS+= link-readline-libs
-.if defined(HAVE_LIBEDIT_READLINE)
-BUILDLINK_TARGETS+= libedit-libtool-archive
+.if defined(HAVE_LIBEDIT_READLINE) && defined(USE_LIBTOOL)
+BUILDLINK_TARGETS+= editline-libtool-archive
.endif
+BUILDLINK_TARGETS+= link-readline-libs
# This target links the headers into ${BUILDLINK_INCDIR}, which should
# be searched first by the C preprocessor.
@@ -98,26 +98,22 @@ link-readline-libs:
fi; \
done
-LIBREADLINE_LA= ${BUILDLINK_LIBDIR}/libreadline.la
-
-libedit-libtool-archive:
+.if defined(HAVE_LIBEDIT_READLINE) && defined(USE_LIBTOOL)
+editline-libtool-archive:
+ @${ECHO} "Creating editline libtool archive in ${BUILDLINK_LIBDIR}."
@${MKDIR} ${BUILDLINK_LIBDIR}
- @${RM} -f ${LIBREADLINE_LA}
- @${ECHO} "# libedit.la - a libtool library file" >> ${LIBREADLINE_LA}
- @${ECHO} "# Generated by libtool (not!)" >> ${LIBREADLINE_LA}
- @${ECHO} "installed=yes" >> ${LIBREADLINE_LA}
- @${ECHO} "libdir='/usr/lib'" >> ${LIBREADLINE_LA}
- @${ECHO} "old_library='libedit.a'" >> ${LIBREADLINE_LA}
- @${ECHO} "library_names=''" >> ${LIBREADLINE_LA}
- @(cd /usr/lib; for lib in libedit.so*; do \
- ${ECHO} "library_names=\"\$$library_names $$lib\""; \
- done) >> ${LIBREADLINE_LA}
@cd /usr/lib; for lib in libedit.so.*.*; do \
- current=`echo $$lib | sed "s,.*\.so\.,,;s,\..*,,"`; \
- age=`echo $$lib | sed "s,.*\.,,"`; \
- ${ECHO} "current=$$current" >> ${LIBREADLINE_LA}; \
- ${ECHO} "age=$$age" >> ${LIBREADLINE_LA}; \
- done
- @${ECHO} "revision=1" >> ${LIBREADLINE_LA}
+ major=`${ECHO} $$lib | ${SED} "s|.*\.so\.||;s|\..*||"`; \
+ minor=`${ECHO} $$lib | ${SED} "s|.*\.||"`; \
+ done; \
+ cd ${BUILDLINK_LIBDIR}; \
+ ${LIBTOOL} --quiet --mode=link ${CC} -o libedit.la \
+ -version-info $$major:$$minor -rpath /usr/lib; \
+ ${LIBTOOL} --quiet --mode=install ${CP} libedit.la \
+ ${BUILDLINK_LIBDIR} 2>/dev/null; \
+ ${RM} -f libedit.a; \
+ ${RM} -f libreadline.la; \
+ ${LN} -sf libedit.la libreadline.la
+.endif
.endif # READLINE_BUILDLINK_MK