pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Check that a variable is defined before ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/651aaabbc2f3
branches:  trunk
changeset: 470661:651aaabbc2f3
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Mar 11 08:36:41 2004 +0000

description:
Check that a variable is defined before using it.

BUILDLINK_PKGSRCDIR.<pkg> may not be defined since <pkg> may refer to a
dummy package, e.g. "db-native" as set by bdb.buildlink3.mk.

diffstat:

 mk/buildlink3/bsd.buildlink3.mk |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r b9ec37ae1175 -r 651aaabbc2f3 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk   Thu Mar 11 08:33:52 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk   Thu Mar 11 08:36:41 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.111 2004/03/11 06:32:58 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.112 2004/03/11 08:36:41 jlam Exp $
 #
 # An example package buildlink3.mk file:
 #
@@ -116,10 +116,12 @@
 # We can then check for this value to avoid build loops.
 #
 .for _pkg_ in ${BUILDLINK_PACKAGES}
-.  if !defined(IGNORE_PKG.${_pkg_}) && \
-      (${BUILDLINK_PKGSRCDIR.${_pkg_}:C|.*/([^/]*/[^/]*)$|\1|} == ${PKGPATH})
+.  if defined(BUILDLINK_PKGSRCDIR.${_pkg_})
+.    if !defined(IGNORE_PKG.${_pkg_}) && \
+        (${BUILDLINK_PKGSRCDIR.${_pkg_}:C|.*/([^/]*/[^/]*)$|\1|} == ${PKGPATH})
 IGNORE_PKG.${_pkg_}=   yes
 MAKEFLAGS+=            IGNORE_PKG.${_pkg_}=${IGNORE_PKG.${_pkg_}}
+.    endif
 .  endif
 .endfor
 



Home | Main Index | Thread Index | Old Index