Spaces in filenames breaks Makefiles - suggested fix

"Ed ." <[email protected]> Mon, 3 Dec 2012 20:22:01 +0000
Newsgroups gmane.comp.lang.perl.modules.extutils-makemaker.devel
Message-ID <[email protected]>
Dear Makemaker makers,

I installed ActivePerl under C:\Program Files, but told it it was in C:\progra~1. The Makefiles generated by Perl 5.16.1’s MakeMaker set XSUBPPDIR to the directory with spaces. This broke builds in two ways:

1. XSUBPPDEPS has a dependency on XSUBPP, which wrongly gets expanded into two components, which make obviously cannot build. I do not understand in any case why it should depend on XSUBPP.

2. When I remove the above, perl fails to run XSUBPP because the path is not quoted. This looks to me like a straightforward bug – surely it should always be quoted.

My fixes for these are to change this portion of ExtUtils::MM_Unix -

XSUBPPRUN = \$(PERLRUN) \$(XSUBPP)
XSPROTOARG = $self->{XSPROTOARG}
XSUBPPDEPS = @tmdeps \$(XSUBPP)

to this -

XSUBPPRUN = \$(PERLRUN) "\$(XSUBPP)"
XSPROTOARG = $self->{XSPROTOARG}
XSUBPPDEPS = @tmdeps # \$(XSUBPP)

Now I have got a lot further in building gimp-perl (which is a story for another day). I would be very interested to hear your thoughts on this proposed change.

Best regards,
Ed