diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4594c6360..0fe4c94e4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -312,7 +312,7 @@ jobs: if [ ${{ matrix.use_asan }} ]; then # Work around spurious crashes by running the test again. # See https://github.com/google/sanitizers/issues/1353 - if fgrep -q 'LeakSanitizer has encountered a fatal error' test.out; then + if grep -qF 'LeakSanitizer has encountered a fatal error' test.out; then echo '+++ Rerunning the tests once again after LeakSanitizer crash +++' unset rc ./test || rc=$? @@ -354,7 +354,7 @@ jobs: /bin/bash -o pipefail -c "xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui -d 1 $wx_tests_selection 2>&1 | tee -a test_gui.out" || rc=$? if [ -n "$rc" ]; then - if fgrep -q '(core dumped)' test_gui.out; then + if grep -qF '(core dumped)' test_gui.out; then echo '*** Test crashed, trying to get more information ***' gdb --quiet --core=core -ex 'where' -ex 'thread apply all bt' -ex 'q' ./test_gui fi diff --git a/Makefile.in b/Makefile.in index fc84c66e64..ed9a51f15a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38172,7 +38172,7 @@ distdir: @GUIDIST@ @# in other dist targets. find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \ \( -name "makefile.*" -a ! -name "makefile.gcc" -a ! -name "makefile.unx" \) \) \ - -print | egrep -v '/samples/.*\.hh.$$' | xargs rm -rf + -print | grep -vE '/samples/.*\.hh.$$' | xargs rm -rf dist: distdir @cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE); diff --git a/build/aclocal/bakefile.m4 b/build/aclocal/bakefile.m4 index 2c0dcd9464..240f037a0c 100644 --- a/build/aclocal/bakefile.m4 +++ b/build/aclocal/bakefile.m4 @@ -44,7 +44,7 @@ AC_DEFUN([AC_BAKEFILE_GNUMAKE], AC_CACHE_CHECK([if make is GNU make], bakefile_cv_prog_makeisgnu, [ if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null | - egrep -s GNU > /dev/null); then + grep -sE GNU > /dev/null); then bakefile_cv_prog_makeisgnu="yes" else bakefile_cv_prog_makeisgnu="no" diff --git a/build/bakefiles/make_dist.mk b/build/bakefiles/make_dist.mk index f737074087..7ff79b6a7b 100644 --- a/build/bakefiles/make_dist.mk +++ b/build/bakefiles/make_dist.mk @@ -782,7 +782,7 @@ distdir: @GUIDIST@ @# in other dist targets. find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \ \( -name "makefile.*" -a ! -name "makefile.gcc" -a ! -name "makefile.unx" \) \) \ - -print | egrep -v '/samples/.*\.hh.$$' | xargs rm -rf + -print | grep -vE '/samples/.*\.hh.$$' | xargs rm -rf dist: distdir @cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE); diff --git a/build/cmake/config.cmake b/build/cmake/config.cmake index 562108b0f8..53d545388e 100644 --- a/build/cmake/config.cmake +++ b/build/cmake/config.cmake @@ -102,9 +102,6 @@ function(wx_write_config) set(libdir "\${exec_prefix}/lib") set(bindir "\${exec_prefix}/bin") - find_program(EGREP egrep) - mark_as_advanced(EGREP) - if(wxBUILD_MONOLITHIC) set(MONOLITHIC 1) else() diff --git a/configure b/configure index 5a3943bd70..af6ac75223 100755 --- a/configure +++ b/configure @@ -43868,7 +43868,7 @@ if ${bakefile_cv_prog_makeisgnu+:} false; then : else if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null | - egrep -s GNU > /dev/null); then + grep -sE GNU > /dev/null); then bakefile_cv_prog_makeisgnu="yes" else bakefile_cv_prog_makeisgnu="no" diff --git a/docs/changes.txt b/docs/changes.txt index 7d2ac858ff..e172eaf1fe 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -243,6 +243,7 @@ All: - Don't use invalid iterator in wxString in UTF-8 build (Ian Day, #23305). - Fix wrong description for some languages (Ulrich Telle, #23419). - Fix infinite loop in wxFTP::GetFilesList() (#23519). +- Use grep instead of fgrep and egrep in makefiles/scripts (#23537). All (GUI): diff --git a/misc/unictabl/mk_fallbacks.sh b/misc/unictabl/mk_fallbacks.sh index a4814186d1..4eb43823fb 100755 --- a/misc/unictabl/mk_fallbacks.sh +++ b/misc/unictabl/mk_fallbacks.sh @@ -40,7 +40,7 @@ cat _tmp6 | sort +2 > _tmp4 cat _tmp4 | while read i ; do code=`echo $i | cut -c1-6` fallb=`echo $i | cut -c8-29` - cat _tmp4 | fgrep "$fallb" | cut -c1-6 | (read i ; + cat _tmp4 | grep -F "$fallb" | cut -c1-6 | (read i ; echo "$code $i" >> _tmp5) done @@ -54,7 +54,7 @@ cat _tmp6 | sort +2 > _tmp4 cat _tmp4 | while read i ; do code=`echo $i | cut -c1-6` fallb=`echo $i | cut -c8-27` - cat _tmp4 | fgrep "$fallb" | cut -c1-6 | (read i ; + cat _tmp4 | grep -F "$fallb" | cut -c1-6 | (read i ; echo "$code $i" >> _tmp5) done