summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-07-01 22:56:01 +0000
committerjlam <jlam@pkgsrc.org>2001-07-01 22:56:01 +0000
commit8933c84cf6df90e5884707c09bc6aa1fbb7632e5 (patch)
treed1969337758d53cef307caff3f46302390591ab7 /mk
parentfed682f7475fdc3921cb49be9f841cd8156a0f52 (diff)
downloadpkgsrc-8933c84cf6df90e5884707c09bc6aa1fbb7632e5.tar.gz
Change example to have bsd.buildlink.mk file included at start of a
package buildlink.mk file. Also change BUILDLINK_CONFIG_WRAPPER_SED.<pkgname> to BUILDLINK_CONFIG_WRAPPER_SED.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.buildlink.mk18
1 files changed, 11 insertions, 7 deletions
diff --git a/mk/bsd.buildlink.mk b/mk/bsd.buildlink.mk
index ee91f3e8603..aca79c87fb3 100644
--- a/mk/bsd.buildlink.mk
+++ b/mk/bsd.buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink.mk,v 1.19 2001/06/29 04:17:19 jlam Exp $
+# $NetBSD: bsd.buildlink.mk,v 1.20 2001/07/01 22:56:01 jlam Exp $
#
# This Makefile fragment is included by package buildlink.mk files. This
# file does the following things:
@@ -62,6 +62,8 @@
#
# Example package buildlink.mk file:
#
+# .include "../../mk/bsd.buildlink.mk"
+#
# BUILDLINK_PREFIX.foo= ${LOCALBASE}
# BUILDLINK_FILES.foo= include/foo.h
# BUILDLINK_FILES.foo+= include/bar.h
@@ -74,8 +76,6 @@
#
# pre-configure: foo-buildlink
# foo-buildlink: _BUILDLINK_USE
-#
-# .include "../../mk/bsd.buildlink.mk"
.if !defined(_BSD_BUILDLINK_MK)
_BSD_BUILDLINK_MK= # defined
@@ -134,7 +134,8 @@ _BUILDLINK_USE: .USE
USE_CONFIG_WRAPPER= # defined
.endif
-BUILDLINK_CONFIG_WRAPPER_SED= \
+BUILDLINK_CONFIG_WRAPPER_SED?= # empty
+BUILDLINK_CONFIG_WRAPPER_POST_SED= \
-e "s|-I${LOCALBASE}/|-I${BUILDLINK_DIR}/|g" \
-e "s|-L${LOCALBASE}/|-L${BUILDLINK_DIR}/|g"
@@ -147,8 +148,8 @@ _BUILDLINK_CONFIG_WRAPPER_USE: .USE
(${ECHO} '#!/bin/sh'; \
${ECHO} ''; \
${ECHO} '${ECHO} "`${BUILDLINK_CONFIG.${.TARGET:S/-buildlink-config-wrapper//}} $$*`" | ${SED} \'; \
- ${ECHO} ' ${BUILDLINK_CONFIG_WRAPPER_SED.${.TARGET:S/-buildlink-config-wrapper//}} \'; \
${ECHO} ' ${BUILDLINK_CONFIG_WRAPPER_SED} \'; \
+ ${ECHO} ' ${BUILDLINK_CONFIG_WRAPPER_POST_SED} \'; \
) > ${BUILDLINK_CONFIG_WRAPPER.${.TARGET:S/-buildlink-config-wrapper//}}; \
${CHMOD} +x ${BUILDLINK_CONFIG_WRAPPER.${.TARGET:S/-buildlink-config-wrapper//}}; \
${TOUCH} ${TOUCH_FLAGS} $${cookie}; \
@@ -157,7 +158,9 @@ _BUILDLINK_CONFIG_WRAPPER_USE: .USE
.if defined(USE_LIBTOOL)
post-build: buildlink-fix-libtool-archives
-BUILDLINK_FIX_LIBTOOL_SED+= -e "s|-L${BUILDLINK_DIR}/|-L${LOCALBASE}/|g"
+BUILDLINK_FIX_LIBTOOL_SED?= # empty
+BUILDLINK_FIX_LIBTOOL_POST_SED+= \
+ -e "s|-L${BUILDLINK_DIR}/|-L${LOCALBASE}/|g"
# Note: This target _MUST_ know something about libtool internals to correctly
# fix the references to ${BUILDLINK_DIR} into ${LOCALBASE}.
@@ -170,7 +173,8 @@ buildlink-fix-libtool-archives:
lai_files=`${FIND} ${WRKSRC} -name "*.lai"`; \
for file in $${lai_files}; do \
${MV} -f $${file} $${file}.fixme; \
- ${SED} ${BUILDLINK_FIX_LIBTOOL_SED} \
+ ${SED} ${BUILDLINK_FIX_LIBTOOL_SED} \
+ ${BUILDLINK_FIX_LIBTOOL_POST_SED} \
$${file}.fixme > $${file}; \
${RM} -f $${file}.fixme; \
done; \