Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 4752  / 2 Years ago, fri, december 24, 2021, 4:13:51

I'm getting this error msg:



m4:myPerlScript.pl:77: ERROR: end of file in string


when trying to use m4 to replace a string in some perl scripts. I'm making the call inside a makefile.



$(OUTDIR)/%:    %.pl
m4 blah/thing.m4 $< > $@
chmod +x $@


i made sure that thing.m4 exists and is in the right place.


More From » 12.04

 Answers
3

It turned out that m4 was erring because of its sensitivity to quotes. I added changequote() to the replacing .m4 file.



It was also necessary to use the -P switch to avoid matching m4 key words, and add m4_dnl to each line.


[#26592] Saturday, December 25, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
doredtness

Total Points: 153
Total Questions: 113
Total Answers: 106

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
;