diff options
author | jlam <jlam@pkgsrc.org> | 2001-06-18 21:23:35 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-06-18 21:23:35 +0000 |
commit | b642e040c70563dfafaa507eff07665f76d4105d (patch) | |
tree | dece504936ea975562869f2074870d9fa29e6bd8 /mk | |
parent | 30911b7ace54b85e73c9926ac734419ce97b80d1 (diff) | |
download | pkgsrc-b642e040c70563dfafaa507eff07665f76d4105d.tar.gz |
Create USE_BUILDLINK_ONLY variable that doesn't add -L${LOCALBASE}/lib
to LDFLAGS if it's defined. This is intended for use by package developers
to catch packages that implicitly use libraries from ${LOCALBASE}/lib
without depending on the correct package.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index d4e68364b11..fbf74b492c8 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.761 2001/06/16 04:11:30 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.762 2001/06/18 21:23:35 jlam Exp $ # # This file is in the public domain. # @@ -310,11 +310,17 @@ M4?= /usr/bin/m4 .if defined(USE_MOTIF) || defined(USE_X11BASE) || defined(USE_X11) .if defined(USE_MOTIF) -LDFLAGS+= -Wl,-R${MOTIFBASE}/lib -L${MOTIFBASE}/lib +LDFLAGS+= -Wl,-R${MOTIFBASE}/lib +.if !defined(USE_BUILDLINK_ONLY) || (${MOTIFBASE} != ${LOCALBASE}) +LDFLAGS+= -L${MOTIFBASE}/lib +.endif .endif LDFLAGS+= -Wl,-R${X11BASE}/lib -L${X11BASE}/lib .endif -LDFLAGS+= -Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib +LDFLAGS+= -Wl,-R${LOCALBASE}/lib +.if !defined(USE_BUILDLINK_ONLY) +LDFLAGS+= -L${LOCALBASE}/lib +.endif MAKE_ENV+= LDFLAGS="${LDFLAGS}" CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" M4="${M4}" YACC="${YACC}" @@ -649,8 +655,12 @@ PKG_DBDIR?= ${DESTDIR}/var/db/pkg # shared/dynamic motif libs .if defined(USE_MOTIF) +.if defined(USE_BUILDLINK_ONLY) && (${MOTIFBASE} == ${LOCALBASE}) +MOTIFLIB?= -L${X11BASE}/lib -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -Wl,-R${LOCALBASE}/lib -lXm -lXp +.else MOTIFLIB?= -L${MOTIFBASE}/lib -L${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -Wl,-R${LOCALBASE}/lib -lXm -lXp .endif +.endif # Define SMART_MESSAGES in /etc/mk.conf for messages giving the tree # of dependencies for building, and the current target. |