aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Mikhirev2014-11-15 11:29:18 +0300
committerDmitry Mikhirev2014-11-15 11:29:18 +0300
commit3d42e48cd375109871d1867fdfce1ce6855da17d (patch)
tree8703b7cc4bbcd0cc0efb2b42406bb0f8869af8af
parentc5ad9e4d575a7d46d36533df5109aad1eb4ba6d1 (diff)
downloadmake_pcre-3d42e48cd375109871d1867fdfce1ce6855da17d.tar.gz
make_pcre-3d42e48cd375109871d1867fdfce1ce6855da17d.tar.bz2
make_pcre-3d42e48cd375109871d1867fdfce1ce6855da17d.tar.xz
make_pcre-3d42e48cd375109871d1867fdfce1ce6855da17d.zip
use E flag for pattern expansion
It is better to reserve e flag for compatibility with Perl s///e.
-rw-r--r--GNUmakefile2
-rw-r--r--README.md10
-rw-r--r--pcre.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/GNUmakefile b/GNUmakefile
index fb71c7f..013ec80 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -16,7 +16,7 @@ check: $(tests)
test001 = '$(m ^test$,test)' = test
test002: var = es
-test002 = '$(m ^t$(var)t$$,test,e)' = test
+test002 = '$(m ^t$(var)t$$,test,E)' = test
test003 = '$(m ^t(es)t$,test)$0$1' = testtestes -a -z '$(m a,b)$0$1'
test%:
diff --git a/README.md b/README.md
index 8c5958b..a8cc309 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-make\_pcre is a plugin for GNU make providing ability to use perl compatible
+make\_pcre is a plugin for GNU make providing ability to use Perl compatible
regular expressions. It requires make 4.0 or higher (tested with 4.1)
and libpcre3 (tested with 8.30).
@@ -27,7 +27,7 @@ to run self-tests.
Install
-------
-Copy pcre.so into the directory where your makefile is stored.
+Copy `pcre.so` into the directory where your makefile is stored.
Usage
=====
@@ -64,12 +64,12 @@ Options
`pcre_find` can take optional third argument consisting of one ore more
characters, each of which enables some option:
- $(pcre_find PATTERN,IN,emsuUxX8)
- $(m PATTERN,IN,emsuUxX8)
+ $(pcre_find PATTERN,IN,EmsuUxX8)
+ $(m PATTERN,IN,EmsuUxX8)
The following options are implemented:
-- `e` enables expansion of pattern before compilation. Note that you will need
+- `E` enables expansion of pattern before compilation. Note that you will need
to use `$$` instead `$` for matching end of line in this case;
- `m` makes regexp treating string as multi-line, i. e. `^` and `$` will match
immediately after or immediately before internal newlines. The same
diff --git a/pcre.c b/pcre.c
index ec922b2..9b5ab51 100644
--- a/pcre.c
+++ b/pcre.c
@@ -45,7 +45,7 @@ char *match(const char *name, int argc, char **argv)
if (argc > 2) {
for (p = argv[2]; *p != '\0'; p++) {
switch (*p) {
- case 'e':
+ case 'E':
pat = gmk_expand(argv[0]);
break;
case 'm':