|
From: | Julien Bect |
Subject: | grep -P in OF template Makefile: really useful? |
Date: | Sat, 4 Mar 2017 23:18:29 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Hi everyone,The template Makefile for OF packages (https://octave.sourceforge.io/templates/Makefile) contains this line:
PKG_ADD := $(shell grep -sPho '(?<=(//|\#\#) PKG_ADD: ).*' $(CC_SOURCES) $(M_SOURCES))
It turns out that this can cause problems on some platforms where grep -P is not supported [1].
Could anybody familiar enough with regexps tell me if the -P flag is actually useful for this particular regexp?
If it is, could we find a way to rewrite the regexp that would not require PCRE?
@++ Julien[1] See https://sourceforge.net/p/octave/package-releases/298/#c4a6/ab8b for an example
[Prev in Thread] | Current Thread | [Next in Thread] |