]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / scm / lily.scm
index c0e6fd911fa424cfa9bd0d90450d4286c3586573..5daa01c53d6225a81b44ccc5a09c16e4f410fd98 100644 (file)
@@ -528,25 +528,32 @@ The syntax is the same as `define*-public'."
              (for-each
               (lambda (pid)
                 (let* ((stat (cdr (waitpid pid))))
-
+                  
                   (if (not (= stat 0))
-                      (set! errors (cons (list-element-index joblist pid) errors)))))
+                      (set! errors (acons (list-element-index joblist pid) stat errors)))))
               joblist)
 
              (for-each
               (lambda (x)
-                (let* ((logfile  (format "~a-~a.log"
-                                         (ly:get-option 'log-file) x))
+                (let* ((job (car x))
+                       (state (cdr x))
+                       (logfile  (format "~a-~a.log"
+                                         (ly:get-option 'log-file) job))
                        (log (ly:gulp-file logfile))
                        (len (string-length log))
                        (tail (substring  log (max 0 (- len 1024)))))
 
-                  (display (format "\n\nlogfile ~a:\n\n ~a" logfile tail))))
+                  (if (status:term-sig state)
+                      (ly:message "\n\n~a\n"
+                                  (format (_ "job ~a terminated with signal: ~a")
+                                          job
+                                          (status:term-sig state)))
+                      (ly:message (_ "logfile ~a (exit ~a):\n~a") logfile (status:exit-val state) tail))))
 
               errors)
 
              (if (pair? errors)
-                 (ly:error "Children ~a exited with errors." errors))
+                 (ly:error "Children ~a exited with errors." (map car errors)))
 
              ;; must overwrite individual entries
              (if (ly:get-option 'dump-profile)
@@ -583,13 +590,12 @@ The syntax is the same as `define*-public'."
         (handler (lambda (key failed-file)
                    (set! failed (append (list failed-file) failed)))))
 
+    (gc)
     (for-each
      (lambda (x)
        (let*
           ((start-measurements (if do-measurements
-                                   (begin
-                                     (gc)
-                                     (profile-measurements))
+                                   (profile-measurements)
                                    #f))
            (base (basename x ".ly"))
            (all-settings (ly:all-options)))
@@ -607,6 +613,11 @@ The syntax is the same as `define*-public'."
          all-settings)
         
         (ly:clear-anonymous-modules)
+        (ly:set-option 'debug-gc-assert-parsed-dead #t)
+        (gc)
+        (ly:set-option 'debug-gc-assert-parsed-dead #f)
+        
+        
         (if (ly:get-option 'debug-gc)
             (dump-gc-protects)
             (if (= (random 40) 1)