+2005-04-17 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * SCons updates.
+
2005-04-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
* scm/backend-library.scm (postscript->png): newline after
2005-04-18 Mathieu Giraud <magiraud@free.fr>
- * input/test/chord-names-german.ly: update for italian/french chords
+ * input/test/chord-names-german.ly: update for italian/french
+ chords.
- * Documentation/user/instrument-notation.itely (Printing chord names): update
+ * Documentation/user/instrument-notation.itely (Printing chord
+ names): update.
2005-04-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
- * lily/include/paper-score.hh (class Paper_score): remove unused prototypes.
+ * lily/include/paper-score.hh (class Paper_score): remove unused
+ prototypes.
* lily/book.cc (process): add -COUNT to midi output.
* lily/global-context-scheme.cc (LY_DEFINE): remove outname argument.
- * lily/book.cc (process): loop over Music_outputs returned from Score::book_rendering().
+ * lily/book.cc (process): loop over Music_outputs returned from
+ Score::book_rendering().
* lily/*.cc (width_callback): remove spurious "unused" warnings
for assert (axis==[XY]_AXIS);
* lily/include/music-output.hh (class Music_output): smobify class.
- * lily/include/paper-score.hh (class Paper_score): make members private.
+ * lily/include/paper-score.hh (class Paper_score): make members
+ private.
* lily/performance.cc (process): return #f iso. #<undefined>. This
prevents #<undefined> leaking into GUILE-userspace.
2005-04-17 Han-Wen Nienhuys <hanwen@xs4all.nl>
- * config.hh.in: remove HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
+ * config.hh.in: remove HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC.
2005-04-17 Mathieu Giraud <magiraud@free.fr>
png = base_glob ('*.png')
# We need lily and mf to build these.
-env.Depends ('lilypond.texi', ['#/lily', '#/mf'])
-env.Depends ('music-glossary.texi', ['#/lily', '#/mf'])
+env.Depends ('lilypond.texi', ['#/lily', '#/mf', '#/python'])
+env.Depends ('music-glossary.texi', ['#/lily', '#/mf', '#/python'])
env.Depends ('lilypond.texi', 'lilypond-internals.texi')
env.Depends ('lilypond.texi', eps)
e = env.Copy (
- LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin -I#/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"''',
+ LILYPOND_BOOK_FLAGS = '''--process="lilypond --backend=eps --formats=ps,png --header=texidoc -I#/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"''',
__verbose = ' --verbose',
GENERATE_DOCUMENTATION = '$srcdir/ly/generate-documentation',
)
-e.Command ('lilypond-internals.texi', ['#/lily', '#/mf'],
- 'cd ${TARGET.dir} && $LILYPOND_BIN $GENERATE_DOCUMENTATION')
+e.Command ('lilypond-internals.texi', ['#/lily', '#/mf', '#/python'],
+ 'cd ${TARGET.dir} && $LILYPOND $GENERATE_DOCUMENTATION')
## FIXME: implicit steps from [TE]LY -> PDF
texi = map (env.TEXI, tely)
e['usersrc'] = Dir ('.').srcnode ().abspath
e['userout'] = Dir ('.').abspath
-def url_fixup (target, source, env):
- file_subst (str (target[0]),
- '../lilypond-internals', 'lilypond-internals/')
-# fixme: see builder.py
a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
--css-include=$srcdir/Documentation/texinfo.css $__verbose \
--output=${TARGET.dir} $SOURCE',
- '$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
+ 'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/',]
+
+e.Command ('lilypond/index.html', 'lilypond.texi', a)
+e.Command ('lilypond-internals/index.html', 'lilypond-internals.texi', a)
+e.Command ('music-glossary/index.html', 'music-glossary.texi', a)
+
+a = ['$MAKEINFO -I$usersrc -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}/',]
+ --output=$TARGET $SOURCE']
-e.Command ('lilypond/lilypond.html', 'lilypond.texi', a)
-e.Command ('lilypond-internals/lilypond-internals.html',
- 'lilypond-internals.texi', a)
+e.Command ('lilypond.html', 'lilypond.texi', a)
+e.Command ('lilypond-internals.html', 'lilypond-internals.texi', a)
+e.Command ('music-glossary.html', 'music-glossary.texi', a)
#Hmm -- why not just mv ./Documentation/{*,*/*} ./doc :-)
env.Alias ('doc', texi)
env.Alias ('doc', ps)
env.Alias ('doc', pdf)
-env.Alias ('doc', 'lilypond/lilypond.html')
-env.Alias ('doc', 'lilypond-internals/lilypond-internals.html')
+env.Alias ('doc', 'lilypond/index.html')
+env.Alias ('doc', 'lilypond-internals/index.html')
+env.Alias ('doc', 'lilypond.html')
+env.Alias ('doc', 'lilypond-internals.html')
# install ('lilypond/*', env['sharedir_doc_package'] + '/html')
# install ('lilypond-user/*', env['sharedir_doc_package'] + '/html')
PATH=$run/bin:$PATH
#optionally, if you do not use custom.py below
- #export LILYPONDPREFIX=$run/share/lilypond
+ #export LILYPONDPREFIX=$run/share/lilypond/<VERSION>
- lilypond-bin input/simple
+ lilypond input/simple
Other targets
scons mf-essential # build minimal mf stuff
# TODO:
-# * usability
-# * more program configure tests (mfont, ...?)
+# * reality check:
+# - too many stages in Environments setup
+# (see also buildscripts/builders.py)
+# - Home-brew scons.cach configuration caching
+# - Home-brew source tarball generating -- [why] isn't that in SCons?
+
+# * usability and documentation for "./configure; make" users
+
+# * too much cruft in toplevel SConstruct
+
+# * (optional) operation without CVS directories, from tarball
+
+# * more program configure tests, actually use full executable name
# * install doc
# * grep FIXME $(find . -name 'S*t')
+# * drop "fast"
import re
import glob
config_cache = 'scons.cache'
+# append test_program variables automagically?
config_vars = [
'BASH',
+ 'BYTEORDER',
+ 'CC',
'CCFLAGS',
'CPPPATH',
'CPPDEFINES',
+ 'CXX',
'CXXFLAGS',
'DEFINES',
+ 'FONTFORGE',
+ 'GCC',
+ 'GXX',
'LIBS',
'LINKFLAGS',
'METAFONT',
'PERL',
'PYTHON',
+ 'SH',
]
# Put your favourite stuff in custom.py
BoolOption ('checksums', 'use checksums instead of timestamps',
0),
BoolOption ('fast', 'use timestamps, implicit cache, prune CPPPATH',
- 1),
+ 0),
)
srcdir = Dir ('.').srcnode ().abspath
if os.environ.has_key (key):
ENV[key] = os.environ[key]
+for key in config_vars:
+ if os.environ.has_key (key):
+ ENV[key] = os.environ[key]
+
env = Environment (
ENV = ENV,
- BASH = '/bin/bash',
+ #BASH = '/bin/bash',
+ BYTEORDER = sys.byteorder.upper (),
CPPDEFINES = '-DHAVE_CONFIG_H',
- PERL = '/usr/bin/perl',
- PYTHON = '/usr/bin/python',
- SH = '/bin/sh',
+ #PERL = '/usr/bin/perl',
+ #PYTHON = '/usr/bin/python',
+ #SH = '/bin/sh',
MAKEINFO = 'LANG= makeinfo',
MF_TO_TABLE_PY = srcdir + '/buildscripts/mf-to-table.py',
v = v[:-1]
return string.split (v, '.')
- def get_fullname (program):
- command = 'type -p "%s" 2>/dev/null' % program
- pipe = os.popen (command)
- output = pipe.readlines ()
- if pipe.close ():
- return None
- o = output[-1]
- if o[-1] == '\n':
- o = o[:-1]
- return string.split (o)[-1]
-
- def test_version (lst, program, minimal, description, package):
+ def test_version (lst, full_name, minimal, description, package):
+ program = os.path.basename (full_name)
sys.stdout.write ('Checking %s version... ' % program)
actual = get_version (program)
if not actual:
def test_program (lst, program, minimal, description, package):
sys.stdout.write ('Checking for %s ... ' % program)
- f = get_fullname (program)
+ f = WhereIs (program)
if not f:
print 'not found'
lst.append ((description, package, minimal, program,
'not installed'))
return 0
print f
+ key = program.upper ()
+ if key.find ('+-'):
+ key = re.sub ('\+', 'X', key)
+ key = re.sub ('-', '_', key)
+ env[key] = f
return test_version (lst, program, minimal, description, package)
def test_lib (lst, program, minimal, description):
return 1
return 0
- for i in ['bash', 'perl', 'python', 'sh']:
+ for i in []: #['bash', 'perl', 'python', 'sh']:
sys.stdout.write ('Checking for %s... ' % i)
c = WhereIs (i)
key = string.upper (i)
sys.stdout.write ('\n')
required = []
+ test_program (required, 'bash', '2.0', 'Bash', 'bash')
test_program (required, 'gcc', '2.8', 'GNU C compiler', 'gcc')
test_program (required, 'g++', '3.0.5', 'GNU C++ compiler', 'g++')
- test_program (required, 'python', '2.1', 'Python (www.python.org)', 'python')
test_program (required, 'guile-config', '1.6', 'GUILE development',
'libguile-dev or guile-devel')
- # Do not use bison 1.50 and 1.75.
- test_program (required, 'bison', '1.25', 'Bison -- parser generator',
- 'bison')
- test_program (required, 'flex', '0.0', 'Flex -- lexer generator', 'flex')
+ test_program (required, 'python', '2.1', 'Python (www.python.org)', 'python')
+ test_program (required, 'sh', '0.0', 'Bourne shell', 'sh')
optional = []
- test_program (optional, 'makeinfo', '4.7', 'Makeinfo tool', 'texinfo')
+ # Do not use bison 1.50 and 1.75.
+ test_program (optional, 'bison', '1.25', 'Bison -- parser generator',
+ 'bison')
+ test_program (optional, 'flex', '0.0', 'Flex -- lexer generator', 'flex')
test_program (optional, 'guile', '1.6', 'GUILE scheme', 'guile')
test_program (optional, 'gs', '8.14', 'Ghostscript PostScript interpreter', 'gs or gs-afpl or gs-esp or gs-gpl')
test_program (optional, 'mftrace', '1.1.0', 'Metafont tracing Type1',
'mftrace')
+ test_program (optional, 'makeinfo', '4.7', 'Makeinfo tool', 'texinfo')
test_program (optional, 'perl', '4.0',
'Perl practical efficient readonly language', 'perl')
#test_program (optional, 'foo', '2.0', 'Foomatic tester', 'bar')
- test_program (optional, 'fontforge', '20041224.0', 'FontForge', 'fontforge')
+ test_program (optional, 'fontforge', '0.0.20041224', 'FontForge', 'fontforge')
def CheckYYCurrentBuffer (context):
context.Message ('Checking for yy_current_buffer... ')
conf.env.Append (DEFINES = defines)
command = r"""python -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'""" #"
- PYTHON_INCLUDE = os.popen (command).read ()
+ PYTHON_INCLUDE = os.popen (command).read ()#[:-1]
if env['fast']:
- env.Append (CCFLAGS = ['-I%s ' % PYTHON_INCLUDE])
+ env.Append (CCFLAGS = ['-I%s' % PYTHON_INCLUDE])
else:
- env.Append (CPPPATH = PYTHON_INCLUDE)
+ env.Append (CPPPATH = [PYTHON_INCLUDE])
headers = ('sys/stat.h', 'assert.h', 'kpathsea/kpathsea.h', 'libio.h',
'Python.h')
if conf.CheckCHeader ('pango/pangofc-fontmap.h'):
conf.env['DEFINES']['HAVE_PANGO_PANGOFC_FONTMAP_H'] = '1'
- if conf.CheckLib ('pango-1.0',
- 'pango_fc_font_map_add_decoder_find_func'):
- conf.env['DEFINES']['HAVE_PANGO16'] = '1'
- conf.env['DEFINES']['HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC'] = '1'
-
if env['fast']:
# Using CCFLAGS = -I<system-dir> rather than CPPPATH = [
# <system-dir>] speeds up SCons
env.Append (ENV = {
'TEXMF' : '{$LILYPONDPREFIX,' \
+ os.popen ('kpsexpand \$TEXMF').read ()[:-1] + '}',
- 'LILYPONDPREFIX' : os.path.join (run_prefix, 'share/lilypond'),
+ 'LILYPONDPREFIX' : os.path.join (run_prefix, 'share/lilypond/', version),
})
BUILD_ABC2LY = '${set__x}$PYTHON $srcdir/scripts/abc2ly.py'
-BUILD_LILYPOND = '${set__x}$PYTHON $srcdir/scripts/lilypond.py${__verbose}'
-BUILD_LILYPOND_BIN = '$absbuild/$out/lilypond-bin ${__verbose}'
+BUILD_LILYPOND = '$absbuild/lily/$out/lilypond ${__verbose}'
BUILD_LILYPOND_BOOK = '$PYTHON $srcdir/scripts/lilypond-book.py --verbose'
LILYPOND_BOOK = BUILD_LILYPOND_BOOK,
LILYPOND_BOOK_FORMAT = 'texi-html',
MAKEINFO_FLAGS = '--css-include=$srcdir/Documentation/texinfo.css',
-
+ # should not be necessary
+ # PYTHONPATH = ['$absbuild/python/$out'],
TEXI2DVI_PAPERSIZE = '@afourpaper',
TEXI2DVI_FLAGS = [ '-t $TEXI2DVI_PAPERSIZE'],
DVIPS_PAPERSIZE = 'a4',
# post-config environment update
env.Append (
run_prefix = run_prefix,
- LILYPONDPREFIX = os.path.join (run_prefix, 'share/lilypond'),
+ LILYPONDPREFIX = os.path.join (run_prefix, 'share/lilypond/', version),
# FIXME: move to lily/SConscript?
LIBPATH = [os.path.join (absbuild, 'flower', env['out']),
# @ := out
# /$ := add dst file_name
(('python', 'lib/lilypond/python'),
+ # ugh
+ ('python', 'share/lilypond/%(ver)s/python'),
('lily/', 'bin/lilypond'),
('scripts/', 'bin/convert-ly'),
('scripts/', 'bin/lilypond-book'),
if env['debugging']:
stamp = os.path.join (run_prefix, 'stamp')
- env.Command (stamp, 'SConstruct', [symlink_tree, 'touch $TARGET'])
+ env.Command (stamp, ['#/SConstruct', '#/VERSION'],
+ [symlink_tree, 'touch $TARGET'])
env.Depends ('lily', stamp)
#### dist, tar
lst.append (i)
return lst
+if os.path.isdir ('$srcdir/CVS'):
+ subdirs = flatten (cvs_dirs ('.'), [])
+else:
+ # ugh
+ command = 'cd %(srcdir)s \
+ && find . -name SConscript | sed s@/SConscript@@' % vars ()
+ subdirs = string.split (os.popen (command).read ())
+
if env['fast']\
and 'all' not in COMMAND_LINE_TARGETS\
and 'doc' not in COMMAND_LINE_TARGETS\
'ttftool',
'mf',
]
+
+if os.path.isdir ('$srcdir/CVS'):
+ src_files = reduce (lambda x, y: x + y, map (cvs_files, subdirs))
else:
- subdirs = flatten (cvs_dirs ('.'), [])
+ src_files = ['foobar']
-src_files = reduce (lambda x, y: x + y, map (cvs_files, subdirs))
readme_files = ['AUTHORS', 'README', 'INSTALL', 'NEWS']
txt_files = map (lambda x: x + '.txt', readme_files)
env.Append (
_fixme = _fixme,
ABC2LY = 'abc2ly',
- LILYPOND = 'lilypond',
- LILYPOND_BIN = 'lilypond-bin',
+ ##LILYPOND = 'lilypond',
LILYOND_BOOK = 'lilypond-book',
#ugr
#LILYPOND_BOOK_FORMAT = 'texi',
LILYPOND_BOOK_FORMAT = '',
- LILYPOND_BOOK_FLAGS = ['--format=$LILYPOND_BOOK_FORMAT'],
+ #LILYPOND_BOOK_FLAGS = ['--format=$LILYPOND_BOOK_FORMAT'],
+ LILYPOND_BOOK_FLAGS = '''--format=$LILYPOND_BOOK_FORMAT --process="lilypond --backend=eps --formats=ps,png --header=texidoc -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) #t)'" ''',
LILYPOND_PATH = [],
# The SCons way around FOO_PATH:
MAKEINFO_PATH = [],
MAKEINFO_FLAGS = [],
MAKEINFO_INCFLAGS = '$( ${_concat(INCPREFIX, MAKEINFO_PATH, INCSUFFIX, __env__, RDirs)} $)',
-
+ # should not be necessary
+ # PYTHONPATH = ['$absbuild/python/$out'],
TEXI2DVI_FLAGS = [],
_TEXI2DVI_FLAGS = '$( ${_concat(" ", TEXI2DVI_FLAGS,)} $)',
)
Builder (action =
'$LILYPOND_BOOK --output=${TARGET.dir} \
--include=${TARGET.dir} $LILYPOND_INCFLAGS \
- --process="$LILYPOND_BIN $LILYPOND_INCFLAGS" \
+ --process="$LILYPOND $LILYPOND_INCFLAGS" \
$LILYPOND_BOOK_FLAGS \
$SOURCE',
suffix = '.texi', src_suffix = '.tely')
base = os.path.splitext (str (target[0]))[0]
return (target + [base + '.ps'], source)
-# TODO:
-# FIXME: INCLUDES, FLAGS, use LILYPOND_BIN for building ?
lilypond =\
Builder (action = '$LILYPOND --output=${TARGET.base} --include=${TARGET.dir} $SOURCE',
suffix = '.pdf', src_suffix = '.ly')
base = os.path.splitext (str (target[0]))[0]
return (target + [base + '.log'], source)
+def add_tfm_target (target, source, env):
+ base = os.path.splitext (str (target[0]))[0]
+ return (target + [base + '.tfm'], source)
+
def add_lisp_enc_tex_ly_target (target, source, env):
base = os.path.splitext (str (target[0]))[0]
return (target + [base + '.lisp', base + '.enc', base + '.tex',
env.Append (BUILDERS = {'PFA': pfa})
a = ['(cd ${TARGET.dir} && fontforge -script ${SOURCE.file})',
- '$PYTHON $srcdir/buildscripts/ps-embed-cff.py ${SOURCE.filebase}.cff $(${SOURCE.filebase}).fontname) ${SOURCE.filebase}.cff.ps',
+ '$PYTHON $srcdir/buildscripts/ps-embed-cff.py ${SOURCE.base}.cff $$(cat ${SOURCE.base}.fontname) ${SOURCE.base}.cff.ps',
'rm -f ${TARGET.dir}/*.scale.pfa']
otf = Builder (action = a,
suffix = '.otf',
# naming
def at_copy (target, source, env):
- s = open (str (source[0])).read ()
+ n = str (source[0])
+ s = open (n).read ()
for i in atvars:
if env.has_key (i):
s = string.replace (s, '@%s@'% i, env[i])
AT_COPY = Builder (action = at_copy, src_suffix = ['.in', '.py', '.sh',])
env.Append (BUILDERS = {'AT_COPY': AT_COPY})
+# naming
+def at_copy_ext (target, source, env):
+ n = str (source[0])
+ s = open (n).read ()
+ for i in atvars:
+ if env.has_key (i):
+ s = string.replace (s, '@%s@'% i, env[i])
+ # whugh
+ e = os.path.splitext (n)[1]
+ t = str (target[0]) + e
+ open (t, 'w').write (s)
+
+AT_COPY_EXT = Builder (action = at_copy_ext, src_suffix = ['.py', '.sh',])
+env.Append (BUILDERS = {'AT_COPY_EXT': AT_COPY_EXT})
+
+
MO = Builder (action = 'msgfmt -o $TARGET $SOURCE',
suffix = '.mo', src_suffix = '.po')
env.Append (BUILDERS = {'MO': MO})
# Override them again to fix web build...
- BUILD_ABC2LY = '${set__x}$PYTHON $srcdir/scripts/abc2ly.py'
- BUILD_LILYPOND = '${set__x}$PYTHON $srcdir/scripts/lilypond.py${__verbose}'
+ #BUILD_ABC2LY = '${set__x}$PYTHON $srcdir/scripts/abc2ly.py'
+ #BUILD_LILYPOND = '$absbuild/$out/lilypond ${__verbose}'
e = env.Copy (
- LILYPOND = BUILD_LILYPOND,
- ABC2LY = BUILD_ABC2LY,
+ #LILYPOND = BUILD_LILYPOND,
+ #ABC2LY = BUILD_ABC2LY,
)
if not abc:
e = env.Copy (
TITLE = title,
- LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin --header=texidoc -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) #t)'"''',
- __verbose = ' --verbose',
- )
- #
+ LILYPOND_BOOK_FLAGS = '''--process="lilypond --backend=eps --formats=ps,png --header=texidoc -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) #t)'" ''',
+ __verbose = ' --verbose',
+ )
+ #
tely = e.LYS2TELY ('collated-files', ly)
texi = e.TEXI (tely)
# We need lily and mf to build these.
e.HH ('parser.hh', 'parser.yy')
e.ParseConfig ('guile-config link')
-lily = e.Program ('lilypond-bin', sources)
+lily = e.Program ('lilypond', sources)
install (lily, env['bindir'])
-po = env.Command ('lilypond.po', cc_sources + includes, env['pocommand'])
-env.Alias ('po-update', po)
+# let's not, for now
+#po = env.Command ('lilypond.po', cc_sources + includes, env['pocommand'])
+#env.Alias ('po-update', po)
Real thick,
Real length, Real width)
{
- Real angle = (end - begin).arg();
+ Real angle = (end - begin).arg ();
Array<Offset> points;
points.push (Offset (0, 0));
SCM type = me->get_property ("style");
- Stencil l;
+ Stencil stil;
SCM dash_fraction = me->get_property ("dash-fraction");
if (scm_is_number (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
if (period < 0)
return Stencil ();
- l = make_dashed_line (thick, from, to, period, fraction);
+ stil = make_dashed_line (thick, from, to, period, fraction);
}
else
- {
- l = make_line (thick, from, to);
- }
+ stil = make_line (thick, from, to);
- return l;
+ return stil;
}
ADD_INTERFACE (Line_interface, "line-interface",
*/
#include "paper-book.hh"
-#include "paper-score.hh"
+
#include "main.hh"
#include "output-def.hh"
#include "paper-score.hh"
%{
int
-yylex (YYSTYPE *s, YYLTYPE *l, void *v)
+yylex (YYSTYPE *s, YYLTYPE *loc, void *v)
{
Lily_parser *pars = (Lily_parser*) v;
Lily_lexer *lex = pars->lexer_;
lex->lexval = (void*) s;
- lex->lexloc = l;
+ lex->lexloc = loc;
lex->prepare_for_next_token ();
return lex->yylex ();
}
}
-/*
-Should make this optional? It will also complain when you do
+/* FIXME: Should make this optional? It will also complain at
[s4]
which is entirely legitimate.
-Or we can scrap it. Barchecks should detect wrong durations, and
-skipTypesetting speeds it up a lot.
-*/
+Or we can scrap it. Barchecks should detect wrong durations, and
+skipTypesetting speeds it up a lot. */
void
Lily_parser::beam_check (SCM dur)
LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/ -I $(builddir)/mf/out/
-LILYPOND_BOOK_FLAGS = --process="lilypond --backend eps --formats=ps,png --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
+LILYPOND_BOOK_FLAGS = --process="lilypond --backend=eps --formats=ps,png --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
#texi-html for www only:
# -*-python-*-
import os
+import re
import string
Import ('env', 'base_glob', 'install')
-feta = reduce (lambda x, y: x + y,
+xfeta = reduce (lambda x, y: x + y,
map (lambda x: base_glob (x),
('feta[0-9]*.mf',
'feta-alphabet*[0-9].mf',
- #'parmesan[0-9]*.mf',
- )))
+ 'feta-braces-[a-z]*.mf',
+ 'parmesan[0-9]*.mf',)))
+feta = base_glob ('feta[0-9][0-9]*.mf')
+feta_alphabet = base_glob ('feta-alphabet[0-9][0-9]*.mf')
+feta_braces = base_glob ('feta-braces-[a-z].mf')
+parmesan = base_glob ('parmesan[0-9][0-9]*.mf')
# .pfa rules want an encoding file; ecb10.enc
#sauter = ['ecb10']
sauter = []
-fonts = feta + sauter
-env['feta'] = string.join (feta)
-env['sauter'] = ''
+fonts = feta + feta_alphabet + feta_braces + parmesan + sauter
+#env['feta'] = string.join (feta)
+#env['sauter'] = ''
-#BARF
-feta_sizes = ['11']
+feta_sizes = map (lambda x: re.sub ('feta([0-9]+)', '\\1', x), feta)
otfs = map (lambda x: 'emmentaler-' + x, feta_sizes) + ['aybabtu']
t = map (env.TFM, fonts)
-a = map (env.GTABLE, feta)
+g = map (env.GTABLE, fonts)
# FIXME: don't know how to add prefix: PFAEmmentaler (naming is ugly anyway)
#p = map (env.PFA, fonts + map (lambda x: 'PFA' + x, otfs))
p = map (env.PFA, fonts)
-##e = map (env.PE, otfs)
+#e = map (env.ENC, fonts)
+c = map (lambda x: x + '.cff', fonts)
+cp = map (lambda x: x + '.cff.ps', fonts)
+e = map (lambda x: x + '.enc', fonts)
+s = map (lambda x: x + '.svg', fonts)
o = map (env.OTF, otfs)
+# Emmentaler
+a = '''cat ${SOURCE} \
+$$(echo ${SOURCE} | grep -v brace | sed s/feta/parmesan/) \
+$$(echo ${SOURCE} | grep -v brace | sed s/feta/feta-alphabet/) \
+> ${TARGET}'''
+otf_table = Builder (action = a, suffix = '.otf-table',
+ # barf
+ src_suffix = '.lisp')
+env.Append (BUILDERS = {'OTF_TABLE': otf_table})
+f = map (env.OTF_TABLE, feta)
+
+map (lambda x: env.Depends ('emmentaler-' + x + '.otf',
+ 'feta' + x + '.otf-table'),
+ feta_sizes)
+
env.Command ('emmentaler-11.pe',
'$srcdir/buildscripts/gen-emmentaler-scripts.py',
'$PYTHON $srcdir/buildscripts/gen-emmentaler-scripts.py --dir=${TARGET.dir}')
map (lambda x: env.Depends (x + '.pfa', x + '.enc'), feta)
+
+# Aybabtu
+
+# ugh
+##feta_braces = map (lambda x: 'feta-braces-%c' % (ord ('a') + x), range (9))
+
+env.AT_COPY ('aybabtu.pe.in')
+env.Command ('aybabtu.fontname', '', 'echo -n aybabtu > $TARGET')
+env.Command ('aybabtu.subfonts',
+ map (lambda x: x + '.mf', feta_braces),
+ 'echo ${SOURCES.filebase} > $TARGET')
+
+env.Command ('aybabtu.otf-table',
+ map (lambda x: x + '.otf-table', feta_braces),
+ 'cd ${TARGET.dir} && cat ${SOURCES.file} > ${TARGET.file}')
+
+env.Command ('aybabtu.otf-gtable',
+ map (lambda x: x + '.otf-gtable', feta_braces),
+ 'echo "(design_size . 20)" > $TARGET')
+
+env.Depends ('aybabtu.otf', 'aybabtu.subfonts')
+env.Depends ('aybabtu.otf', 'aybabtu.fontname')
+env.Depends ('aybabtu.otf', 'aybabtu.otf-table')
+env.Depends ('aybabtu.otf', 'aybabtu.otf-gtable')
+
+
## FIXME
-##mf_essential = ['feta16', 'feta20', 'parmesan16', ]
-mf_essential = ['feta16', 'feta20',] #'parmesan16', ]
+mf_essential = ['feta16', 'feta20', 'parmesan16', ]
pfa_essential = map (env.PFA, mf_essential)
env.Alias ('mf-essential', pfa_essential)
env.Alias ('mf', 'cmr.enc')
env.Command ('lilypond.map', p,
- ['for i in $feta; do echo $$i $$i "<"$$i.pfa; done > $TARGET',
+ ['for i in $fonts; do echo $$i $$i "<"$$i.pfa; done > $TARGET',
'for i in $feta_sizes; do\
echo "Emmentaler-$$i Emmentaler-$$i <emmentaler-$$i.cff.ps";\
echo "PFAEmmentaler-$$i PFAEmmentaler-$$i <PFAemmentaler-$$i.pfa";\
env.Command ('Fontmap.lily', p + ['Fontmap'],
['echo "%!" > $TARGET',
- '''for i in $feta; do echo "/$$i ($$i.pfa);"; done >> $TARGET''',
+ '''for i in $fonts; do echo "/$$i ($$i.pfa);"; done >> $TARGET''',
''' for i in $feta_sizes; do \
echo "/Emmentaler-$$i (emmentaler-$$i.cff.ps);" ; \
echo "/PFAEmmentaler-$$i (PFAemmentaler-$$i.pfa);" ; \
env.Alias ('mf', pfa_essential + p + map (lambda x: x[0], o))
install (t, env['sharedir_package_version'] + '/fonts/tfm')
-install (a, env['sharedir_package_version'] + '/afm')
install (p, env['sharedir_package_version'] + '/fonts/type1')
install (o, env['sharedir_package_version'] + '/fonts/otf')
+install (e, env['sharedir_package_version'] + '/ps')
+install (s, env['sharedir_package_version'] + '/fonts/svg')
+install (c, env['sharedir_package_version'] + '/fonts/cff')
+install (cp, env['sharedir_package_version'] + '/ps')
+
py = src_glob ('*.py')
c = src_glob ('*.c')
-pym = env.AT_COPY (py)
-cm = env.SharedObject (c)
+pym = map (env.AT_COPY_EXT, py)
+cm = map (env.SharedObject, c)
pym
cm
-install ([cm, pym], env['sharedir_package_version'] + '/python')
+install (cm + pym, env['sharedir_package_version'] + '/python')
name = 'ttftool'
e = env.Copy ()
-e.Append (CPPPATH = ['#/flower/include', '#/ttftool/include', outdir,])
+e.Append (CPPPATH = ['#/flower/include', '#/ttftool/include', outdir],
+ # sigh
+ CPPDEFINES = ['-D${BYTEORDER}ENDIAN', '-DSMALLENDIAN=LITTLEENDIAN'],)
if env['static']:
e.Library (name, sources)
if not env['static'] or env['shared']: