2004-07-13 Jan Nieuwenhuizen <janneke@gnu.org>
* SConstruct: Configure only pristine build tree or on user
- request. Cleanups.
+ request. Cleanups. Add Documentation/topdocs to subdirs.
+ Use checksums instead of timestamps.
+ (CheckYYCurrentBuffer): Return result.
* Documentation/topdocs/SConscript: New file.
# -*-python-*-
-import os
-
Import ('env')
-telys = env['base_glob'] (env, '*.tely')
-texis = env['base_glob'] (env, '*.texi') + map (env.TEXI, telys)
-
+telys = env['glob'] (env, '*.tely')
+texis = env['glob'] (env, '*.texi') + map (env.TEXI, telys)
htmls = map (env.HTML, texis)
-# map (env.HTML, ['AUTHORS.html',])
-# map (env.HTML, ['AUTHORS.texi',])
env.Alias ('doc', htmls)
import string
Import ('env')
-sources = env['src_glob'] (env, '*.tely')
-pngs = env['src_glob'] (env, '*.png')
-
-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'])
+telys = env['glob'] (env, '*.tely')
+pngs = env['glob'] (env, '*.png')
env.Depends ('lilypond.texi', env['LILYPOND_BIN'])
env.Depends ('lilypond.texi', 'lilypond-internals.texi')
-png_stems = map (lambda x: os.path.splitext (x)[0], pngs)
-epss = map (env.Png2eps, png_stems)
+epss = map (env.Png2eps, pngs)
env.Depends ('lilypond.texi', epss)
-lydir = Dir ('.').srcnode ().abspath + '/../../ly'
env.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
'cd ${TARGET.dir} \
&& LILYPONDPREFIX=$LILYPONDPREFIX $LILYPOND_BIN $__verbose \
- $lydir/generate-documentation')
-
-doc_stems = map (lambda x: os.path.splitext (x)[0], sources)
-texis = map (env.TEXI, doc_stems)
-dvis = map (env.Texi2dvi, doc_stems)
-pss = map (env.PostScript, map (lambda x: x + '.dvi', doc_stems))
-pdfs = map (env.Dvi2pdf, doc_stems)
+ $srcdir/ly/generate-documentation')
+texis = map (env.TEXI, telys)
+dvis = map (env.Texi2dvi, telys)
+pss = map (env.PostScript, map (lambda x: x + '.dvi', telys))
+pdfs = map (env.Dvi2pdf, telys)
+infos = map (env.INFO, telys)
def file_subst (file_name, find, subst):
s = open (file_name).read ()
e['usersrc'] = Dir ('.').srcnode ().abspath
def url_fixup (target, source, env):
file_subst (str (target[0]),
- '\.\./lilypond-internals', 'lilypond-internals/')
-a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
---css-include=$usersrc/../texinfo.css $__verbose \
+ '../lilypond-internals', 'lilypond-internals/')
+a = ['$MAKEINFO -I$srcdir/Documenation/user -I${SOURCE.dir} --html \
+--css-include=$srcdir/Documentation/texinfo.css $__verbose \
--output=${TARGET.dir} $SOURCE',
- '$MAKEINFO -I$usersrc -I${SOURCE.dir} --html --no-split --no-headers \
- --css-include=$usersrc/../texinfo.css $__verbose \
+ '$MAKEINFO -I$srcdir/Documentation/user -I${SOURCE.dir} --html \
+ --no-split --no-headers \
+ --css-include=$srcdir/Documentation/../texinfo.css $__verbose \
--output=$TARGET $SOURCE',
url_fixup,
'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/']
FOOSUMS = 1
subdirs = ['flower', 'lily', 'mf', 'scm', 'ly', 'Documentation',
- 'Documentation/user', 'input', 'scripts', 'elisp',
+ 'Documentation/user', 'Documentation/topdocs',
+ 'input', 'scripts', 'elisp',
'buildscripts', 'cygwin', 'debian']
usage = r'''Usage:
# os.pathsep), })
outdir = os.path.join (Dir (env['build']).abspath, env['out'])
+
+# This is interesting, version.hh is generated automagically, just in
+# time. Is this a .h /.hh issue? It seems to be, using config.hh (in
+# flower/file-name.cc) works. Bug report to SCons or rename to
+# config.hh or both?
+# config_h = os.path.join (outdir, 'config.hh')
config_h = os.path.join (outdir, 'config.h')
version_h = os.path.join (outdir, 'version.hh')
-config_h = os.path.join (outdir, 'config.h')
-env.Alias ('config', config_h)
+
+env.Alias ('config', config_cache)
## Explicit dependencies
'Documentation/user',
'Documentation/topdocs'])
+env.Depends (['lily', 'flower', 'all', '.'], config_h)
env.Depends ('doc', ['lily', 'mf'])
env.Depends ('input', ['lily', 'mf'])
env.Depends ('doc', ['lily', 'mf'])
}
};""", '.cc')
context.Result (ret)
+ return ret
conf = Configure (env, custom_tests = { 'CheckYYCurrentBuffer'
: CheckYYCurrentBuffer })
# always out of date, and that triggers recompiles, even when
# using checksums?
if FOOSUMS: #not env['checksums']:
-
## FIXME: Is this smart, using option cache for saving
## config.cache? I cannot seem to find the official method.
map (lambda x: opts.AddOptions ((x,)), config_vars)
opts.Save (config_cache, env)
-
env.Command (config_h, config_cache, config_header)
# hmm?
env.Append (BUILDERS = {'INFO': INFO})
a = '$MAKEINFO $__verbose $MAKEINFO_INCLUDES --html --no-split --no-headers \
---css-include=#/Documentation/texinfo.css --output=$TARGET $SOURCE'
+--css-include=$srcdir/Documentation/texinfo.css --output=$TARGET $SOURCE'
HTML = Builder (action = a, suffix = '.html', src_suffix = '.texi')
env.Append (BUILDERS = {'HTML': HTML})
def base_glob (env, s):
return map (lambda x: os.path.splitext (x)[0], src_glob (env, s))
-env['base_glob'] = src_glob
+env['glob'] = base_glob
atvars = [
'BASH',
Jan Nieuwenhuizen <janneke@gnu.org>
*/
+//#include "config.hh"
#include "config.h"
#include <stdio.h>
#include <errno.h>
#abc = map (lambda x: os.path.splitext (x)[0], abc_sources)
#lys = map (env.Abc2ly, abc)
-abcs = env['base_glob'] (env, '*.abc')
-lys = env['base_glob'] (env, '*.ly') + map (env.ABC, abcs)
+abcs = env['glob'] (env, '*.abc')
+lys = env['glob'] (env, '*.ly') + map (env.ABC, abcs)
pdfs = map (env.LilyPond, lys)
env.Alias ('doc', pdfs)
e.Append (YACCFLAGS = '-d')
e.Append (CPPPATH = [outdir, '#/lily/include', '#/flower/include'])
-#e.Depends ('lexer.cc', 'parser.cc')
-#e.Depends ('my-lily-lexer.o', 'parser.cc')
-#e.Depends ('my-lily-parser.o', 'parser.cc')
-
-e.SideEffect ('parser.hh', 'parser.cc')
-e.Depends ('lexer.cc', 'parser.hh')
-e.Depends ('my-lily-lexer.o', 'parser.hh')
-e.Depends ('my-lily-parser.o', 'parser.hh')
-
-# map (e.Precious, ['parser.cc', 'lexer.cc', 'parser.hh'])
+e.Depends ('lexer.cc', 'parser.cc')
+e.Depends ('my-lily-lexer.o', 'parser.cc')
+e.Depends ('my-lily-parser.o', 'parser.cc')
+map (e.Precious, ['parser.cc', 'lexer.cc', 'parser.hh'])
e.Append (LIBS = ['flower'])
e.ParseConfig ('guile-config link')