From 82e6e600195f4a8b25a23fbe471fb80ba268f56c Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Mon, 25 Jul 2022 06:33:41 +0200 Subject: [PATCH] package: don't warn about missing yacc or bison None of our code uses yacc or bison, so it's pointless for package to complain about them being missing if they are not installed. --- bin/package | 12 ++---------- src/cmd/INIT/package.sh | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/bin/package b/bin/package index 9ab80eff3..2ce90ab16 100755 --- a/bin/package +++ b/bin/package @@ -109,7 +109,7 @@ command=${0##*/} case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in 0123) USAGE=$' [-? -@(#)$Id: '$command$' (ksh 93u+m) 2022-07-22 $ +@(#)$Id: '$command$' (ksh 93u+m) 2022-07-25 $ ] [-author?Glenn Fowler ] [-author?Contributors to https://github.com/ksh93/ksh] @@ -2718,7 +2718,7 @@ make|view) # check for some required commands must="$AR" - warn="$NM yacc bison" + warn="$NM" test="$must $warn" have= IFS=: @@ -2742,14 +2742,6 @@ make|view) esac done done - case " $have " in - *" bison "*) ;; - *" yacc "*) have="$have bison" ;; - esac - case " $have " in - *" yacc "*) ;; - *" bison "*) have="$have yacc" ;; - esac for t in $test do case " $have " in *" $t "*) diff --git a/src/cmd/INIT/package.sh b/src/cmd/INIT/package.sh index 9ab80eff3..2ce90ab16 100644 --- a/src/cmd/INIT/package.sh +++ b/src/cmd/INIT/package.sh @@ -109,7 +109,7 @@ command=${0##*/} case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in 0123) USAGE=$' [-? -@(#)$Id: '$command$' (ksh 93u+m) 2022-07-22 $ +@(#)$Id: '$command$' (ksh 93u+m) 2022-07-25 $ ] [-author?Glenn Fowler ] [-author?Contributors to https://github.com/ksh93/ksh] @@ -2718,7 +2718,7 @@ make|view) # check for some required commands must="$AR" - warn="$NM yacc bison" + warn="$NM" test="$must $warn" have= IFS=: @@ -2742,14 +2742,6 @@ make|view) esac done done - case " $have " in - *" bison "*) ;; - *" yacc "*) have="$have bison" ;; - esac - case " $have " in - *" yacc "*) ;; - *" bison "*) have="$have yacc" ;; - esac for t in $test do case " $have " in *" $t "*)