perl ENV value avoid escape
- by Michael
In my makefile I have command in variable like this
substitute := perl -p -e 's/@([^@]+)@/"$(update_url)"/ge' > output.txt
update_url := em:updateURL=\"http:\/\/bla\/update.rdf\"\n
this works fine when I run command in target and I have newline, quotes
however I need to replace $(update_url)" with environment variable, using expression like this
#substitute := perl -p -e 's/@([^@]+)@/defined $$ENV{$$1} ? $$ENV{$$1} : $$1/ge'
I am exporting those variables from makefile. This gives me literally em:updateURL=\"http:\/\/bla\/update.rdf\"\n on output file...
so how to make the second version to give output like first version?