summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-06-11 01:59:33 +0000
committerjlam <jlam@pkgsrc.org>2001-06-11 01:59:33 +0000
commit072be2ad69b44757c1fda013ef9c97ac9969c501 (patch)
tree28cba132a7d0ee13850a4a1787701a2980ea61e4 /print
parent984195829695c37da3ab912184955af08309d5b8 (diff)
downloadpkgsrc-072be2ad69b44757c1fda013ef9c97ac9969c501.tar.gz
Use bsd.buildlink.mk instead of duplicating code all over the place.
Diffstat (limited to 'print')
-rw-r--r--print/cups/buildlink.mk58
1 files changed, 12 insertions, 46 deletions
diff --git a/print/cups/buildlink.mk b/print/cups/buildlink.mk
index 465b49c3d05..7d61f33c494 100644
--- a/print/cups/buildlink.mk
+++ b/print/cups/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.5 2001/06/10 00:09:33 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.6 2001/06/11 01:59:37 jlam Exp $
#
# This Makefile fragment is included by packages that use libcups.
#
@@ -6,10 +6,9 @@
#
# (1) Optionally define CUPS_REQD to the version of cups 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(CUPS_BUILDLINK_MK)
@@ -18,50 +17,17 @@ CUPS_BUILDLINK_MK= # defined
CUPS_REQD?= 1.1.1
DEPENDS+= cups>=${CUPS_REQD}:../../print/cups
-CUPS_HEADERS= ${LOCALBASE}/include/cups/*
-CUPS_LIBS= ${LOCALBASE}/lib/libcups.*
-CUPS_LIBS+= ${LOCALBASE}/lib/libcupsimage.*
+BUILDLINK_PREFIX.cups= ${LOCALBASE}
+BUILDLINK_FILES.cups= include/cups/*
+BUILDLINK_FILES.cups+= lib/libcups.*
+BUILDLINK_FILES.cups+= lib/libcupsimage.*
-BUILDLINK_INCDIR?= ${WRKDIR}/include
-BUILDLINK_LIBDIR?= ${WRKDIR}/lib
+BUILDLINK_TARGETS.cups= cups-buildlink
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.cups}
-CUPS_BUILDLINK_COOKIE= ${WRKDIR}/.cups_buildlink_done
-CUPS_BUILDLINK_TARGETS= link-cups-headers
-CUPS_BUILDLINK_TARGETS+= link-cups-libs
-BUILDLINK_TARGETS+= ${CUPS_BUILDLINK_COOKIE}
+pre-configure: ${BUILDLINK_TARGETS.cups}
+cups-buildlink: _BUILDLINK_USE
-pre-configure: ${CUPS_BUILDLINK_COOKIE}
-
-${CUPS_BUILDLINK_COOKIE}: ${CUPS_BUILDLINK_TARGETS}
- @${TOUCH} ${TOUCH_FLAGS} ${CUPS_BUILDLINK_COOKIE}
-
-# This target links the headers into ${BUILDLINK_INCDIR}, which should
-# be searched first by the C preprocessor.
-#
-link-cups-headers:
- @${ECHO} "Linking cups headers into ${BUILDLINK_INCDIR}."
- @${MKDIR} ${BUILDLINK_INCDIR}/cups
- @${RM} -f ${BUILDLINK_INCDIR}/cups/*
- @for inc in ${CUPS_HEADERS}; do \
- dest=${BUILDLINK_INCDIR}/cups/`${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-cups-libs:
- @${ECHO} "Linking cups libraries into ${BUILDLINK_LIBDIR}."
- @${MKDIR} ${BUILDLINK_LIBDIR}
- @for lib in ${CUPS_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 # CUPS_BUILDLINK_MK