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

index d2aad2c257e4ad7f9321e7c83d790e11c8560130..57f8db9787c0c44b21a3b44a862a61e248f474e0 100644 (file)
@@ -6,7 +6,8 @@ import os
 here = os.getcwd ()
 reldir = str (Dir ('.').srcnode ())
 os.chdir (reldir)
-sources = glob.glob ('*.tely') + glob.glob ('user/*.tely')
+###sources = glob.glob ('*.tely') + glob.glob ('user/*.tely')
+sources = ['user/lilypond.tely', 'user/music-glossary.tely']
 os.chdir (here)
 
 Import ('env')
@@ -29,9 +30,13 @@ LILYPONDPREFIX = env['LILYPONDPREFIX']
 
 
 mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
+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'))
 
 e.Command ('lilypond-internals.texi', LILYPOND_BIN,
           ('(cd $$(dirname $TARGET) && \
@@ -40,9 +45,16 @@ e.Command ('lilypond-internals.texi', LILYPOND_BIN,
            + ' ' + os.path.join (env['srcdir'], 'ly/generate-documentation')\
            + ')') % vars ())
 
-docs = e.Tely2pdf (sources)
+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)
+pdfs = map (e.Dvi2pdf, doc_stems)
 
-e.Alias ('doc', docs)
+e.Alias ('doc', texis)
+e.Alias ('doc', dvis)
+e.Alias ('doc', pss)
+e.Alias ('doc', pdfs)
 
 #testing
 all_sources = ['SConscript',] + sources
index 8c6f0edd94353fa14419040ede9813f83e5307f3..a29592389d29a16c549aa7db9c028147bb9d76e2 100644 (file)
@@ -28,6 +28,10 @@ prefix=os.path.join (os.environ['HOME'], 'usr', 'pkg', 'lilypond')
 
 
 # TODO:
+#   * separate environments?
+#     - compile environment checks headers and libraries
+#     - doc environment checks doc stuff
+#
 #   * running from build-dir, without installing?
 #     - scons will not install, if PREFIX lives outside of CWD
 #     - build symlink tree
@@ -337,8 +341,11 @@ env['LILYPOND_BOOK_PATH'] = ['.', '#/input', '#/input/regression',
                             '#/Documentation/user',
                             os.path.join (absbuild, 'Documentation', out)]
                             
+env['MAKEINFO_PATH'] = ['.', '#/Documentation/user',
+                       os.path.join (absbuild, 'Documentation', out)]
+
 ## TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
-env['TEXINFO_PAPERSIZE_OPTION'] = '-t@afourpaper'
+env['TEXINFO_PAPERSIZE_OPTION'] = '-t @afourpaper'
 
 SConscript ('buildscripts/builder.py')
 
index fa6c989dbf8f274186d359e99696d7154ea843f8..c7c87474ff71a5b382cf36e3eb824a322414a4f9 100644 (file)
@@ -19,7 +19,9 @@ def join_path (path, infix=os.pathsep, prefix = ''):
                return x
        return string.join (map (lambda x: prefix + dir (x), path), infix)
 
+MAKEINFO_INCLUDES = join_path (env['MAKEINFO_PATH'], '', ' -I')
 a = env['MAKEINFO'] + verbose_opt (env, ' --verbose') \
+    + MAKEINFO_INCLUDES \
     + ' --no-split --no-headers --output=$TARGET $SOURCE'
 
 texi2txt = Builder (action = a, suffix = '.txt', src_suffix = '.texi')
@@ -47,33 +49,32 @@ if os.environ.has_key ('TEXMF'):
 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;''' \
      + 'LILYPONDPREFIX=%(LILYPONDPREFIX)s '\
      + PYTHON + ' ' + LILYPOND_BOOK + verbose_opt (env, ' --verbose')\
      + ' --include=$$(dirname $TARGET) %(LILYPOND_BOOK_INCLUDES)s'\
      + r""" --process='%(LILYPOND_BIN)s %(LILYPOND_BOOK_INCLUDES)s'"""\
-     + ' --output=$$(basename $TARGET) --format=%(LILYPOND_BOOK_FORMAT)s\
+     + ' --output=$$(dirname $TARGET) --format=%(LILYPOND_BOOK_FORMAT)s\
      %(LILYPOND_BOOK_FLAGS)s\
      $SOURCE') % vars ()
-
-tely2pdf = Builder (action = a, suffix = '.texi', src_suffix = '.tely')
-
-env.Append (BUILDERS = {'Tely2pdf': tely2pdf})
+tely2texi = Builder (action = a, suffix = '.texi', src_suffix = '.tely')
+env.Append (BUILDERS = {'Tely2texi': tely2texi})
 
 TEXINFO_PAPERSIZE_OPTION = env['TEXINFO_PAPERSIZE_OPTION']
 a = '(cd $$(dirname $TARGET) &&\
- texi2dvi --batch %(TEXINFO_PAPERSIZE_OPTION)s $$(basename $SOURCE)' % vars ()
-
+ texi2dvi --batch %(TEXINFO_PAPERSIZE_OPTION)s $$(basename $SOURCE))' % vars ()
 texi2dvi = Builder (action = a, suffix = '.dvi', src_suffix = '.texi')
-
 env.Append (BUILDERS = {'Texi2dvi': texi2dvi})
 
-
-# $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi 
-#      mkdir -p $(dir $@)
-#      $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(builddir)/Documentation/texinfo.css --html $<
-#      $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(builddir)/Documentation/texinfo.css --html --no-split --no-headers $<
-#      perl -i~ -pe 's!../lilypond-internals!lilypond-internals/!g' $(outdir)/lilypond.html
-#      rm -f $(outdir)/lilypond/*.png $(outdir)/lilypond/*.ly 
-#      -ln -f $(outdir)/*.png $(outdir)/*.ly $(outdir)/lilypond/
-
+env.Append (DVIPSFLAGS = '-Ppdf -ta4 +u lilypond.map')
+
+DVIPS_PAPERSIZE = 'a4'
+DVIPSFLAGS = env['DVIPSFLAGS']
+a = ('dvips %(DVIPSFLAGS)s' \
+     + ' -o $TARGET.pdfps'\
+     + ' -t %(DVIPS_PAPERSIZE)s $SOURCE &&'\
+     + ' ps2pdf -sPAPERSIZE=%(DVIPS_PAPERSIZE)s $TARGET.pdfps $TARGET') \
+     % vars ()
+dvi2pdf = Builder (action = a, suffix = '.pdf', src_suffix = '.dvi')
+env.Append (BUILDERS = {'Dvi2pdf': dvi2pdf})
index 5652f6faffa08520a486dd84ab6c37b1581e461a..220d30bae44af7486c5d5bf742ebf21644e9b06f 100644 (file)
@@ -235,7 +235,7 @@ def setup_temp ():
 
 def command_name (cmd):
 
-       # deal with "((latex ) >& 1 ) .." too 
+       # deal with "((latex ) >& 1 ) .." too
        cmd = re.match ("([\(\)]*)([^ ]*)", cmd).group(2)
        return os.path.split (cmd)[1]