regex - Using $1 in regexp within a Makefile -
this question has answer here:
- escaping in makefile 2 answers
i try replace following perl command:
perl -c -p -i -e 's/([\?\.\!])\n/$1 /g' html/數14.html
the result fine when call command line. when call within makefile doesn't work. apparently $1 interpreted shell variable.
in makefile looks this:
數14.html: 數14.adoc 40_2064_im\ strand-appartment.adoc 41_2064_ein\ plan.adoc 42_1915_in\ einer\ suppenküche.adoc asciidoctor -d html parts/數14.adoc perl -c -p -i -e 's/([\?\.\!])\n/$1 /g' html/數14.html
how can have normal regexp behaviour here?
makefiles interpret $
sequences before executing commands, disregarding quoting. in order escape $
in makefile, write $$
- result in single $
in command.
Comments
Post a Comment