GNOME Bugzilla – Bug 573099
Fail to generate podindex due to quoting problem
Last modified: 2009-03-19 17:30:52 UTC
I am guessing this is only a problem on Windows: Generating POD... c:\Perl\bin\perl.exe -I blib\lib -I blib\arch -MGlib::GenPod -MGlib \ -e "add_types (qq(doctypes)); Glib::GenPod::set_copyright(qqCopyright); Glib::GenPod::set_copyright(qq(C)); Glib::GenPod::set_copyright(qq2003-2008); Glib::GenPod::set_copyright(qqby); Glib::GenPod::set_copyright(qqthe); Glib::GenPod::set_copyright(qqgtk2-perl); Glib::GenPod::set_copyright(qqteam.\n\nThis); Glib::GenPod::set_copyright(qqsoftware); Glib::GenPod::set_copyright(qqis); Glib::GenPod::set_copyright(qqlicensed); Glib::GenPod::set_copyright(qqunder); Glib::GenPod::set_copyright(qqthe); Glib::GenPod::set_copyright(qqLGPL.); Glib::GenPod::set_copyright(qqSee); Glib::GenPod::set_copyright(qqL<Glib>); Glib::GenPod::set_copyright(qqfor); Glib::GenPod::set_copyright(qqa); Glib::GenPod::set_copyright(qqfull); Glib::GenPod::set_copyright(qqnotice.\n); Glib::GenPod::set_main_mod(qq(Glib)); xsdoc2pod(q(build/doc.pl), q(blib\lib), q(build/podindex));" Backslash found where operator expected at -e line 1, near "n\" syntax error at -e line 1, near "n\" syntax error at -e line 1, near ".)" syntax error at -e line 1, near "Glib>" Execution of -e aborted due to compilation errors. dmake.exe: c:\MinGW\bin\startup\config.mk: line 5: Warning: -- Macro `OS' redefined after use dmake.exe: c:\MinGW\bin\startup\startup.mk: line 140: Warning: -- More than one prerequisite for %-target. Use :| ruleop or indirect prerequisites. dmake.exe: c:\MinGW\bin\startup\startup.mk: line 144: Warning: -- More than one prerequisite for %-target. Use :| ruleop or indirect prerequisites. dmake.exe: makefile: line 428: Warning: -- The .SUFFIXES target has no special meaning and is deprecated. dmake.exe: Warning: -- Found file corresponding to virtual target [blib\lib\Glib\GenPod.pm]. dmake.exe: Warning: -- Found file corresponding to virtual target [build\podindex]. dmake.exe: Warning: -- Found file corresponding to virtual target [blib\lib\Glib\ParseXSDoc.pm]. dmake.exe: Warning: -- Found file corresponding to virtual target [build\doc.pl]. dmake.exe: Error code 137, while making 'build\podindex'
Created attachment 129483 [details] [review] Glib-quoting-fix.patch
Something went terribly wrong there. How did this one call to Glib::GenPod::set_copyright turn into dozens of calls? Does dmake interpret the q{} syntax in some special way? Or does the generated Makefile contain all these calls already?
The Makefile is fine - seems like dmake interprets {} specially (see below). The command dmake calls is: -----<dmake verbose output>----- dmake: >>>> Making [build\podindex::{2}] dmake: Updating [build\podindex], (1236594519 > 0) C:\Perl\bin\perl.exe -l -e "print qq{@ARGV}" -- Generating POD... Generating POD... C:\Perl\bin\perl.exe -I blib\lib -I blib\arch -MGlib::GenPod -MGlib \ -e "add_types (qq(doctypes)); Glib::GenPod::set_copyright(qqCopyright); Glib::GenPod::set_copyright(qq(C)); Glib::GenPod::set_copyright(qq2003-2008); Glib::GenPod::set_copyright(qqby); Glib::GenPod::set_copyright(qqthe); Glib::GenPod::set_copyright(qqgtk2-perl); Glib::GenPod::set_copyright(qqteam.\n\nThis); Glib::GenPod::set_copyright(qqsoftware); Glib::GenPod::set_copyright(qqis); Glib::GenPod::set_copyright(qqlicensed); Glib::GenPod::set_copyright(qqunder); Glib::GenPod::set_copyright(qqthe); Glib::GenPod::set_copyright(qqLGPL.); Glib::GenPod::set_copyright(qqSee); Glib::GenPod::set_copyright(qqL<Glib>); Glib::GenPod::set_copyright(qqfor); Glib::GenPod::set_copyright(qqa); Glib::GenPod::set_copyright(qqfull); Glib::GenPod::set_copyright(qqnotice.\n); Glib::GenPod::set_main_mod(qq(Glib)); xsdoc2pod(q(build/doc.pl), q(blib\lib), q(build/podindex));" Backslash found where operator expected at -e line 1, near "n\" syntax error at -e line 1, near "n\" syntax error at -e line 1, near ".)" syntax error at -e line 1, near "Glib>" Execution of -e aborted due to compilation errors. dmake: Error code 137, while making 'build\podindex' -----<dmake verbose output>----- -----<dmake man page snippit>----- The final non-standard macro expansion is of the form: string1{token_list}string2 where string1, string2 and token_list are expanded. After expansion, string1 is prepended to each token found in token_list and string2 is appended to each resulting token from the previous prepend. string1 and string2 are not delimited by white space whereas the tokens in token_list are. A null token in the token list is specified using "". Thus using another example we have: test/{f1 f2}.o --> test/f1.o test/f2.o test/ {f1 f2}.o --> test/ f1.o f2.o test/{f1 f2} .o --> test/f1 test/f2 .o test/{"f1" ""}.o --> test/f1.o test/.o and test/{d1 d2}/{f1 f2}.o --> test/d1/f1.o test/d1/f2.o test/d2/f1.o test/d2/f2.o This last expansion is activated only when the first characters of token_list appear immediately after the opening '{' with no intervening white space. The reason for this restriction is the following incom- patibility with Bourne Shell recipes. The line { echo hello;} is valid /bin/sh syntax; while {echo hello;} is not. Hence the latter triggers the enhanced macro expansion while the former causes it to be suppressed. See the SPECIAL MACROS section for a description of the special macros that dmake defines and under- stands. -----<dmake man page snippit>-----
Aha, OK. Patch committed. Thanks!