]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Merge easy parts of Keyboard.
[lilypond.git] / scm / lily.scm
index 6f2f09d2e6f5ed67475f926c4a8b71c0b9fe0ddf..b8f9a672b7169a249d0d1e5995bcc8146f4a12bf 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 1998--2007 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 ;; Internationalisation: (_i "to be translated") gets an entry in the
@@ -74,6 +74,7 @@ on errors, and print a stack trace.")
 
     (safe #f "Run safely")
     (strict-infinity-checking #f "If yes, crash on encountering Inf/NaN.")
+    (strip-output-dir #t "If yes, strip directories from input files.")
     (separate-log-files #f "Output to FILE.log per file.")
     (trace-memory-frequency #f "Record Scheme cell usage this many times per second, and dump to file.")
     (trace-scheme-coverage #f "Record coverage of Scheme files") 
@@ -140,7 +141,7 @@ on errors, and print a stack trace.")
 ;;; have a more sensible default.
 
 (if (or (ly:get-option 'verbose)
-       (ly:get-option 'trace-memory-frequencency)
+       (ly:get-option 'trace-memory-frequency)
        (ly:get-option 'trace-scheme-coverage)
        )
     (begin
@@ -158,14 +159,6 @@ on errors, and print a stack trace.")
 
 (define-public parser #f)
 
-(define-public (lilypond-version)
-  (string-join
-   (map (lambda (x) (if (symbol? x)
-                       (symbol->string x)
-                       (number->string x)))
-       (ly:version))
-   "."))
-
 
 ;; TeX C++ code actually hooks into TEX_STRING_HASHLIMIT 
 (define-public TEX_STRING_HASHLIMIT 10000000)
@@ -292,6 +285,14 @@ The syntax is the same as `define*-public'."
                                 safe-objects))
        ,safe-symbol)))
 
+(define-safe-public (lilypond-version)
+  (string-join
+   (map (lambda (x) (if (symbol? x)
+                       (symbol->string x)
+                       (number->string x)))
+       (ly:version))
+   "."))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; init pitch system
 
@@ -410,13 +411,13 @@ The syntax is the same as `define*-public'."
 
 (define (dump-profile base last this)
   (let*
-      ((outname (format "~a.profile" (basename base ".ly")))
+      ((outname (format "~a.profile" (dir-basename base ".ly")))
        (diff (map (lambda (y) (apply - y)) (zip this last))))
     
     (ly:progress "\nWriting timing to ~a..." outname)
     (format (open-file outname "w")
            "time: ~a\ncells: ~a\n"
-           (if (ly:option 'dump-cpu-profile)
+           (if (ly:get-option 'dump-cpu-profile)
                (car diff)
                0)
            (cadr diff)
@@ -559,7 +560,6 @@ The syntax is the same as `define*-public'."
 (define-public (lilypond-main files)
   "Entry point for LilyPond."
 
-
   (eval-string (ly:command-line-code))
 
   (if (ly:get-option 'help)
@@ -682,7 +682,7 @@ The syntax is the same as `define*-public'."
           ((start-measurements (if do-measurements
                                    (profile-measurements)
                                    #f))
-           (base (basename x ".ly"))
+           (base (dir-basename x ".ly"))
            (all-settings (ly:all-options)))
 
         (if separate-logs
@@ -741,7 +741,7 @@ The syntax is the same as `define*-public'."
       (gui-no-files-handler))
 
   (if (not (string? (ly:get-option 'log-file)))
-      (let* ((base (basename (car files) ".ly"))
+      (let* ((base (dir-basename (car files) ".ly"))
             (log-name (string-append base ".log")))
        (if (not (ly:get-option 'gui))
            (ly:message (_ "Redirecting output to ~a...") log-name))