diff options
author | jlam <jlam@pkgsrc.org> | 2001-06-11 01:59:33 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-06-11 01:59:33 +0000 |
commit | 072be2ad69b44757c1fda013ef9c97ac9969c501 (patch) | |
tree | 28cba132a7d0ee13850a4a1787701a2980ea61e4 /graphics/jpeg/buildlink.mk | |
parent | 984195829695c37da3ab912184955af08309d5b8 (diff) | |
download | pkgsrc-072be2ad69b44757c1fda013ef9c97ac9969c501.tar.gz |
Use bsd.buildlink.mk instead of duplicating code all over the place.
Diffstat (limited to 'graphics/jpeg/buildlink.mk')
-rw-r--r-- | graphics/jpeg/buildlink.mk | 61 |
1 files changed, 14 insertions, 47 deletions
diff --git a/graphics/jpeg/buildlink.mk b/graphics/jpeg/buildlink.mk index a9df6753ac2..31c665a77ac 100644 --- a/graphics/jpeg/buildlink.mk +++ b/graphics/jpeg/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.3 2001/06/10 00:09:32 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.4 2001/06/11 01:59:36 jlam Exp $ # # This Makefile fragment is included by packages that use libjpeg. # @@ -6,10 +6,9 @@ # # (1) Optionally define JPEG_REQD to the version of libjpeg 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(JPEG_BUILDLINK_MK) @@ -18,51 +17,19 @@ JPEG_BUILDLINK_MK= # defined JPEG_REQD?= 6 DEPENDS+= jpeg>=${JPEG_REQD}:../../graphics/jpeg -JPEG_HEADERS= ${LOCALBASE}/include/jconfig.h -JPEG_HEADERS+= ${LOCALBASE}/include/jpeglib.h -JPEG_HEADERS+= ${LOCALBASE}/include/jmorecfg.h -JPEG_HEADERS+= ${LOCALBASE}/include/jerror.h -JPEG_LIBS= ${LOCALBASE}/lib/libjpeg.* +BUILDLINK_PREFIX.jpeg= ${LOCALBASE} +BUILDLINK_FILES.jpeg= include/jconfig.h +BUILDLINK_FILES.jpeg+= include/jpeglib.h +BUILDLINK_FILES.jpeg+= include/jmorecfg.h +BUILDLINK_FILES.jpeg+= include/jerror.h +BUILDLINK_FILES.jpeg+= lib/libjpeg.* -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_TARGETS.jpeg= jpeg-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.jpeg} -JPEG_BUILDLINK_COOKIE= ${WRKDIR}/.jpeg_buildlink_done -JPEG_BUILDLINK_TARGETS= link-jpeg-headers -JPEG_BUILDLINK_TARGETS+= link-jpeg-libs -BUILDLINK_TARGETS+= ${JPEG_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.jpeg} +jpeg-buildlink: _BUILDLINK_USE -pre-configure: ${JPEG_BUILDLINK_COOKIE} - -${JPEG_BUILDLINK_COOKIE}: ${JPEG_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${JPEG_BUILDLINK_COOKIE} - -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-jpeg-headers: - @${ECHO} "Linking jpeg headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR} - @for inc in ${JPEG_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-jpeg-libs: - @${ECHO} "Linking jpeg libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${JPEG_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 # JPEG_BUILDLINK_MK |