pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk mk: fix undefined variables for current make runnin...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3b0a31de303e
branches: trunk
changeset: 440341:3b0a31de303e
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Oct 06 17:36:50 2020 +0000
description:
mk: fix undefined variables for current make running in -dL mode
In lint mode, NetBSD's make is stricter about undefined variables. In
conditions, the function arguments must be fully defined.
diffstat:
mk/compiler/gcc.mk | 6 ++++--
mk/tools/replace.mk | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 048fe3fd31d9 -r 3b0a31de303e mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk Tue Oct 06 15:15:31 2020 +0000
+++ b/mk/compiler/gcc.mk Tue Oct 06 17:36:50 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.214 2020/09/02 16:16:43 ryoon Exp $
+# $NetBSD: gcc.mk,v 1.215 2020/10/06 17:36:50 rillig Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -912,6 +912,8 @@
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
_GCC_BIN_PREFIX= ${MACHINE_GNU_PLATFORM}-
.endif
+_GCC_BIN_PREFIX?= # empty
+GCC_VERSION_SUFFIX?= # empty
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gcc${GCC_VERSION_SUFFIX})
_GCC_VARS+= CC
_GCC_CC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gcc${GCC_VERSION_SUFFIX}
@@ -1119,7 +1121,7 @@
PKGSRC_FORTRAN?=gfortran
_GCC_NEEDS_A_FORTRAN= no
-.if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !exists(${FCPATH})
+.if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !(defined(FCPATH) && exists(${FCPATH}))
_GCC_NEEDS_A_FORTRAN= yes
.else
. for _pattern_ in 0.* 1.[0-4] 1.[0-4].*
diff -r 048fe3fd31d9 -r 3b0a31de303e mk/tools/replace.mk
--- a/mk/tools/replace.mk Tue Oct 06 15:15:31 2020 +0000
+++ b/mk/tools/replace.mk Tue Oct 06 17:36:50 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.290 2019/06/06 11:54:33 jperkin Exp $
+# $NetBSD: replace.mk,v 1.291 2020/10/06 17:36:50 rillig Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1372,7 +1372,7 @@
#
.if defined(GNU_CONFIGURE)
. for _t_ in ${_USE_TOOLS}
-. if defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
+. if defined(_TOOLS_VARNAME.${_t_}) && defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
TOOLS_VALUE_GNU.${_t_}?= ${TOOLS_CMDLINE.${_t_}}
. endif
. if defined(TOOLS_VALUE_GNU.${_t_})
Home |
Main Index |
Thread Index |
Old Index