From 2bd970c780ace4bf5ba0ce8f1ae572d08bdc8c19 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 29 Oct 2004 22:42:54 +0000 Subject: [PATCH] * make/lilypond-vars.make: add scripts/out/ to PATH, to find ps2png. * scm/lily.scm (ly:system): new function. Catches uninstalled ps2png. --- ChangeLog | 7 ++++++ input/regression/beam-postfix-notation.ly | 18 --------------- make/lilypond-vars.make | 2 +- scm/lily.scm | 27 ++++++++++++++--------- 4 files changed, 25 insertions(+), 29 deletions(-) delete mode 100644 input/regression/beam-postfix-notation.ly diff --git a/ChangeLog b/ChangeLog index d49aebd3ec..ba8de2235e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-10-30 Han-Wen Nienhuys + + * make/lilypond-vars.make: add scripts/out/ to PATH, to find ps2png. + + * scm/lily.scm (ly:system): new function. Catches uninstalled + ps2png. + 2004-10-29 Han-Wen Nienhuys * Documentation/user/notation.itely: remove diff --git a/input/regression/beam-postfix-notation.ly b/input/regression/beam-postfix-notation.ly deleted file mode 100644 index cfa8383c69..0000000000 --- a/input/regression/beam-postfix-notation.ly +++ /dev/null @@ -1,18 +0,0 @@ - -\version "2.3.22" -\header { - -texidoc = "Beams and ties may be entered in postfix notation, separating the - notes and the brackets with a dash." - -} - \layout { raggedright= ##t } - - -\score -{ - \relative c'' - { - c8[~ c] - } -} diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index b5ae24f1da..28a312bbd2 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -2,7 +2,7 @@ ## settings to run LilyPond -export PATH:=$(builddir)/lily/$(outconfbase):$(builddir)/buildscripts/$(outconfbase):$(PATH) +export PATH:=$(builddir)/lily/$(outconfbase):$(builddir)/buildscripts/$(outconfbase):$(builddir)/scripts/$(outconfbase):$(PATH): # LilyPond is often run from within $(outdir), making a relative # PREFIX incorrect. diff --git a/scm/lily.scm b/scm/lily.scm index 174ae3b0b8..01de0a300a 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -562,6 +562,21 @@ possibly turned off." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define-public (ly:system command) + (let* + ((status 0)) + + (if (ly:get-option 'verbose) + (display (format (_ "Invoking `~a'...\n") command) (current-error-port))) + + (set! status (system command)) + + + (if (> status 0) + (display (format (_ "Error invoking `~a'. Return value ~a") + command status))) + )) + (define-public (postscript->pdf papersizename name) (let* ((cmd (string-append "ps2pdf -sPAPERSIZE=" papersizename " " name)) (output-name @@ -570,12 +585,8 @@ possibly turned off." (newline (current-error-port)) (display (format (_ "Converting to `~a'...") output-name) (current-error-port)) - (newline (current-error-port)) - - (if (ly:get-option 'verbose) - (display (format (_"Invoking `~a'...") cmd) (current-error-port))) - (system cmd))) + (ly:system cmd))) (define-public (postscript->png resolution name) (let @@ -588,11 +599,7 @@ possibly turned off." "--verbose " " ") name))) - (if (ly:get-option 'verbose) - (begin - (display (format (_ "Invoking `~a'...") cmd) (current-error-port)) - (newline (current-error-port)))) - (system cmd))) + (ly:system cmd))) (define-public (lilypond-main files) "Entry point for LilyPond." -- 2.39.2