Page MenuHomeFreeBSD

Uses/php.mk: Use EGREP instead of GREP when parsing config.h
ClosedPublic

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

Details

Summary

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

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

Event Timeline

rakuco updated this revision to Diff 22577.Nov 28 2016, 4:27 PM
rakuco retitled this revision from to Uses/php.mk: 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 accepted this revision.Nov 28 2016, 4:31 PM
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.