On 12/3/18 9:00 AM, Roman Bolshakov wrote:
A project that uses maint.mk can specify regular expressions that are
not supported in system grep. Autoconf can discover an alias for GNU
grep and set it in GREP but it takes no effect for maint.mk

The patch provides an ability to use GNU grep if it was discovered by
autoconf and by calling GNU grep we don't get the messages in syntax-check:
   prohibit_diagnostic_without_format
   grep: empty (sub)expression
   grep: empty (sub)expression
   grep: empty (sub)expression
   grep: empty (sub)expression
   grep: empty (sub)expression
   grep: empty (sub)expression

Signed-off-by: Roman Bolshakov <r.bolsha...@yadro.com>
---
  modules/maintainer-makefile |   1 +
  top/maint.mk                | 114 ++++++++++++++++++------------------
  2 files changed, 58 insertions(+), 57 deletions(-)

Obviously has to be rebased on top of v3 of 1/2, but otherwise looks fine to me.

                                                                        \
     : Filter by file name;                                             \
     if test -n "$$in_files"; then                                    \
-     files=$$(find $(srcdir) | grep -E "$$in_files"                  \
-              | grep -Ev '$(_sc_excl)');                               \
+     files=$$(find $(srcdir) | $(GREP) -E "$$in_files"                       \
+              | $(GREP) -Ev '$(_sc_excl)');                            \
     else                                                                       
\

My email is showing ragged \, but that may be a result of TAB indentation combined with prefix characters from both the patch format and my email reply quoting mechanism. Hopefully, with the patch applied, you are still trying to keep \ aligned rather than letting them go ragged (that is, a blind search-and-replace breaks formatting, so I hope you touched things up manually afterwards).

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to