Page MenuHomeFreeBSD

Uses/ Use EGREP instead of GREP when parsing config.h

Authored by rakuco on Nov 28 2016, 4:27 PM.



Using ${GREP} was failing when grep was built with the WITHOUT_GNU_GREP_COMPAT knob in src.conf. According to POSIX, | only works for alternation in extended regular expressions (grep -E), although GNU grep disregards the difference.

The new syntax with ${EGREP} and no escaping of special characters works with both BSD grep (without WITHOUT_GNU_GREP_COMPAT as well as GNU grep). I haven't tested BSD grep without WITHOUT_GNU_GREP_COMPAT, but if it does behave like GNU grep it should also work.

Test Plan

make stage on the PHP ports no longer fails with exit code 1 when grep is called.

Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rakuco retitled this revision from to Uses/ Use EGREP instead of GREP when parsing config.h.
rakuco updated this object.
rakuco edited the test plan for this revision. (Show Details)
rakuco added reviewers: mat, tz.
rakuco set the repository for this revision to rP FreeBSD ports repository.
mat edited edge metadata.
This revision is now accepted and ready to land.Nov 28 2016, 4:31 PM
This revision was automatically updated to reflect the committed changes.