pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Add a new variable BUILDLINK_LIBS.<pkg> ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6efe25bfb195
branches: trunk
changeset: 483426:6efe25bfb195
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Nov 12 04:57:31 2004 +0000
description:
Add a new variable BUILDLINK_LIBS.<pkg> which contains a list of -l...
options (library options) to be appended automatically to LIBS when
building against <pkg>. LIBS is used by GNU configure scripts to note
the library options that are automatically added to the link command
line.
diffstat:
mk/buildlink3/bsd.buildlink3.mk | 42 +++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 10 deletions(-)
diffs (105 lines):
diff -r 09439f553537 -r 6efe25bfb195 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk Fri Nov 12 02:27:43 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk Fri Nov 12 04:57:31 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.159 2004/10/05 15:28:50 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.160 2004/11/12 04:57:31 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -261,6 +261,10 @@
# compiler/linker so that building against
# <pkg> will work.
#
+# BUILDLINK_LIBS.<pkg> contain -l... (library) options that are
+# automatically appended to the LIBS
+# variable when building against <pkg>.
+#
# BUILDLINK_INCDIRS.<pkg>,
# BUILDLINK_LIBDIRS.<pkg>,
# BUILDLINK_RPATHDIRS.<pkg> subdirectories of BUILDLINK_PREFIX.<pkg>
@@ -342,6 +346,7 @@
BUILDLINK_CPPFLAGS.${_pkg_}?= # empty
BUILDLINK_LDFLAGS.${_pkg_}?= # empty
+BUILDLINK_LIBS.${_pkg_}?= # empty
BUILDLINK_INCDIRS.${_pkg_}?= include
BUILDLINK_LIBDIRS.${_pkg_}?= lib${ABI}
. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
@@ -351,14 +356,15 @@
. endif
.endfor
-# BUILDLINK_CPPFLAGS and BUILDLINK_LDFLAGS contain the proper -I...
-# and -L.../-Wl,-R... options to be passed to the compiler and linker
-# to find the headers and libraries for the various packages at
-# configure/build time. BUILDLINK_CFLAGS contains any special compiler
-# options needed when building against the various packages.
+# BUILDLINK_CPPFLAGS, BUILDLINK_LDFLAGS, and BUILDLINK_LIBS contain the
+# proper -I..., -L.../-Wl,-R..., and -l... options to be passed to the
+# compiler and linker to find the headers and libraries for the various
+# packages at configure/build time. BUILDLINK_CFLAGS contains any special
+# compiler options needed when building against the various packages.
#
BUILDLINK_CPPFLAGS= # empty
BUILDLINK_LDFLAGS= # empty
+BUILDLINK_LIBS= # empty
BUILDLINK_CFLAGS= # empty
.for _pkg_ in ${_BLNK_PACKAGES}
@@ -377,6 +383,11 @@
BUILDLINK_CFLAGS+= ${_flag_}
. endif
. endfor
+. for _flag_ in ${BUILDLINK_LIBS.${_pkg_}}
+. if empty(BUILDLINK_LIBS:M${_flag_})
+BUILDLINK_LIBS+= ${_flag_}
+. endif
+. endfor
. if !empty(BUILDLINK_INCDIRS.${_pkg_})
. for _dir_ in ${BUILDLINK_INCDIRS.${_pkg_}:S/^/${BUILDLINK_PREFIX.${_pkg_}}\//}
. if exists(${_dir_})
@@ -449,6 +460,12 @@
. endif
.endif
+CFLAGS?= # empty
+CPPFLAGS?= # empty
+CXXFLAGS?= # empty
+LDFLAGS?= # empty
+LIBS?= # empty
+
.for _flag_ in ${BUILDLINK_CFLAGS}
. if empty(CFLAGS:M${_flag_})
CFLAGS+= ${_flag_}
@@ -457,14 +474,14 @@
CXXFLAGS+= ${_flag_}
. endif
.endfor
+#
+# We add BUILDLINK_CPPFLAGS to both CFLAGS and CXXFLAGS since much software
+# ignores the value of CPPFLAGS that we set in the environment.
+#
.for _flag_ in ${BUILDLINK_CPPFLAGS}
. if empty(CPPFLAGS:M${_flag_})
CPPFLAGS+= ${_flag_}
. endif
-#
-# We add BUILDLINK_CPPFLAGS to both CFLAGS and CXXFLAGS since much software
-# ignores the value of CPPFLAGS that we set in the environment.
-#
. if empty(CFLAGS:M${_flag_})
CFLAGS+= ${_flag_}
. endif
@@ -477,6 +494,11 @@
LDFLAGS+= ${_flag_}
. endif
.endfor
+.for _flag_ in ${BUILDLINK_LIBS}
+. if empty(LIBS:M${_flag_})
+LIBS+= ${_flag_}
+. endif
+.endfor
# Create the buildlink include and lib directories so that the Darwin
# compiler/linker won't complain verbosely (on stdout, even!) when
Home |
Main Index |
Thread Index |
Old Index