config: add $egrep

Introduce a new variable set in $PLAN9/config:
$egrep, which is conditionally set to either
`egrep` or `grep -E`, based on platform, and use
this when we want to invoke `egrep`.

This works around the endless warnings from GNU
grep stating that `egrep` is deprecated in favor
of `grep -E`, when run on e.g. Linux.
This commit is contained in:
Dan Cross
2025-07-22 14:42:03 +00:00
parent 28690cd427
commit 564d45b5a5
9 changed files with 27 additions and 11 deletions

View File

@@ -65,11 +65,18 @@ DragonFly|*BSD)
echo "CFLAGS='-pthread'" >> $PLAN9/config
awk=awk
;;
*Linux*)
awk=awk
egrep='grep -E'
;;
*)
egrep=egrep
awk=awk
;;
esac
echo "egrep='$egrep'" >>$PLAN9/config
(
if [ `uname` = SunOS ]; then
# On Solaris x86, uname -p cannot be trusted.