Why does this regular expression for sed break inside Makefile?
- by jcrocholl
I'm using GNU Make 3.81, and I have the following rule in my Makefile:
jslint :
java org.mozilla.javascript.tools.shell.Main jslint.js mango.js \
| sed 's/Lint at line \([0-9]\+\) character \([0-9]\+\)/mango.js:\1:\2/'
This works fine if I enter it directly on the command line, but the regular expression does not match if I run it with "make jslint". However, it works if I replace \+ with \{1,\} in the Makefile:
jslint :
java org.mozilla.javascript.tools.shell.Main jslint.js mango.js \
| sed 's/Lint at line \([0-9]\{1,\}\) character \([0-9]\{1,\}\)/mango.js:\1:\2/'
Is there some special meaning to \+ in Makefiles, or is this a bug?