summaryrefslogtreecommitdiff
path: root/mk/pthread.buildlink3.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-11-17 21:05:24 +0000
committerjlam <jlam@pkgsrc.org>2004-11-17 21:05:24 +0000
commit319f9f72eb563acfe63344613cf6746ff4016c79 (patch)
tree771eb960aa66352b9b0493d368b0026f0ca6e078 /mk/pthread.buildlink3.mk
parentb990d523e97e7e30f5034d07be86a15beeaa1ecf (diff)
downloadpkgsrc-319f9f72eb563acfe63344613cf6746ff4016c79.tar.gz
PTHREAD_AUTO_VARS is "yes" or "no" for whether the values of the
variables PTHREAD_{CFLAGS,CPPFLAGS,LDFLAGS,LIBS} should be automatically added to their respective variables. Defaults to "yes". Packages that only require some parts to be linked the the pthreads compiler/linker options should set this to "no" and selectively add those options via patches to the right makefiles..
Diffstat (limited to 'mk/pthread.buildlink3.mk')
-rw-r--r--mk/pthread.buildlink3.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/pthread.buildlink3.mk b/mk/pthread.buildlink3.mk
index 34c4259e94b..893f1742d27 100644
--- a/mk/pthread.buildlink3.mk
+++ b/mk/pthread.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink3.mk,v 1.16 2004/11/12 22:34:15 jlam Exp $
+# $NetBSD: pthread.buildlink3.mk,v 1.17 2004/11/17 21:05:24 jlam Exp $
#
# The pthreads strategy for pkgsrc is to "bless" a particular pthread
# package as the Official Pthread Replacement (OPR). A package that uses
@@ -94,6 +94,10 @@
# include the word "native" to denote that only native pthreads are
# acceptable.
#
+# PTHREAD_AUTO_VARS is "yes" or "no" for whether the values of the variables
+# PTHREAD_{CFLAGS,CPPFLAGS,LDFLAGS,LIBS} should be automatically added
+# to their respective variables. Defaults to "yes".
+#
# _PKG_PTHREAD is the fall-back package pthread implementation use by
# pthread.buildlink3.mk.
#
@@ -140,10 +144,13 @@ PKG_SKIP_REASON= "${PKGNAME} requires a working pthreads implementation."
. endif
.endif
+PTHREAD_AUTO_VARS?= yes
+
.if ${PTHREAD_TYPE} == "native"
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Npthread}
BUILDLINK_PACKAGES+= pthread
BUILDLINK_BUILTIN_MK.pthread= ../../mk/pthread.builtin.mk
+BUILDLINK_AUTO_VARS.pthread?= ${PTHREAD_AUTO_VARS}
.elif ${PTHREAD_TYPE} == "${_PKG_PTHREAD}"
. if exists(${_PKG_PTHREAD_BUILDLINK3_MK})
. if !empty(_PKG_PTHREAD_DEPENDS)
@@ -157,6 +164,8 @@ BUILDLINK_CPPFLAGS.pthread= ${BUILDLINK_CPPFLAGS.${_PKG_PTHREAD}}
BUILDLINK_LDFLAGS.pthread= ${BUILDLINK_LDFLAGS.${_PKG_PTHREAD}}
BUILDLINK_LIBS.${_PKG_PTHREAD}?= -lpthread
BUILDLINK_LIBS.pthread= ${BUILDLINK_LIBS.${_PKG_PTHREAD}}
+BUILDLINK_AUTO_VARS.${_PKG_PTHREAD}?= ${PTHREAD_AUTO_VARS}
+BUILDLINK_AUTO_VARS.pthread= ${BUILDLINK_AUTO_VARS.${_PKG_PTHREAD}}
. else
PKG_SKIP_REASON= "${PKGNAME} needs pthreads, but ${_PKG_PTHREAD_BUILDLINK3_MK} is missing."
. endif