diff options
author | jlam <jlam> | 2001-05-25 04:49:15 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-05-25 04:49:15 +0000 |
commit | 1a9a05504a700c0ac2fa19070bd9f9e733bdf541 (patch) | |
tree | b69a4e11f01faa6a41fd804845b6f4a1ac624768 /devel/libgetopt | |
parent | 7cb056a7d838f99d3f9f3a409a7a7c8dcddd1bc2 (diff) | |
download | pkgsrc-1a9a05504a700c0ac2fa19070bd9f9e733bdf541.tar.gz |
No functional changes, only slight recoding to make it easier to cut-and-
paste into new buildlink.mk files.
Diffstat (limited to 'devel/libgetopt')
-rw-r--r-- | devel/libgetopt/buildlink.mk | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/devel/libgetopt/buildlink.mk b/devel/libgetopt/buildlink.mk index 9be12744ad3..fa63007bf76 100644 --- a/devel/libgetopt/buildlink.mk +++ b/devel/libgetopt/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.3 2001/05/24 09:13:19 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.4 2001/05/25 04:49:15 jlam Exp $ # # This Makefile fragment is included by packages that use getopt_long(). # @@ -36,24 +36,27 @@ BUILDLINK_LIBDIR?= ${WRKDIR}/lib BUILDLINK_TARGETS+= link-getopt-headers BUILDLINK_TARGETS+= link-getopt-libs -# This target links the getopt header into ${BUILDLINK_INCDIR}, which should +# This target links the headers into ${BUILDLINK_INCDIR}, which should # be searched first by the C preprocessor. # link-getopt-headers: @${ECHO} "Linking getopt headers into ${BUILDLINK_INCDIR}." @${MKDIR} ${BUILDLINK_INCDIR} @${RM} -f ${BUILDLINK_INCDIR}/getopt.h - @${LN} -sf ${GETOPT_H} ${BUILDLINK_INCDIR} + @${LN} -sf ${GETOPT_H} ${BUILDLINK_INCDIR}/getopt.h -# This target links the getopt libraries into ${BUILDLINK_LIBDIR}, which -# should be searched first by the linker. +# This target links the libraries into ${BUILDLINK_LIBDIR}, which should +# be searched first by the linker. # link-getopt-libs: @${ECHO} "Linking getopt libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} -p ${BUILDLINK_LIBDIR} + @${MKDIR} ${BUILDLINK_LIBDIR} .if defined(LIBGETOPT) @for lib in ${LIBGETOPT}; do \ - dest=`${BASENAME} $${lib}`; \ - ${LN} -sf $${lib} ${BUILDLINK_LIBDIR}/$${dest}; \ + dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ + if [ -f $${lib} ]; then \ + ${RM} -f $${dest}; \ + ${LN} -sf $${lib} $${dest}; \ + fi; \ done .endif |