>From 46b16264b7289d1a569b883f81736b84e10e1d8d Mon Sep 17 00:00:00 2001 From: Evan Hanson Date: Sun, 9 Sep 2018 16:56:17 +1200 Subject: [PATCH 2/3] Fix double-quotation of custom shell commands --- egg-compile.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/egg-compile.scm b/egg-compile.scm index 4c098a32..f3b417cf 100644 --- a/egg-compile.scm +++ b/egg-compile.scm @@ -506,7 +506,7 @@ " -C -I" srcdir (arglist opts platform) " " src " -o " out " : " src " " (qs* eggfile platform) " " - (if custom (qs* cmd platform) "") " " + (if custom cmd "") " " (filelist srcdir source-dependencies platform)) (print-end-command platform))) @@ -545,7 +545,7 @@ " -setup-mode -I " srcdir " -C -I" srcdir (arglist opts platform) (arglist link-options platform) " " src " -o " out " : " src " " (qs* eggfile platform) " " - (if custom (qs* cmd platform) "") " " + (if custom cmd "") " " (filelist srcdir source-dependencies platform)) (print-end-command platform))) @@ -596,7 +596,7 @@ " -I " srcdir " -C -I" srcdir (arglist opts platform) (arglist link-options platform) " " src " -o " out " : " src " " (qs* eggfile platform) " " - (if custom (qs* cmd platform) "") " " + (if custom cmd "") " " (filelist srcdir source-dependencies platform)) (print-end-command platform))) @@ -626,19 +626,18 @@ srcdir (arglist opts platform) (arglist link-options platform) " " src " -o " out " : " src " " (qs* eggfile platform) " " - (if custom (qs* cmd platform) "") " " + (if custom cmd "") " " (filelist srcdir source-dependencies platform)) (print-end-command platform))) (define ((compile-generated-file name #!key source custom source-dependencies eggfile) srcdir platform) - (let* ((cmd (custom-cmd custom srcdir platform)) + (let* ((cmd (qs* (custom-cmd custom srcdir platform) platform)) (out (qs* (or source name) platform))) (prepare-custom-command cmd platform) (print "\n" (qs* default-builder platform #t) - " " out " " cmd " : " - (qs* cmd platform) " " + " " out " " cmd " : " cmd " " (qs* eggfile platform) " " (filelist srcdir source-dependencies platform)) (print-end-command platform))) @@ -958,7 +957,8 @@ EOF (case platform ((unix) (string-append "${" var "}")) ((windows) (string-append "%" var "%")))) - + +;; NOTE `cmd' must already be quoted for shell (define (prepare-custom-command cmd platform) (unless (eq? 'windows platform) (print "chmod +x " cmd))) -- 2.11.0