Handle "?=" as well as "=" when searching for duplicated assignments.
This commit is contained in:
parent
e58cb3371d
commit
df36fdc9b1
@ -1,6 +1,6 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# $OpenBSD: portcheck,v 1.57 2013/12/29 16:59:06 zhuk Exp $
|
||||
# $OpenBSD: portcheck,v 1.58 2013/12/30 12:29:25 zhuk Exp $
|
||||
# Copyright (c) 2013 Vadim Zhukov
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
@ -1407,9 +1407,9 @@ check_makefile() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $l == *(" ")+([A-Za-z0-9_-])*(" "|"$tab")=* ]] &&
|
||||
if [[ $l == *(" ")+([A-Za-z0-9_-])*(" "|"$tab")?(\?)=* ]] &&
|
||||
((iflevel == 0)) && ! $dupfound; then
|
||||
var=${t[0]%=}
|
||||
var=${t[0]%?(\?)=}
|
||||
for v in "${mkvars[@]}"; do
|
||||
if [[ $v == "$var" ]]; then
|
||||
err "duplicated assignment of $v" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user