pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   rillig
Date:           Tue Oct  6 17:36:50 UTC 2020

Modified Files:
        pkgsrc/mk/compiler: gcc.mk
        pkgsrc/mk/tools: replace.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 pkgsrc/mk/compiler/gcc.mk
cvs rdiff -u -r1.290 -r1.291 pkgsrc/mk/tools/replace.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.214 pkgsrc/mk/compiler/gcc.mk:1.215
--- pkgsrc/mk/compiler/gcc.mk:1.214     Wed Sep  2 16:16:43 2020
+++ pkgsrc/mk/compiler/gcc.mk   Tue Oct  6 17:36:50 2020
@@ -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].*

Index: pkgsrc/mk/tools/replace.mk
diff -u pkgsrc/mk/tools/replace.mk:1.290 pkgsrc/mk/tools/replace.mk:1.291
--- pkgsrc/mk/tools/replace.mk:1.290    Thu Jun  6 11:54:33 2019
+++ pkgsrc/mk/tools/replace.mk  Tue Oct  6 17:36:50 2020
@@ -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_${_TOO
 #
 .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