diff options
author | rillig <rillig@pkgsrc.org> | 2020-10-06 17:36:50 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-10-06 17:36:50 +0000 |
commit | 46b6e6b8cc4bc3168f49babdb0c91dba4ff68be8 (patch) | |
tree | edbf7dbddae12f608cc96894608e77bf7e09488d /mk | |
parent | 07ba26b288c5bcb0d20de218717f1c403753f2fc (diff) | |
download | pkgsrc-46b6e6b8cc4bc3168f49babdb0c91dba4ff68be8.tar.gz |
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 (limited to 'mk')
-rw-r--r-- | mk/compiler/gcc.mk | 6 | ||||
-rw-r--r-- | mk/tools/replace.mk | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 04bf873ac43..3b6b71dbeef 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -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 @@ _GCCBINDIR= ${_CC:H} .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 @@ ${_GCC_${_var_}}: 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 --git a/mk/tools/replace.mk b/mk/tools/replace.mk index 8d1986ec4e4..420d9973396 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -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 @@ ${_TOOLS_VARNAME.${_t_}}= ${TOOLS_${_TOOLS_VARNAME.${_t_}}} # .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_}) |