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 /databases | |
parent | 627b1ed81a4f271f81bce18f3d9e5faab71bc824 (diff) | |
download | pkgsrc-fd9688151b15b136e8bb62a77ec3f4c6abf839da.tar.gz |
Use bsd.buildlink.mk instead of duplicating code all over the place.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/gdbm/buildlink.mk | 55 |
1 files changed, 10 insertions, 45 deletions
diff --git a/databases/gdbm/buildlink.mk b/databases/gdbm/buildlink.mk index d42f1a4d81e..d154e9eec03 100644 --- a/databases/gdbm/buildlink.mk +++ b/databases/gdbm/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.2 2001/06/10 00:09:29 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.3 2001/06/11 01:59:34 jlam Exp $ # # This Makefile fragment is included by packages that use gdbm. # @@ -6,10 +6,9 @@ # # (1) Optionally define GDBM_REQD to the version of gdbm 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(GDBM_BUILDLINK_MK) @@ -18,48 +17,14 @@ GDBM_BUILDLINK_MK= # defined GDBM_REQD?= 1.7.3 DEPENDS+= gdbm>=${GDBM_REQD}:../../databases/gdbm -GDBM_HEADERS= ${LOCALBASE}/include/gdbm.h -GDBM_LIBS= ${LOCALBASE}/lib/libgdbm.* +BUILDLINK_PREFIX.gdbm= ${LOCALBASE} +BUILDLINK_FILES.gdbm= include/gdbm.h +BUILDLINK_FILES.gdbm+= lib/libgdbm.* -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_TARGETS.gdbm= gdbm-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.gdbm} -GDBM_BUILDLINK_COOKIE= ${WRKDIR}/.gdbm_buildlink_done -GDBM_BUILDLINK_TARGETS= link-gdbm-headers -GDBM_BUILDLINK_TARGETS+= link-gdbm-libs -BUILDLINK_TARGETS+= ${GDBM_BUILDLINK_COOKIE} - -pre-configure: ${GDBM_BUILDLINK_COOKIE} - -${GDBM_BUILDLINK_COOKIE}: ${GDBM_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${GDBM_BUILDLINK_COOKIE} - -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-gdbm-headers: - @${ECHO} "Linking gdbm headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR} - @for inc in ${GDBM_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-gdbm-libs: - @${ECHO} "Linking gdbm libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${GDBM_LIBS}; do \ - dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ - if [ -f $${lib} ]; then \ - ${RM} -f $${dest}; \ - ${LN} -sf $${lib} $${dest}; \ - fi; \ - done +pre-configure: ${BUILDLINK_TARGETS.gdbm} +gdbm-buildlink: _BUILDLINK_USE .endif # GDBM_BUILDLINK_MK |