]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 9 Jul 2004 17:56:20 +0000 (17:56 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 9 Jul 2004 17:56:20 +0000 (17:56 +0000)
Documentation/SConscript
buildscripts/builder.py

index 57f8db9787c0c44b21a3b44a862a61e248f474e0..b9e26349c66544233147c0a7ef2e0123f08bd6a9 100644 (file)
@@ -8,6 +8,7 @@ reldir = str (Dir ('.').srcnode ())
 os.chdir (reldir)
 ###sources = glob.glob ('*.tely') + glob.glob ('user/*.tely')
 sources = ['user/lilypond.tely', 'user/music-glossary.tely']
+pngs = glob.glob ('user/*.png')
 os.chdir (here)
 
 Import ('env')
@@ -34,10 +35,13 @@ lilybuild = os.path.join (env['absbuild'], 'lily', env['out'])
 userbuild = os.path.join (env['absbuild'], 'Documentation/user', env['out'])
 e.Depends ('user/lilypond.texi', os.path.join (mfbuild, 'feta16list.ly'))
 e.Depends ('user/lilypond.texi', os.path.join (mfbuild, 'parmesan16list.ly'))
-##e.Depends ('lilypond.texi', os.path.join (userbuild, 'music-glossary.texi'))
 e.Depends ('lilypond.texi', 'lilypond-internals.texi')
 e.Depends ('lilypond.texi', os.path.join (lilybuild, 'lilypond-bin'))
 
+png_stems = map (lambda x: os.path.splitext (x)[0], pngs)
+epss = map (e.Png2eps, png_stems)
+e.Depends ('lilypond.texi', epss)
+
 e.Command ('lilypond-internals.texi', LILYPOND_BIN,
           ('(cd $$(dirname $TARGET) && \
           LILYPONDPREFIX=%(LILYPONDPREFIX)s %(LILYPOND_BIN)s ' \
@@ -48,14 +52,59 @@ e.Command ('lilypond-internals.texi', LILYPOND_BIN,
 doc_stems = map (lambda x: os.path.splitext (x)[0], sources)
 texis = map (e.Tely2texi, doc_stems)
 dvis = map (e.Texi2dvi, doc_stems)
-pss = map (e.PostScript, doc_stems)
+pss = map (e.PostScript, map (lambda x: x + '.dvi', doc_stems))
 pdfs = map (e.Dvi2pdf, doc_stems)
 
+docdir = os.path.join (env['srcdir'], 'Documentation')
+out = env['out']
+# TODO: purl (ugh?), symlinks
+a = ('makeinfo -I$$(dirname $SOURCE) \
+--output=%(out)s/lilypond \
+--css-include=%(docdir)s/texinfo.css \
+--html' \
+     + verbose_opt (env, ' --verbose') \
+     + ' $SOURCE && \
+     makeinfo -I$$(dirname $SOURCE) \
+     --output=$TARGET \
+     --css-include=%(docdir)s/texinfo.css \
+     --html --no-split --no-headers' \
+     + verbose_opt (env, ' --verbose') \
+     + ' $SOURCE') % vars ()
+#e.Command ('lilypond/lilypond.html',
+#         'lilypond.texi',
+e.Command ('user/lilypond/lilypond.html',
+          'user/lilypond.texi',
+#         os.path.join (userbuild, 'lilypond.texi'),
+          a)
+
+# TODO: purl (ugh?), symlinks
+a = ('makeinfo -I$$(dirname $SOURCE) \
+--output=%(out)s/lilypond-internals \
+--css-include=%(docdir)s/texinfo.css \
+--html' \
+     + verbose_opt (env, ' --verbose') \
+     + ' $SOURCE && \
+     makeinfo -I$$(dirname $SOURCE) \
+     --output=$TARGET \
+     --css-include=%(docdir)s/texinfo.css \
+     --html --no-split --no-headers' \
+     + verbose_opt (env, ' --verbose') \
+     + ' $SOURCE') % vars ()
+#e.Command ('lilypond-internals/lilypond-internals.html',
+#         'lilypond-internals.texi',
+e.Command ('user/lilypond-internals/lilypond-internals.html',
+          'user/lilypond-internals.texi',
+#         os.path.join (userbuild, 'lilypond-internals.texi'),
+          a)
+
 e.Alias ('doc', texis)
 e.Alias ('doc', dvis)
 e.Alias ('doc', pss)
 e.Alias ('doc', pdfs)
 
+#e.Alias ('doc', 'user/lilypond-internals/lilypond.html')
+#e.Alias ('doc', 'user/lilypond-internals/lilypond-internals.html')
+
 #testing
 all_sources = ['SConscript',] + sources
 x = env.Tar (env['tarball'], all_sources)
index c7c87474ff71a5b382cf36e3eb824a322414a4f9..b614e9d1a5a47b5c877c35d283ca73900b9fbdb6 100644 (file)
@@ -50,7 +50,8 @@ env.Append (ENV = {'TEXMF' : '{' + LILYPONDPREFIX + ',' \
                   + os.popen ('kpsexpand \$TEXMF').read ()[:-1] + '}' })
 
 ## + ' --output=$$(basename $TARGET) --format=%(LILYPOND_BOOK_FORMAT)s\
-a = (r'''rm -f $$(grep -LF '\lilypondend' $$(dirname $TARGET))/lily-*.tex 2>/dev/null;''' \
+##a = (r'''echo "NOT RM $$(grep -LF '\lilypondend' $$(dirname $TARGET)/lily-*.tex)"; ''' \
+a = (r'''rm -f $$(grep -LF '\lilypondend' $$(dirname $TARGET)/lily-*.tex 2>/dev/null); ''' \
      + 'LILYPONDPREFIX=%(LILYPONDPREFIX)s '\
      + PYTHON + ' ' + LILYPOND_BOOK + verbose_opt (env, ' --verbose')\
      + ' --include=$$(dirname $TARGET) %(LILYPOND_BOOK_INCLUDES)s'\
@@ -67,14 +68,18 @@ a = '(cd $$(dirname $TARGET) &&\
 texi2dvi = Builder (action = a, suffix = '.dvi', src_suffix = '.texi')
 env.Append (BUILDERS = {'Texi2dvi': texi2dvi})
 
-env.Append (DVIPSFLAGS = '-Ppdf -ta4 +u lilypond.map')
+env.Append (DVIPSFLAGS = '-Ppdf -u+lilypond.map -u+ec-mftrace.map')
 
 DVIPS_PAPERSIZE = 'a4'
 DVIPSFLAGS = env['DVIPSFLAGS']
-a = ('dvips %(DVIPSFLAGS)s' \
-     + ' -o $TARGET.pdfps'\
+a = ('set -x; dvips %(DVIPSFLAGS)s' \
+     + ' -o ${TARGET}.pdfps'\
      + ' -t %(DVIPS_PAPERSIZE)s $SOURCE &&'\
-     + ' ps2pdf -sPAPERSIZE=%(DVIPS_PAPERSIZE)s $TARGET.pdfps $TARGET') \
+     + ' ps2pdf -sPAPERSIZE=%(DVIPS_PAPERSIZE)s ${TARGET}.pdfps $TARGET') \
      % vars ()
 dvi2pdf = Builder (action = a, suffix = '.pdf', src_suffix = '.dvi')
 env.Append (BUILDERS = {'Dvi2pdf': dvi2pdf})
+
+a = 'convert $SOURCE $TARGET'
+png2eps = Builder (action = a, suffix = '.eps', src_suffix = '.png')
+env.Append (BUILDERS = {'Png2eps': png2eps})