[PATCH] perl/Makefile: make NO_PERL_MAKEMAKER section more robust
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Aug 6, 2008, 21:48 UTC
- Message-ID
- <h5b_Uh80WY7UfsGF2hRTiw_nv9rIwlIIGAe3N5lxpTRFqNsS9fmpGw@cipher.nrlssc.navy.mil>
- In-Reply-To
- <7v7iaurwe4.fsf@gitster.siamese.dyndns.org>
This adds the double single quote escaping that is performed for GIT_BUILD_OPTIONS to the paths in the install section to protect against paths with spaces, quotes or other funny characters in them.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- perl/Makefile | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/perl/Makefile b/perl/Makefile index b8547db..4c6b2a2 100644 --- a/perl/Makefile +++ b/perl/Makefile @@ -29,13 +29,14 @@ $(makfile): ../GIT-CFLAGS Makefile '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \ echo ' cp private-Error.pm blib/lib/Error.pm' >> $@ echo install: >> $@ - echo ' mkdir -p $(instdir_SQ)' >> $@ - echo ' $(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@ - echo ' $(RM) $(instdir_SQ)/Error.pm' >> $@ + echo " mkdir -p "\''$(subst ','\'',$(instdir_SQ))'\' >> $@ + echo " $(RM) "\''$(subst ','\'',$(instdir_SQ))/Git.pm'\' >> $@ + echo " cp Git.pm "\''$(subst ','\'',$(instdir_SQ))'\' >> $@ + echo " $(RM) "\''$(subst ','\'',$(instdir_SQ))/Error.pm'\' >> $@ '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \ - echo ' cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@ + echo " cp private-Error.pm "\''$(subst ','\'',$(instdir_SQ))/Error.pm'\' >> $@ echo instlibdir: >> $@ - echo ' echo $(instdir_SQ)' >> $@ + echo " echo "\''$(subst ','\'',$(instdir_SQ))'\' >> $@ else $(makfile): Makefile.PL ../GIT-CFLAGS $(PERL_PATH) $< PREFIX='$(prefix_SQ)'
-- 1.6.0.rc1.89.g2e7ef.dirty