diff options
author | jlam <jlam> | 2001-06-11 01:59:33 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-06-11 01:59:33 +0000 |
commit | fd9688151b15b136e8bb62a77ec3f4c6abf839da (patch) | |
tree | 28cba132a7d0ee13850a4a1787701a2980ea61e4 /devel/zlib | |
parent | 627b1ed81a4f271f81bce18f3d9e5faab71bc824 (diff) | |
download | pkgsrc-fd9688151b15b136e8bb62a77ec3f4c6abf839da.tar.gz |
Use bsd.buildlink.mk instead of duplicating code all over the place.
Diffstat (limited to 'devel/zlib')
-rw-r--r-- | devel/zlib/buildlink.mk | 60 |
1 files changed, 13 insertions, 47 deletions
diff --git a/devel/zlib/buildlink.mk b/devel/zlib/buildlink.mk index acc96935bee..3cca7764de8 100644 --- a/devel/zlib/buildlink.mk +++ b/devel/zlib/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.2 2001/06/10 00:09:31 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.3 2001/06/11 01:59:36 jlam Exp $ # # This Makefile fragment is included by packages that use zlib. # @@ -6,10 +6,9 @@ # # (1) Optionally define ZLIB_REQD to the version of zlib desired. # (2) Include this Makefile fragment in the package Makefile, -# (3) Optionally define BUILDLINK_INCDIR and BUILDLINK_LIBDIR, -# (4) Add ${BUILDLINK_INCDIR} to the front of the C preprocessor's header +# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header # search path, and -# (5) Add ${BUILDLINK_LIBDIR} to the front of the linker's library search +# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search # path. .if !defined(ZLIB_BUILDLINK_MK) @@ -25,54 +24,21 @@ _NEED_ZLIB= YES .if ${_NEED_ZLIB} == "YES" DEPENDS+= zlib>=${ZLIB_REQD}:../../devel/zlib -ZLIB_HEADERS= ${LOCALBASE}/include/zconf.h -ZLIB_HEADERS= ${LOCALBASE}/include/zlib.h -ZLIB_LIBS= ${LOCALBASE}/lib/libz.* +BUILDLINK_PREFIX.zlib= ${LOCALBASE} .else -ZLIB_HEADERS= /usr/include/zconf.h -ZLIB_HEADERS+= /usr/include/zlib.h -ZLIB_LIBS= /usr/lib/libz.* +BUILDLINK_PREFIX.zlib= /usr .endif -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_FILES.zlib= include/zconf.h +BUILDLINK_FILES.zlib+= include/zlib.h +BUILDLINK_FILES.zlib+= lib/libz.* -ZLIB_BUILDLINK_COOKIE= ${WRKDIR}/.zlib_buildlink_done -ZLIB_BUILDLINK_TARGETS= link-zlib-headers -ZLIB_BUILDLINK_TARGETS+= link-zlib-libs -BUILDLINK_TARGETS+= ${ZLIB_BUILDLINK_COOKIE} +BUILDLINK_TARGETS.zlib= zlib-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.zlib} -pre-configure: ${ZLIB_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.zlib} +zlib-buildlink: _BUILDLINK_USE -${ZLIB_BUILDLINK_COOKIE}: ${ZLIB_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${ZLIB_BUILDLINK_COOKIE} - -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-zlib-headers: - @${ECHO} "Linking zlib headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR} - @for inc in ${ZLIB_HEADERS}; do \ - dest=${BUILDLINK_INCDIR}/`${BASENAME} $${inc}`; \ - if [ -f $${inc} ]; then \ - ${RM} -f $${dest}; \ - ${LN} -sf $${inc} $${dest}; \ - fi; \ - done - -# This target links the libraries into ${BUILDLINK_LIBDIR}, which should -# be searched first by the linker. -# -link-zlib-libs: - @${ECHO} "Linking zlib libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${ZLIB_LIBS}; do \ - dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ - if [ -f $${lib} ]; then \ - ${RM} -f $${dest}; \ - ${LN} -sf $${lib} $${dest}; \ - fi; \ - done +.include "../../mk/bsd.buildlink.mk" .endif # ZLIB_BUILDLINK_MK |