]> git.donarmstrong.com Git - lilypond.git/commitdiff
tweaks for -djob-count. Move -dread-file-list processing before -djob-count
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 26 Nov 2006 17:34:04 +0000 (18:34 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 27 Nov 2006 15:36:32 +0000 (16:36 +0100)
(cherry picked from feb5f0d56bb10e36b30c1e6d72c334482c91f119 commit)

scm/lily.scm

index c70ccab03fb2639baea3b5c4f75d614340d582bd..b07bdfeeb96b06badc23057bc4a6ee9fc4e13050 100644 (file)
@@ -428,6 +428,15 @@ The syntax is the same as `define*-public'."
   (if (null? files)
       (no-files-handler))
 
+  (if (ly:get-option 'read-file-list)
+      (set! files
+           (filter (lambda (s)
+                     (> (string-length s) 0))
+                   (apply append
+                          (map (lambda (f) (string-split (ly:gulp-file f) #\nl))
+                               files)))
+           ))
+  
   (if (and (number? (ly:get-option 'job-count))
           (> (length files) (ly:get-option 'job-count)))
       
@@ -447,6 +456,7 @@ The syntax is the same as `define*-public'."
              (set! files (vector-ref split-todo joblist)))
 
            (begin
+             (ly:progress "\nForking into jobs:  ~a\n" joblist)
              (for-each
               (lambda (pid)
                 (let* ((stat (cdr (waitpid pid))))
@@ -461,7 +471,7 @@ The syntax is the same as `define*-public'."
                                          (ly:get-option 'log-file) x))
                        (log (ly:gulp-file logfile))
                        (len (string-length log))
-                       (tail (substring log (- len 1024))))
+                       (tail (substring  log (max 0 (- len 1024)))))
 
                   (display (format "\n\nlogfile ~a:\n\n ~a" logfile tail))))
 
@@ -487,14 +497,7 @@ The syntax is the same as `define*-public'."
          (exit 0)))))
 
 (define-public (lilypond-all files)
-  (if (ly:get-option 'read-file-list)
-      (set! files
-           (filter (lambda (s)
-                     (> (string-length s) 0))
-                   (apply append
-                          (map (lambda (f) (string-split (ly:gulp-file f) #\nl))
-                               files)))
-           ))
+
 
   (if (ly:get-option 'show-available-fonts)
       (begin