[PATCH] perl/Makefile: handle paths with spaces by adding additional quoting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Brandon Casey <casey@xxxxxxxxxxxxxxx>
---


Junio C Hamano wrote:
> Brandon Casey <casey@xxxxxxxxxxxxxxx> writes:
> 
>> There are problems here with spaces, single quotes, and double quotes.
>> I'll follow up in another email.
> 
> I guess we've opened up a large can of worms.  Let's have the minimum fix
> that says "We do support whitespace in these paths but no other funnies"
> and leave the more intrusive one for post 1.6.0, for now.

That is this patch.

BUT. It produces some strangeties in the perl.mak file.

PREFIX looks great:

    PREFIX = '/home/casey/opt/test spaces/'

but then down in the $(MAKE_APERL_FILE) section we get something like:

    PREFIX=''/home/casey/opt/test spaces/''

because MakeMaker was already single quoting it.

Everything compiles and installs correctly for me.

In addition to putting a space in the prefix path, I also tried semicolon,
colon, and backslash. semicolon didn't work, but it didn't work before either.
colon and backslash worked. A backslash in the prefix path produced some
complaints when compiling some of the source files caused by the macros that
I mentioned earlier that are used by some of the files. The warning was
'unknown escape sequence ...'. The backslash was interpreted as an escape
sequence and then just dropped, so the path compiled into the object files
was wrong. I guess this doesn't happen on windows?

Summary: with this patch spaces in the prefix path work. It didn't break
         anything that I tested.

Maybe there's a MakeMaker expert in the audience?

-brandon


 perl/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/perl/Makefile b/perl/Makefile
index b8547db..6d2a200 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -38,7 +38,7 @@ $(makfile): ../GIT-CFLAGS Makefile
 	echo '	echo $(instdir_SQ)' >> $@
 else
 $(makfile): Makefile.PL ../GIT-CFLAGS
-	$(PERL_PATH) $< PREFIX='$(prefix_SQ)'
+	$(PERL_PATH) $< PREFIX=\''$(prefix_SQ)'\'
 endif
 
 # this is just added comfort for calling make directly in perl dir
-- 
1.5.6.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux