]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
typo
[lilypond.git] / scm / lily.scm
index 4afe0fb8beec66b981e74ef61e189eaa96bc0e17..bddf997764e03ca8d930f66875748749d445aa13 100644 (file)
@@ -17,8 +17,6 @@
 (read-enable 'positions)
 (debug-enable 'debug)
 
-
-
 (define scheme-options-definitions
   `(
 
@@ -31,6 +29,7 @@
     (backend ps "which backend to use by default; Options: eps, ps [default], scm, svg, tex, texstr)")
     (check-internal-types #f "check every property assignment for types")
     (clip-systems #f "Generate cut-out snippets of a score")
+    (datadir #f "LilyPond prefix for data files (Readonly).")
     (debug-gc #f "dump memory debugging statistics")
     (debug-gc-assert-parsed-dead #f "for memory debugging:
 ensure that all refs to parsed objects are dead.  This is an internal option, and is switched on automatically for -ddebug-gc.") 
@@ -41,12 +40,15 @@ ensure that all refs to parsed objects are dead.  This is an internal option, an
     (debug-skylines #f "debug skylines")
     (delete-intermediate-files #f
                               "delete unusable PostScript files")
-    (dump-profile #f "dump timing information for each file")
+    (dump-profile #f "dump memory and time information for each file")
+    (dump-cpu-profile #f "dump timing information (system-dependent)")
     (dump-signatures #f "dump output signatures of each system.  Used for regression testing.")
     
     (eps-box-padding #f "Pad EPS bounding box left edge.  Guarantee alignment between systems in LaTeX.")
     (gs-load-fonts #f
                   "load fonts via Ghostscript.")
+    (gs-load-lily-fonts #f
+                       "load only lilypond fonts via Ghostscript.")
     (gui #f "running from gui; redirect stderr to log file")
     (help #f "show this help.") 
     (include-book-title-preview #t "include book-titles in preview images.")
@@ -104,6 +106,7 @@ on errors, and print a stack trace.")
 
 (use-modules (ice-9 regex)
             (ice-9 safe)
+            (ice-9 format)
             (ice-9 rdelim)
              (ice-9 optargs)
             (oop goops)
@@ -114,6 +117,15 @@ on errors, and print a stack trace.")
             (scm memory-trace)
             (scm coverage)
             )
+(define-public fancy-format format)
+(define-public (ergonomic-simple-format dest . rest)
+  "Like ice-9 format, but without the memory consumption."
+  
+  (if (string? dest)
+      (apply simple-format (cons #f (cons dest rest)))
+      (apply simple-format (cons dest rest))))
+
+(define format ergonomic-simple-format)
 
 ;; my display
 (define-public (myd k v) (display k) (display ": ") (display v) (display ", ")
@@ -404,7 +416,9 @@ The syntax is the same as `define*-public'."
     (ly:progress "\nWriting timing to ~a..." outname)
     (format (open-file outname "w")
            "time: ~a\ncells: ~a\n"
-           (car diff)
+           (if (ly:get-option 'dump-cpu-profile)
+               (car diff)
+               0)
            (cadr diff)
            )))
 
@@ -452,9 +466,10 @@ The syntax is the same as `define*-public'."
      outfile)
 
     (format outfile "\nprotected symbols: ~a\n"
-           (length (filter symbol?  (map car protects))))
-    
-            
+           (apply + (map (lambda (obj-count) (if (symbol? (car obj-count))
+                                                 (cdr obj-count)
+                                                 0))
+                            protects)))             
 
     ;; (display (ly:smob-protects))
     (newline outfile)
@@ -649,7 +664,6 @@ The syntax is the same as `define*-public'."
          (ly:error (_ "failed files: ~S") (string-join failed))
          (exit 1))
        (begin
-         (ly:do-atexit)
          ;; HACK: be sure to exit with single newline
          (ly:message "")
          (exit 0)))))