diff options
Diffstat (limited to 'devel')
-rw-r--r-- | devel/gettext-lib/buildlink.mk | 65 | ||||
-rw-r--r-- | devel/gmp/buildlink.mk | 55 | ||||
-rw-r--r-- | devel/libgetopt/buildlink.mk | 68 | ||||
-rw-r--r-- | devel/lwp/buildlink.mk | 56 | ||||
-rw-r--r-- | devel/readline/buildlink.mk | 42 | ||||
-rw-r--r-- | devel/rpc2/buildlink.mk | 60 | ||||
-rw-r--r-- | devel/rvm/buildlink.mk | 65 | ||||
-rw-r--r-- | devel/zlib/buildlink.mk | 60 |
8 files changed, 117 insertions, 354 deletions
diff --git a/devel/gettext-lib/buildlink.mk b/devel/gettext-lib/buildlink.mk index 8afeb4b9476..074b4aeffee 100644 --- a/devel/gettext-lib/buildlink.mk +++ b/devel/gettext-lib/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.5 2001/06/10 00:09:29 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.6 2001/06/11 01:59:34 jlam Exp $ # # This Makefile fragment is included by packages that use gettext. # @@ -6,10 +6,9 @@ # # (1) Optionally define GETTEXT_REQD to the version of gettext 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(GETTEXT_BUILDLINK_MK) @@ -27,15 +26,16 @@ _NEED_GNU_GETTEXT= YES .if ${_NEED_GNU_GETTEXT} == "YES" DEPENDS+= gettext-lib>=${GETTEXT_REQD}:../../devel/gettext-lib -GETTEXT_HEADERS= ${LOCALBASE}/include/libintl.h -GETTEXT_LIBS= ${LOCALBASE}/lib/libintl.* +BUILDLINK_PREFIX.gettext= ${LOCALBASE} .else -GETTEXT_HEADERS= /usr/include/libintl.h -GETTEXT_LIBS= /usr/lib/libintl.* +BUILDLINK_PREFIX.gettext= /usr .endif -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_FILES.gettext= include/libintl.h +BUILDLINK_FILES.gettext+= lib/libintl.* + +BUILDLINK_TARGETS.gettext= gettext-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.gettext} .if defined(GNU_CONFIGURE) # @@ -46,48 +46,15 @@ BUILDLINK_LIBDIR?= ${WRKDIR}/lib # CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" CONFIGURE_ENV+= LIBS="${LIBS}" -CFLAGS+= -I${BUILDLINK_INCDIR} -CPPFLAGS+= -I${BUILDLINK_INCDIR} -LDFLAGS+= -L${BUILDLINK_LIBDIR} +CFLAGS+= -I${BUILDLINK_DIR}/include +CPPFLAGS+= -I${BUILDLINK_DIR}/include +LDFLAGS+= -L${BUILDLINK_DIR}/lib LIBS+= -lintl .endif -GETTEXT_BUILDLINK_COOKIE= ${WRKDIR}/.gettext_buildlink_done -GETTEXT_BUILDLINK_TARGETS= link-gettext-headers -GETTEXT_BUILDLINK_TARGETS+= link-gettext-libs -BUILDLINK_TARGETS+= ${GETTEXT_BUILDLINK_COOKIE} - -pre-configure: ${GETTEXT_BUILDLINK_COOKIE} - -${GETTEXT_BUILDLINK_COOKIE}: ${GETTEXT_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${GETTEXT_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.gettext} +gettext-buildlink: _BUILDLINK_USE -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-gettext-headers: - @${ECHO} "Linking gettext headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR} - @for inc in ${GETTEXT_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-gettext-libs: - @${ECHO} "Linking gettext libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${GETTEXT_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 # GETTEXT_BUILDLINK_MK diff --git a/devel/gmp/buildlink.mk b/devel/gmp/buildlink.mk index 1c7ef4c5b95..71e03068801 100644 --- a/devel/gmp/buildlink.mk +++ b/devel/gmp/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.2 2001/06/10 00:09:30 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 gmp. # @@ -6,10 +6,9 @@ # # (1) Optionally define GMP_REQD to the version of gmp 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(GMP_BUILDLINK_MK) @@ -18,48 +17,16 @@ GMP_BUILDLINK_MK= # defined GMP_REQD?= 3.0 DEPENDS+= gmp>=${GMP_REQD}:../../devel/gmp -GMP_HEADERS= ${LOCALBASE}/include/gmp.h -GMP_LIBS= ${LOCALBASE}/lib/libgmp.* +BUILDLINK_PREFIX.gmp= ${LOCALBASE} +BUILDLINK_FILES.gmp= include/gmp.h +BUILDLINK_FILES.gmp+= lib/libgmp.* -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_TARGETS.gmp= gmp-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.gmp} -GMP_BUILDLINK_COOKIE= ${WRKDIR}/.gmp_buildlink_done -GMP_BUILDLINK_TARGETS= link-gmp-headers -GMP_BUILDLINK_TARGETS+= link-gmp-libs -BUILDLINK_TARGETS+= ${GMP_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.gmp} +gmp-buildlink: _BUILDLINK_USE -pre-configure: ${GMP_BUILDLINK_COOKIE} - -${GMP_BUILDLINK_COOKIE}: ${GMP_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${GMP_BUILDLINK_COOKIE} - -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-gmp-headers: - @${ECHO} "Linking gmp headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR} - @for inc in ${GMP_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-gmp-libs: - @${ECHO} "Linking gmp libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${GMP_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 # GMP_BUILDLINK_MK diff --git a/devel/libgetopt/buildlink.mk b/devel/libgetopt/buildlink.mk index 1ba2423ec7a..12fb51c5746 100644 --- a/devel/libgetopt/buildlink.mk +++ b/devel/libgetopt/buildlink.mk @@ -1,73 +1,41 @@ -# $NetBSD: buildlink.mk,v 1.6 2001/06/10 00:09:30 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.7 2001/06/11 01:59:34 jlam Exp $ # # This Makefile fragment is included by packages that use getopt_long(). # -# If getopt_long() is not present in the base system, then a dependency -# on devel/libgetopt is added, and the appropriate headers are linked -# into ${BUILDLINK_INCDIR} (${WRKDIR}/include). -# # To use this Makefile fragment, simply: # # (1) Include this Makefile fragment in the package Makefile, # (2) Optionally define BUILDLINK_INCDIR and BUILDLINK_LIBDIR, -# (3) 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. -# (4) 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(GETOPT_BUILDLINK_MK) GETOPT_BUILDLINK_MK= # defined .if exists(/usr/include/getopt.h) -GETOPT_H= /usr/include/getopt.h +BUILDLINK_PREFIX.getopt= /usr +BUILDLINK_FILES.getopt= include/getopt.h .else -GETOPT_H= ${LOCALBASE}/include/getopt.h -LIBGETOPT= ${LOCALBASE}/lib/libgetopt.a -LIBGETOPT+= ${LOCALBASE}/lib/libgetopt_pic.a -LIBGETOPT+= ${LOCALBASE}/lib/libgetopt.so* -DEPENDS+= libgetopt>=1.3:../../devel/libgetopt +DEPENDS+= libgetopt>=1.3:../../devel/libgetopt +BUILDLINK_PREFIX.getopt= ${LOCALBASE} +BUILDLINK_FILES.getopt= include/getopt.h +BUILDLINK_FILES.getopt+= lib/libgetopt.* +BUILDLINK_FILES.getopt+= lib/libgetopt_pic.a + .if defined(GNU_CONFIGURE) -CONFIGURE_ENV+= LIBS="${LIBS}" -LIBS+= -lgetopt +CONFIGURE_ENV+= LIBS="${LIBS}" +LIBS+= -lgetopt .endif .endif -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib - -GETOPT_BUILDLINK_COOKIE= ${WRKDIR}/.getopt_buildlink_done -GETOPT_BUILDLINK_TARGETS= link-getopt-headers -GETOPT_BUILDLINK_TARGETS+= link-getopt-libs -BUILDLINK_TARGETS+= ${GETOPT_BUILDLINK_COOKIE} - -pre-configure: ${GETOPT_BUILDLINK_COOKIE} +BUILDLINK_TARGETS.getopt= getopt-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.getopt} -${GETOPT_BUILDLINK_COOKIE}: ${GETOPT_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${GETOPT_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.getopt} +getopt-buildlink: _BUILDLINK_USE -# 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}/getopt.h - -# 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} ${BUILDLINK_LIBDIR} -.if defined(LIBGETOPT) - @for lib in ${LIBGETOPT}; do \ - dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ - if [ -f $${lib} ]; then \ - ${RM} -f $${dest}; \ - ${LN} -sf $${lib} $${dest}; \ - fi; \ - done -.endif +.include "../../mk/bsd.buildlink.mk" .endif # GETOPT_BUILDLINK_MK diff --git a/devel/lwp/buildlink.mk b/devel/lwp/buildlink.mk index 523daee00bb..7253624659a 100644 --- a/devel/lwp/buildlink.mk +++ b/devel/lwp/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.3 2001/06/10 00:09:30 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.4 2001/06/11 01:59:35 jlam Exp $ # # This Makefile fragment is included by packages that use lwp. # @@ -6,10 +6,9 @@ # # (1) Optionally define LWP_REQD to the version of lwp 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(LWP_BUILDLINK_MK) @@ -18,49 +17,16 @@ LWP_BUILDLINK_MK= # defined LWP_REQD?= 1.6 DEPENDS+= lwp>=${LWP_REQD}:../../devel/lwp -LWP_HEADERS= ${LOCALBASE}/include/lwp/* -LWP_LIBS= ${LOCALBASE}/lib/liblwp.* +BUILDLINK_PREFIX.lwp= ${LOCALBASE} +BUILDLINK_FILES.lwp= include/lwp/* +BUILDLINK_FILES.lwp+= lib/liblwp.* -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_TARGETS.lwp= lwp-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.lwp} -LWP_BUILDLINK_COOKIE= ${WRKDIR}/.lwp_buildlink_done -LWP_BUILDLINK_TARGETS= link-lwp-headers -LWP_BUILDLINK_TARGETS+= link-lwp-libs -BUILDLINK_TARGETS+= ${LWP_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.lwp} +lwp-buildlink: _BUILDLINK_USE -pre-configure: ${LWP_BUILDLINK_COOKIE} - -${LWP_BUILDLINK_COOKIE}: ${LWP_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${LWP_BUILDLINK_COOKIE} - -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-lwp-headers: - @${ECHO} "Linking lwp headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR}/lwp - @${RM} -f ${BUILDLINK_INCDIR}/lwp/* - @for inc in ${LWP_HEADERS}; do \ - dest=${BUILDLINK_INCDIR}/lwp/`${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-lwp-libs: - @${ECHO} "Linking lwp libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${LWP_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 # LWP_BUILDLINK_MK diff --git a/devel/readline/buildlink.mk b/devel/readline/buildlink.mk index 980fa67c35f..e6d08b63a77 100644 --- a/devel/readline/buildlink.mk +++ b/devel/readline/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.8 2001/06/10 00:09:30 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.9 2001/06/11 01:59:35 jlam Exp $ # # This Makefile fragment is included by packages that use readline(). # @@ -7,10 +7,9 @@ # (1) Optionally define USE_GNU_READLINE to force use of GNU readline. # (2) Optionally define READLINE_REQD to the version of GNU readline desired. # (3) Include this Makefile fragment in the package Makefile, -# (4) Optionally define BUILDLINK_INCDIR and BUILDLINK_LIBDIR, -# (5) Add ${BUILDLINK_INCDIR} to the front of the C preprocessor's header +# (4) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header # search path, and -# (6) Add ${BUILDLINK_LIBDIR} to the front of the linker's library search +# (5) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search # path. # # NOTE: You may need to do some more work to get libedit recognized over @@ -50,10 +49,7 @@ HISTORY_LIBS= /usr/lib/libedit.* .endif .endif -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib - -READLINE_BUILDLINK_COOKIE= ${WRKDIR}/.readline_buildlink_done +READLINE_BUILDLINK_COOKIE= ${BUILDLINK_DIR}/.readline_buildlink_done READLINE_BUILDLINK_TARGETS= link-readline-headers .if defined(HAVE_LIBEDIT_READLINE) && defined(USE_LIBTOOL) READLINE_BUILDLINK_TARGETS+= editline-libtool-archive @@ -66,30 +62,30 @@ pre-configure: ${READLINE_BUILDLINK_COOKIE} ${READLINE_BUILDLINK_COOKIE}: ${READLINE_BUILDLINK_TARGETS} @${TOUCH} ${TOUCH_FLAGS} ${READLINE_BUILDLINK_COOKIE} -# This target links the headers into ${BUILDLINK_INCDIR}, which should +# This target links the headers into ${BUILDLINK_DIR}/include, which should # be searched first by the C preprocessor. # link-readline-headers: - @${ECHO} "Linking readline headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR}/readline - @${RM} -f ${BUILDLINK_INCDIR}/readline/* + @${ECHO} "Linking readline headers into ${BUILDLINK_DIR}/include." + @${MKDIR} ${BUILDLINK_DIR}/include/readline + @${RM} -f ${BUILDLINK_DIR}/include/readline/* @for inc in ${READLINE_HEADERS}; do \ - dest=${BUILDLINK_INCDIR}/readline/`${BASENAME} $${inc}`; \ + dest=${BUILDLINK_DIR}/include/readline/`${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 +# This target links the libraries into ${BUILDLINK_DIR}/lib, which should # be searched first by the linker. # link-readline-libs: - @${ECHO} "Linking readline libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} + @${ECHO} "Linking readline libraries into ${BUILDLINK_DIR}/lib." + @${MKDIR} ${BUILDLINK_DIR}/lib @for lib in ${READLINE_LIBS}; do \ name=`${BASENAME} $${lib} | ${SED} "s|libedit|libreadline|"`; \ - dest=${BUILDLINK_LIBDIR}/$${name}; \ + dest=${BUILDLINK_DIR}/lib/$${name}; \ if [ -f $${lib} ]; then \ ${RM} -f $${dest}; \ ${LN} -sf $${lib} $${dest}; \ @@ -97,7 +93,7 @@ link-readline-libs: done @for lib in ${HISTORY_LIBS}; do \ name=`${BASENAME} $${lib} | ${SED} "s|libedit|libhistory|"`; \ - dest=${BUILDLINK_LIBDIR}/$${name}; \ + dest=${BUILDLINK_DIR}/lib/$${name}; \ if [ -f $${lib} ]; then \ ${RM} -f $${dest}; \ ${LN} -sf $${lib} $${dest}; \ @@ -106,20 +102,22 @@ link-readline-libs: .if defined(HAVE_LIBEDIT_READLINE) && defined(USE_LIBTOOL) editline-libtool-archive: - @${ECHO} "Creating editline libtool archive in ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} + @${ECHO} "Creating editline libtool archive in ${BUILDLINK_DIR}/lib." + @${MKDIR} ${BUILDLINK_DIR}/lib @cd /usr/lib; for lib in libedit.so.*.*; do \ major=`${ECHO} $$lib | ${SED} "s|.*\.so\.||;s|\..*||"`; \ minor=`${ECHO} $$lib | ${SED} "s|.*\.||"`; \ done; \ - cd ${BUILDLINK_LIBDIR}; \ + cd ${BUILDLINK_DIR}/lib; \ ${LIBTOOL} --quiet --mode=link ${CC} -o libedit.la \ -version-info $$major:$$minor -rpath /usr/lib; \ ${LIBTOOL} --quiet --mode=install ${CP} libedit.la \ - ${BUILDLINK_LIBDIR} 2>/dev/null; \ + ${BUILDLINK_DIR}/lib 2>/dev/null; \ ${RM} -f libedit.a; \ ${RM} -f libreadline.la; \ ${LN} -sf libedit.la libreadline.la .endif +.include "../../mk/bsd.buildlink.mk" + .endif # READLINE_BUILDLINK_MK diff --git a/devel/rpc2/buildlink.mk b/devel/rpc2/buildlink.mk index 12e634a737f..9de17fc246f 100644 --- a/devel/rpc2/buildlink.mk +++ b/devel/rpc2/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.3 2001/06/10 00:09:31 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.4 2001/06/11 01:59:35 jlam Exp $ # # This Makefile fragment is included by packages that use rpc2. # @@ -6,10 +6,9 @@ # # (1) Optionally define RPC2_REQD to the version of rpc2 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(RPC2_BUILDLINK_MK) @@ -18,53 +17,20 @@ RPC2_BUILDLINK_MK= # defined RPC2_REQD?= 1.10 DEPENDS+= rpc2>=${RPC2_REQD}:../../devel/rpc2 -RPC2_HEADERS= ${LOCALBASE}/include/rpc2/* -RPC2_LIBS= ${LOCALBASE}/lib/libfail.* -RPC2_LIBS+= ${LOCALBASE}/lib/librpc2.* -RPC2_LIBS+= ${LOCALBASE}/lib/libse.* - -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_PREFIX.rpc2= ${LOCALBASE} +BUILDLINK_FILES.rpc2= include/rpc2/* +BUILDLINK_FILES.rpc2+= lib/libfail.* +BUILDLINK_FILES.rpc2+= lib/librpc2.* +BUILDLINK_FILES.rpc2+= lib/libse.* .include "../../devel/lwp/buildlink.mk" -RPC2_BUILDLINK_COOKIE= ${WRKDIR}/.rpc2_buildlink_done -RPC2_BUILDLINK_TARGETS= link-rpc2-headers -RPC2_BUILDLINK_TARGETS+= link-rpc2-libs -BUILDLINK_TARGETS+= ${RPC2_BUILDLINK_COOKIE} - -pre-configure: ${RPC2_BUILDLINK_COOKIE} +BUILDLINK_TARGETS.rpc2= rpc2-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.rpc2} -${RPC2_BUILDLINK_COOKIE}: ${RPC2_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${RPC2_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.rpc2} +rpc2-buildlink: _BUILDLINK_USE -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-rpc2-headers: - @${ECHO} "Linking rpc2 headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR}/rpc2 - @${RM} -f ${BUILDLINK_INCDIR}/rpc2/* - @for inc in ${RPC2_HEADERS}; do \ - dest=${BUILDLINK_INCDIR}/rpc2/`${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-rpc2-libs: - @${ECHO} "Linking rpc2 libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${RPC2_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 # RPC2_BUILDLINK_MK diff --git a/devel/rvm/buildlink.mk b/devel/rvm/buildlink.mk index 8ae5b8fab88..7a776b9f281 100644 --- a/devel/rvm/buildlink.mk +++ b/devel/rvm/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.3 2001/06/10 00:09:31 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.4 2001/06/11 01:59:35 jlam Exp $ # # This Makefile fragment is included by packages that use rvm. # @@ -6,11 +6,9 @@ # # (1) Optionally define RVM_REQD to the version of rvm desired. # (2) Include this Makefile fragment in the package Makefile, -# (3) Optionally define BUILDLINK_INCDIR and BUILDLINK_LIBDIR, -# (4) Add ${BUILDLINK_TARGETS} to the prerequisite targets for pre-configure, -# (5) 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 -# (6) 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(RVM_BUILDLINK_MK) @@ -19,55 +17,22 @@ RVM_BUILDLINK_MK= # defined RVM_REQD?= 1.3 DEPENDS+= rvm>=${RVM_REQD}:../../devel/rvm -RVM_HEADERS= ${LOCALBASE}/include/rvm/* -RVM_LIBS= ${LOCALBASE}/lib/librds.* -RVM_LIBS+= ${LOCALBASE}/lib/librdslwp.* -RVM_LIBS+= ${LOCALBASE}/lib/librvm.* -RVM_LIBS+= ${LOCALBASE}/lib/librvmlwp.* -RVM_LIBS+= ${LOCALBASE}/lib/libseg.* - -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_PREFIX.rvm= ${LOCALBASE} +BUILDLINK_FILES.rvm= include/rvm/* +BUILDLINK_FILES.rvm+= lib/librds.* +BUILDLINK_FILES.rvm+= lib/librdslwp.* +BUILDLINK_FILES.rvm+= lib/librvm.* +BUILDLINK_FILES.rvm+= lib/librvmlwp.* +BUILDLINK_FILES.rvm+= lib/libseg.* .include "../../devel/lwp/buildlink.mk" -RVM_BUILDLINK_COOKIE= ${WRKDIR}/.rvm_buildlink_done -RVM_BUILDLINK_TARGETS= link-rvm-headers -RVM_BUILDLINK_TARGETS+= link-rvm-libs -BUILDLINK_TARGETS+= ${RVM_BUILDLINK_COOKIE} - -pre-configure: ${RVM_BUILDLINK_COOKIE} +BUILDLINK_TARGETS.rvm= rvm-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.rvm} -${RVM_BUILDLINK_COOKIE}: ${RVM_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${RVM_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.rvm} +rvm-buildlink: _BUILDLINK_USE -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-rvm-headers: - @${ECHO} "Linking rvm headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR}/rvm - @${RM} -f ${BUILDLINK_INCDIR}/rvm/* - @for inc in ${RVM_HEADERS}; do \ - dest=${BUILDLINK_INCDIR}/rvm/`${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-rvm-libs: - @${ECHO} "Linking rvm libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${RVM_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 # RVM_BUILDLINK_MK 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 |