From 1a16035eb63fca3df67718042a446e6546507ce9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 13 Jul 2004 22:01:29 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 4 +++- Documentation/topdocs/SConscript | 9 ++------ Documentation/user/SConscript | 36 +++++++++++++------------------- SConstruct | 17 ++++++++++----- buildscripts/builder.py | 4 ++-- flower/file-name.cc | 1 + input/SConscript | 4 ++-- lily/SConscript | 14 ++++--------- 8 files changed, 41 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index eed9ba651a..676e116f43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,9 @@ 2004-07-13 Jan Nieuwenhuizen * 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. diff --git a/Documentation/topdocs/SConscript b/Documentation/topdocs/SConscript index e60da4f0a4..26c2dc68df 100644 --- a/Documentation/topdocs/SConscript +++ b/Documentation/topdocs/SConscript @@ -1,13 +1,8 @@ # -*-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) diff --git a/Documentation/user/SConscript b/Documentation/user/SConscript index 42c48085b7..3c1d1d5b9e 100644 --- a/Documentation/user/SConscript +++ b/Documentation/user/SConscript @@ -4,32 +4,25 @@ import os 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 () @@ -44,12 +37,13 @@ e = env.Copy () 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}/'] diff --git a/SConstruct b/SConstruct index 7b627dac8b..539a03cf7d 100644 --- a/SConstruct +++ b/SConstruct @@ -73,7 +73,8 @@ import shutil 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: @@ -217,10 +218,16 @@ if env['verbose']: # 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 @@ -234,6 +241,7 @@ env.Alias ('doc', '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']) @@ -304,6 +312,7 @@ def configure (target, source, env): } };""", '.cc') context.Result (ret) + return ret conf = Configure (env, custom_tests = { 'CheckYYCurrentBuffer' : CheckYYCurrentBuffer }) @@ -409,12 +418,10 @@ if not os.path.exists (config_cache) \ # 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? diff --git a/buildscripts/builder.py b/buildscripts/builder.py index a9438ebcf4..6253bde17e 100644 --- a/buildscripts/builder.py +++ b/buildscripts/builder.py @@ -27,7 +27,7 @@ INFO = Builder (action = a, suffix = '.info', src_suffix = '.texi') 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}) @@ -172,7 +172,7 @@ env['src_glob'] = src_glob 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', diff --git a/flower/file-name.cc b/flower/file-name.cc index c26562664a..8043fabc14 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -7,6 +7,7 @@ Jan Nieuwenhuizen */ +//#include "config.hh" #include "config.h" #include #include diff --git a/input/SConscript b/input/SConscript index 1738e07d98..d497dd2e88 100644 --- a/input/SConscript +++ b/input/SConscript @@ -8,7 +8,7 @@ Import ('env') #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) diff --git a/lily/SConscript b/lily/SConscript index 0564d6c939..d027ea99e0 100644 --- a/lily/SConscript +++ b/lily/SConscript @@ -9,16 +9,10 @@ e = env.Copy () 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') -- 2.39.5