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.
Tags
None
Referenced Files
Unknown Object (File)
Jan 11 2025, 4:19 AM
Unknown Object (File)
Nov 15 2024, 3:29 AM
Unknown Object (File)
Nov 6 2024, 8:22 AM
Unknown Object (File)
Nov 2 2024, 7:46 AM
Unknown Object (File)
Oct 6 2024, 5:50 AM
Unknown Object (File)
Sep 24 2024, 3:09 AM
Unknown Object (File)
Sep 6 2024, 2:39 PM
Unknown Object (File)
Aug 13 2024, 9:47 PM
Subscribers
None

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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 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.