]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/backend-library.scm
Build: Update configure.in with `autoupdate'.
[lilypond.git] / scm / backend-library.scm
index 36492323da3a956b8902b0bef817322178545da2..cc689d848273502ada9073aa84e05880d9a82a77 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2005--2009 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2005--2010 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 ;; backend helpers.
 
 (use-modules (scm ps-to-png)
+            (scm paper-system)
             (ice-9 optargs))
 
 (define-public (ly:system command . rest)
     (if (eq? PLATFORM 'windows)
        (begin
          (set! cmd (string-regexp-substitute "=" "#" cmd))
-         (set! cmd (string-regexp-substitute "-dSAFER " "" cmd))
-         (if (access? pdf-name W_OK)
-             (delete-file pdf-name))))
+         (set! cmd (string-regexp-substitute "-dSAFER " "" cmd))))
 
     (ly:message (_ "Converting to `~a'...") pdf-name)
     (ly:progress "\n")
       scope)))
   (apply string-append (map output-scope scopes)))
 
+(define-public (relevant-book-systems book)
+  (let ((systems (ly:paper-book-systems book)))
+    ;; skip booktitles.
+    (if (and (not (ly:get-option 'include-book-title-preview))
+            (pair? systems)
+            (ly:prob-property (car systems) 'is-book-title #f))
+       (cdr systems)
+       systems)))
+
+(define-public (relevant-dump-systems systems)
+  (let ((to-dump-systems '()))
+    (for-each
+      (lambda (sys)
+       (if (or (paper-system-title? sys)
+               (not (pair? to-dump-systems))
+               (paper-system-title? (car to-dump-systems)))
+           (set! to-dump-systems (cons sys to-dump-systems))))
+      systems)
+    to-dump-systems))
+
 (define missing-stencil-list '())
 
 (define-public (backend-testing output-module)