diff --git a/Makefile.in b/Makefile.in index 5ae970a26..fb21fdf70 100644 --- a/Makefile.in +++ b/Makefile.in @@ -70,6 +70,8 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ SHELL = @SHELL@ +EGREP = @EGREP@ +GREP = @GREP@ SED = @SED@ INSTALL = $(SHELL) $(scriptdir)/install-sh -c @@ -117,7 +119,7 @@ check check-verbose check-fuzzer fuzz pre-install: config.status done uncrustify.files: Makefile - grep '\.[ch]$$' $(top_srcdir)/MANIFEST | grep -E -v '(/zlib/|/(arc4random|arc4random_uniform|chacha_private|charclass|fnmatch|getaddrinfo|getcwd|getdate|getentropy|getopt|getopt_long|glob|gram|inet_ntop|inet_pton|log_server.pb-c|mktemp|pw_dup|reallocarray|mktemp_test|protobuf-c|snprintf|stdbool|strlcat|strlcpy|sudo_queue|toke)\.[ch]$$)' > uncrustify.files + $(GREP) '\.[ch]$$' $(top_srcdir)/MANIFEST | $(EGREP) -v '(/zlib/|/(arc4random|arc4random_uniform|chacha_private|charclass|fnmatch|getaddrinfo|getcwd|getdate|getentropy|getopt|getopt_long|glob|gram|inet_ntop|inet_pton|log_server.pb-c|mktemp|pw_dup|reallocarray|mktemp_test|protobuf-c|snprintf|stdbool|strlcat|strlcpy|sudo_queue|toke)\.[ch]$$)' > uncrustify.files reformat: uncrustify.files ( cd $(top_srcdir) && uncrustify -c etc/uncrustify.cfg --replace --no-backup -F $(top_builddir)/uncrustify.files ) @@ -126,7 +128,7 @@ check-format: uncrustify.files ( cd $(top_srcdir) && uncrustify -c etc/uncrustify.cfg --check -F $(top_builddir)/uncrustify.files ) spell: - ( cd $(top_srcdir) && codespell -I etc/codespell.ignore -x etc/codespell.exclude `grep -E -v -f etc/codespell.skip MANIFEST` ) + ( cd $(top_srcdir) && codespell -I etc/codespell.ignore -x etc/codespell.exclude `$(EGREP) -v -f etc/codespell.skip MANIFEST` ) cppcheck: config.status rval=0; \ diff --git a/lib/eventlog/Makefile.in b/lib/eventlog/Makefile.in index 84f8a5441..45b9ad2e9 100644 --- a/lib/eventlog/Makefile.in +++ b/lib/eventlog/Makefile.in @@ -33,6 +33,7 @@ incdir = $(top_srcdir)/include # Compiler & tools to use CC = @CC@ LIBTOOL = @LIBTOOL@ +GREP = @GREP@ # C preprocessor flags CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@ @@ -151,7 +152,7 @@ check-fuzzer: check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ diff --git a/lib/iolog/Makefile.in b/lib/iolog/Makefile.in index 19ca7f3d4..2dde029d0 100644 --- a/lib/iolog/Makefile.in +++ b/lib/iolog/Makefile.in @@ -35,6 +35,7 @@ cross_compiling = @CROSS_COMPILING@ CC = @CC@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ +GREP = @GREP@ SED = @SED@ # Libraries @@ -199,7 +200,7 @@ fuzz_iolog_json_seed_corpus.zip: rm -rf $$tdir run-fuzz_iolog_json: fuzz_iolog_json - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -226,7 +227,7 @@ fuzz_iolog_legacy_seed_corpus.zip: rm -rf $$tdir run-fuzz_iolog_legacy: fuzz_iolog_legacy - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -253,7 +254,7 @@ fuzz_iolog_timing_seed_corpus.zip: rm -rf $$tdir run-fuzz_iolog_timing: fuzz_iolog_timing - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -307,7 +308,7 @@ fuzz: run-fuzz_iolog_json run-fuzz_iolog_legacy run-fuzz_iolog_timing check-fuzzer: $(FUZZ_PROGS) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -326,7 +327,7 @@ check-fuzzer: $(FUZZ_PROGS) check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ diff --git a/lib/util/Makefile.in b/lib/util/Makefile.in index 67177febd..ff24c7b96 100644 --- a/lib/util/Makefile.in +++ b/lib/util/Makefile.in @@ -55,6 +55,7 @@ CPP = @CPP@ HOSTCPP = @CPP_FOR_BUILD@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ +GREP = @GREP@ SED = @SED@ AWK = @AWK@ @@ -331,7 +332,7 @@ fuzz_sudo_conf_seed_corpus.zip: rm -rf $$tdir run-fuzz_sudo_conf: fuzz_sudo_conf - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -397,7 +398,7 @@ fuzz: run-fuzz_sudo_conf check-fuzzer: $(FUZZ_PROGS) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -413,7 +414,7 @@ check-fuzzer: $(FUZZ_PROGS) # Note: some regress checks are run from srcdir for consistent error messages check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -438,9 +439,9 @@ check: $(TEST_PROGS) check-fuzzer if test -f globtest; then \ mkdir -p `$(SED) 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u`; \ touch `cat $(srcdir)/regress/glob/files`; \ - chmod 0755 `grep '/r[^/]*$$' $(srcdir)/regress/glob/files`; \ - chmod 0444 `grep '/s[^/]*$$' $(srcdir)/regress/glob/files`; \ - chmod 0711 `grep '/t[^/]*$$' $(srcdir)/regress/glob/files`; \ + chmod 0755 `$(GREP) '/r[^/]*$$' $(srcdir)/regress/glob/files`; \ + chmod 0444 `$(GREP) '/s[^/]*$$' $(srcdir)/regress/glob/files`; \ + chmod 0711 `$(GREP) '/t[^/]*$$' $(srcdir)/regress/glob/files`; \ ./globtest $(srcdir)/regress/glob/globtest.in || rval=`expr $$rval + $$?`; \ rm -rf fake; \ fi; \ diff --git a/logsrvd/Makefile.in b/logsrvd/Makefile.in index fba163ace..c9ba8658c 100644 --- a/logsrvd/Makefile.in +++ b/logsrvd/Makefile.in @@ -36,6 +36,7 @@ cross_compiling = @CROSS_COMPILING@ CC = @CC@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ +GREP = @GREP@ SED = @SED@ # Our install program supports extra flags... @@ -194,7 +195,7 @@ fuzz_logsrvd_conf_seed_corpus.zip: rm -rf $$tdir run-fuzz_logsrvd_conf: fuzz_logsrvd_conf - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -257,7 +258,7 @@ fuzz: run-fuzz_logsrvd_conf check-fuzzer: $(FUZZ_PROGS) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -272,7 +273,7 @@ check-fuzzer: $(FUZZ_PROGS) check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ diff --git a/plugins/python/Makefile.in b/plugins/python/Makefile.in index a4b71e57a..997eb479f 100644 --- a/plugins/python/Makefile.in +++ b/plugins/python/Makefile.in @@ -36,6 +36,7 @@ cross_compiling = @CROSS_COMPILING@ # Compiler & tools to use CC = @CC@ LIBTOOL = @LIBTOOL@ +GREP = @GREP@ SED = @SED@ AWK = @AWK@ @@ -227,7 +228,7 @@ check-fuzzer: check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 037a7da84..29110dcfd 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -47,6 +47,7 @@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ FLEX = @FLEX@ YACC = @YACC@ +GREP = @GREP@ SED = @SED@ AWK = @AWK@ @@ -429,7 +430,7 @@ fuzz_policy_seed_corpus.zip: rm -rf $$tdir run-fuzz_policy: fuzz_policy - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -456,7 +457,7 @@ fuzz_sudoers_seed_corpus.zip: rm -rf $$tdir run-fuzz_sudoers: fuzz_sudoers - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -483,7 +484,7 @@ fuzz_sudoers_ldif_seed_corpus.zip: rm -rf $$tdir run-fuzz_sudoers_ldif: fuzz_sudoers_ldif - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -633,7 +634,7 @@ fuzz: run-fuzz_policy run-fuzz_sudoers run-fuzz_sudoers_ldif check-fuzzer: $(FUZZ_PROGS) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ @@ -652,7 +653,7 @@ check-fuzzer: $(FUZZ_PROGS) check: $(TEST_PROGS) visudo testsudoers cvtsudoers check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \ diff --git a/src/Makefile.in b/src/Makefile.in index f3a411f1b..d7178b75c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -35,6 +35,7 @@ cross_compiling = @CROSS_COMPILING@ # Compiler & tools to use CC = @CC@ LIBTOOL = @LIBTOOL@ +GREP = @GREP@ SED = @SED@ AWK = @AWK@ @@ -330,7 +331,7 @@ check-fuzzer: check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | grep '^C.UTF-8$$' >/dev/null 2>&1; then \ + if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ LC_ALL=C.UTF-8; export LC_ALL; \ else \ LC_ALL=C; export LC_ALL; \