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)
Feb 3 2024, 2:47 PM
Unknown Object (File)
Dec 22 2023, 10:19 PM
Unknown Object (File)
Nov 22 2023, 4:02 PM
Unknown Object (File)
Oct 17 2023, 6:21 PM
Unknown Object (File)
Oct 17 2023, 6:21 PM
Unknown Object (File)
Oct 17 2023, 5:55 PM
Unknown Object (File)
Sep 14 2023, 5:26 AM
Unknown Object (File)
Jan 1 2017, 2:22 AM
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.