]> git.donarmstrong.com Git - lilypond.git/commitdiff
(invokes_lilypond): new function
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 18 May 2005 14:55:37 +0000 (14:55 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 18 May 2005 14:55:37 +0000 (14:55 +0000)
(main): only run fontextract if invokes_lilypond() is true.

ChangeLog
Documentation/topdocs/GNUmakefile
scripts/lilypond-book.py

index b057127fbc4356b46d3462fba36a5ded808d21ea..c1b268350c2d905e867ddf81d410a9de7ea0fb1f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-05-18  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * scripts/lilypond-book.py (invokes_lilypond): new function
+       (main): only run fontextract if invokes_lilypond() is true.
+
        * lily/function-documentation.cc (ly_add_function_documentation):
        duh, use !=
 
index 43c2b26ab1c96f288a7a97c9a9e84edb41161cc4..f9b4aa23e610397b4475b5f323179307c89099d7 100644 (file)
@@ -7,4 +7,8 @@ HTML_FILES=$(addprefix $(outdir)/, $(TEXI_FILES:.texi=.html) $(TELY_FILES:.tely=
 
 include $(depth)/make/stepmake.make 
 
+ifneq ($(out),www)
+LILYPOND='true'
+endif
+
 $(outdir)/NEWS.nexi: NEWS.tely
index e123e8b6b5f71af85e2e641bbe5d329494a6ea72..8038691205240da6aeb8652940e3692518f700ec 100644 (file)
@@ -642,6 +642,9 @@ def split_options (option_string):
                                         option_string)
        return []
 
+def invokes_lilypond ():
+       return re.search ('^[\'\"0-9A-Za-z/]*lilypond', process_cmd)
+
 class Chunk:
        def replacement_text (self):
                return ''
@@ -1221,8 +1224,7 @@ def process_snippets (cmd, ly_snippets, texstr_snippets, png_snippets):
        # UGH
        # the --process=CMD switch is a bad idea
        # it is too generic for lilypond-book.
-       if texstr_names and re.search ('^[0-9A-Za-z/]*lilypond', cmd):
-
+       if texstr_names and invokes_lilypond:
                my_system (string.join ([cmd, '--backend texstr',
                                         'snippet-map.ly'] + texstr_names))
                for l in texstr_names:
@@ -1559,7 +1561,7 @@ def main ():
 
        try:
                chunks = do_file (file)
-               if psfonts_file:
+               if psfonts_file and invokes_lilypond ():
                        fontextract.verbose = verbose_p
                        snippet_chunks = filter (lambda x: is_derived_class (x.__class__,
                                                                              Lilypond_snippet),