[openwrt/openwrt] Makefile: fix stray \ warnings with grep-3.8

LEDE Commits lede-commits at lists.infradead.org
Tue Sep 27 07:45:11 PDT 2022


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a29d3bc48c40c6a2a93ae1806bea2ac26455cdbb

commit a29d3bc48c40c6a2a93ae1806bea2ac26455cdbb
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Sun Sep 11 08:15:52 2022 +0200

    Makefile: fix stray \ warnings with grep-3.8
    
    We simply grep for "/usr". So no need for "-E" or "\/". Furthermore, in
    the new grep versions this creates warnings.
    
    As written in the grep-3.8 announcement:
      Regular expressions with stray backslashes now cause warnings, as
      their unspecified behavior can lead to unexpected results.
      For example, '\a' and 'a' are not always equivalent
      <https://bugs.gnu.org/39678>.
    
    Fixes warnings in the form of:
      grep: warning: stray \ before /
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index bfb52c5ddd..cbf9fa2cd1 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
 
 world:
 
-DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -E '\/usr' -m 1)
+DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(OPENWRT_BUILD),1)




More information about the lede-commits mailing list