Skip to content

Commit

Permalink
Replace egrep with grep -E (#2618)
Browse files Browse the repository at this point in the history
Quoting the [release notes of gnu
`grep-3.8`](https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html)

>   The egrep and fgrep commands, which have been deprecated since
  release 2.5.3 (2007), now warn that they are obsolescent and should
  be replaced by grep -E and grep -F.

In order to fix the warning, I've replaced all instances of `egrep` with
`grep -E`
  • Loading branch information
janmasrovira authored Feb 5, 2024
1 parent 262966d commit 3005772
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runtime/Makefile.generic
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,22 @@ ALLOBJECTS := $(strip $(COBJECTS) $(ALLCPPOBJECTS))

# object files which contain the "main" function
ifneq ($(strip $(CSOURCES)),)
CMAINOBJECTS := $(patsubst %.c,$(BUILDDIR)%.o,$(shell egrep -l '\bint[[:space:]]+main\b' $(CSOURCES)))
CMAINOBJECTS := $(patsubst %.c,$(BUILDDIR)%.o,$(shell grep -E -l '\bint[[:space:]]+main\b' $(CSOURCES)))
else
CMAINOBJECTS :=
endif
ifneq ($(strip $(CPPSOURCES)),)
CPPMAINOBJECTS := $(patsubst %.cpp,$(BUILDDIR)%.o,$(shell egrep -l '\bint[[:space:]]+main\b' $(CPPSOURCES)))
CPPMAINOBJECTS := $(patsubst %.cpp,$(BUILDDIR)%.o,$(shell grep -E -l '\bint[[:space:]]+main\b' $(CPPSOURCES)))
else
CPPMAINOBJECTS :=
endif
ifneq ($(strip $(CXXSOURCES)),)
CXXMAINOBJECTS := $(patsubst %.cxx,$(BUILDDIR)%.o,$(shell egrep -l 'int[[:space:]]+main\b' $(CXXSOURCES)))
CXXMAINOBJECTS := $(patsubst %.cxx,$(BUILDDIR)%.o,$(shell grep -E -l 'int[[:space:]]+main\b' $(CXXSOURCES)))
else
CXXMAINOBJECTS :=
endif
ifneq ($(strip $(CCSOURCES)),)
CCMAINOBJECTS := $(patsubst %.cxx,$(BUILDDIR)%.o,$(shell egrep -l 'int[[:space:]]+main\b' $(CCSOURCES)))
CCMAINOBJECTS := $(patsubst %.cxx,$(BUILDDIR)%.o,$(shell grep -E -l 'int[[:space:]]+main\b' $(CCSOURCES)))
else
CCMAINOBJECTS :=
endif
Expand Down

0 comments on commit 3005772

Please sign in to comment.