]> git.donarmstrong.com Git - lilypond.git/commitdiff
Revert "Redirects lilypond output to reduce make doc noise"
authorGraham Percival <graham@percival-music.ca>
Sat, 25 Jun 2011 23:29:53 +0000 (00:29 +0100)
committerGraham Percival <graham@percival-music.ca>
Sat, 25 Jun 2011 23:29:53 +0000 (00:29 +0100)
This reverts commit 3623cfc12bb53499a591ae45ac61931bafc6bf20.

The patch as it currently stands appears to lose build
information -- at the very least, even if that information
is present somewhere, it is too confusing to find important
information about a failing build.  More work is needed before
we add such functionality.

make/ly-rules.make
python/lilylib.py
scripts/lilypond-book.py

index a876b04f1864ea548e03997b35aecccbed5bbcbd..0df0643ee3158ec5ad2c0a685d752942ea30d18e 100644 (file)
@@ -22,11 +22,11 @@ $(eval $(firstword $(TEXI_FILES_FROM_TELY)):\
 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
 # it is not, for --srcdir builds
 $(outdir)/%.texi: %.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES)
-       LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) --redirect-lilypond-output $<
+       LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $<
 
 
 $(outdir)/%.texi: $(outdir)/%.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES)
-       LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) --redirect-lilypond-output $<
+       LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $<
 
 
 $(outdir)/%.html.omf: %.tely
index 1bf5323cae45a6b4cddb8f26f5eed1b9ac06109d..dac53c16cf4dd5d83c2111e4ba49e28701f410b0 100644 (file)
@@ -23,7 +23,6 @@ import re
 import shutil
 import sys
 import optparse
-import time
 
 ################################################################
 # Users of python modules should include this snippet
@@ -119,7 +118,6 @@ def subprocess_system (cmd,
                        ignore_error=False,
                        progress_p=True,
                        be_verbose=False,
-                       redirect_output=False,
                        log_file=None):
     import subprocess
 
@@ -127,25 +125,16 @@ def subprocess_system (cmd,
     name = command_name (cmd)
     error_log_file = ''
 
-    if redirect_output:
-        progress (_ ("Processing %s.ly") % log_file)
+    if be_verbose:
+       show_progress = 1
+       progress (_ ("Invoking `%s\'") % cmd)
     else:
-        if be_verbose:
-            show_progress = 1
-            progress (_ ("Invoking `%s\'") % cmd)
-        else:
-            progress ( _("Running %s...") % name)
+       progress ( _("Running %s...") % name)
+
 
     stdout_setting = None
-    stderr_setting = None
     if not show_progress:
-        stdout_setting = subprocess.PIPE
-
-    if redirect_output:
-        stdout_filename = ''.join([log_file, '.log'])
-        stderr_filename = ''.join([log_file, '.err.log'])
-        stdout_setting = open(stdout_filename, 'w')
-        stderr_setting = open(stderr_filename, 'w')
+       stdout_setting = subprocess.PIPE
 
     proc = subprocess.Popen (cmd,
                              shell=True,
@@ -155,18 +144,11 @@ def subprocess_system (cmd,
 
     log = ''
 
-    if redirect_output:
-        while proc.poll()==None:
-            time.sleep(1)
-        retval = proc.returncode
-        stdout_setting.close()
-        stderr_setting.close()
+    if show_progress:
+       retval = proc.wait()
     else:
-        if show_progress:
-            retval = proc.wait()
-        else:
-            log = proc.communicate ()
-            retval = proc.returncode
+       log = proc.communicate ()
+       retval = proc.returncode
 
 
     if retval:
index a0501cae9e5c8f0eb9e0584a15456372b64046ac..9617f3666d3a4c878325a089b3d898def9771a8d 100644 (file)
@@ -179,11 +179,6 @@ def get_option_parser ():
                   action='store',
                   dest='process_cmd', default='')
 
-    p.add_option ('--redirect-lilypond-output',
-                  help = _ ("Redirect the lilypond output"),
-                  action='store_true',
-                  dest='redirect_output', default=False)
-
     p.add_option ('-s', '--safe', help=_ ("Compile snippets in safe mode"),
                   action="store_true",
                   default=False,
@@ -352,7 +347,7 @@ def find_toplevel_snippets (input_string, formatter):
 
     return snippets
 
-def system_in_directory (cmd, directory, logfile):
+def system_in_directory (cmd, directory):
     """Execute a command in a different directory.
 
     Because of win32 compatibility, we can't simply use subprocess.
@@ -360,10 +355,7 @@ def system_in_directory (cmd, directory, logfile):
 
     current = os.getcwd()
     os.chdir (directory)
-    ly.system(cmd,
-              be_verbose=global_options.verbose,
-              redirect_output=global_options.redirect_output,
-              log_file=logfile,
+    ly.system(cmd, be_verbose=global_options.verbose,
               progress_p=1)
     os.chdir (current)
 
@@ -382,12 +374,10 @@ def process_snippets (cmd, snippets,
                           + list (set ([snip.basename() + '.ly' for snip in snippets])))
     name = os.path.join (lily_output_dir,
                          'snippet-names-%d.ly' % checksum)
-    logfile = name.replace('.ly', '')
     file (name, 'wb').write (contents)
 
     system_in_directory (' '.join ([cmd, ly.mkarg (name)]),
-                         lily_output_dir,
-                         logfile)
+                         lily_output_dir)
 
 
 def snippet_list_checksum (snippets):