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})
if os.environ.has_key ('TEXMF'):
env.Append (ENV = {'TEXMF' : os.environ['TEXMF']})
-env.Append (ENV = {'TEXMF' : '{' + env['LILYPONDPREFIX'] + ',' \
+env.Append (ENV = {'TEXMF' : '{$LILYPONDPREFIX,' \
+ os.popen ('kpsexpand \$TEXMF').read ()[:-1] + '}' })
if os.environ.has_key ('LD_LIBRARY_PATH'):
env.Append (ENV = { 'PYTHONPATH' : string.join (env['PYTHONPATH'],
os.pathsep) } )
-a = ['rm -f $$(grep -LF "\lilypondend" ${TARGET.dir}/lily-*.tex 2>/dev/null);',
+a = ['${__set_x}rm -f $$(grep -LF "\lilypondend" ${TARGET.dir}/lily-*.tex 2>/dev/null);',
'LILYPONDPREFIX=$LILYPONDPREFIX \
$PYTHON $LILYPOND_BOOK $__verbose \
--include=${TARGET.dir} $LILYPOND_BOOK_INCLUDES \
--output=${TARGET.dir} --format=$LILYPOND_BOOK_FORMAT \
$LILYPOND_BOOK_FLAGS \
$SOURCE']
-TELY = Builder (action = a, suffix = '.texi', src_suffix = '.tely')
-env.Append (BUILDERS = {'TELY': TELY})
+TEXI = Builder (action = a, suffix = '.texi', src_suffix = '.tely')
+env.Append (BUILDERS = {'TEXI': TEXI})
a = 'cd ${TARGET.dir} \
&& texi2dvi --batch $TEXINFO_PAPERSIZE_OPTION ${SOURCE.file}'
base = os.path.splitext (str (target[0]))[0]
return (target + [base + '.ps'], source)
-debug = 'echo "PATH=$$PATH";'
-a = debug + 'LILYPONDPREFIX=$LILYPONDPREFIX \
-$PYTHON $LILYPOND_PY $__verbose \
+a = '${set__x}LILYPONDPREFIX=$LILYPONDPREFIX \
+$PYTHON $LILYPOND_PY${__verbose}\
--include=${TARGET.dir} \
--output=${TARGET.base} $SOURCE'
lilypond = Builder (action = a, suffix = '.pdf', src_suffix = '.ly')
## emitter = add_ps_target)
env.Append (BUILDERS = {'LilyPond': lilypond})
-#verbose = verbose_opt (env, ' --verbose')
-verbose = ''
-a = debug + 'LILYPONDPREFIX=$LILYPONDPREFIX $PYTHON $ABC2LY_PY \
---strict --output=${TARGET.base} $SOURCE'
+a = '${set__x}LILYPONDPREFIX=$LILYPONDPREFIX $PYTHON $ABC2LY_PY \
+--strict --output=${TARGET} $SOURCE'
ABC = Builder (action = a, suffix = '.ly', src_suffix = '.abc')
env.Append (BUILDERS = {'ABC': ABC})
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',
t = str (target[0])
open (t, 'w').write (s)
# wugh
- if os.basename (os.dirname (str (target[0]))) == 'bin':
+ if os.path.basename (os.path.dirname (str (target[0]))) == 'bin':
os.chmod (t, 0755)
-AT_COPY = Builder (action = at_copy)
+AT_COPY = Builder (action = at_copy, src_suffix = ['.in', '.py', '.sh',])
env.Append (BUILDERS = {'AT_COPY': AT_COPY})
+MO = Builder (action = 'msgfmt -o $TARGET $SOURCE',
+ suffix = '.mo', src_suffix = '.po')
+env.Append (BUILDERS = {'MO': MO})
+
+ugh = 'ln -f po/lilypond.pot ${TARGET.dir}/lilypond.po; '
+a = ugh + 'xgettext --default-domain=lilypond --join \
+--output-dir=${TARGET.dir} --add-comments \
+--keyword=_ --keyword=_f --keyword=_i $SOURCES'
+PO = Builder (action = a, suffix = '.pot',
+ src_suffix = ['.cc', '.hh', '.py'], multi = 1)
+##env.Append (BUILDERS = {'PO': PO})
+##env.Command(env['absbuild'] + '/po/' + env['out'] + '/lilypond.pot',
+env['potarget'] = os.path.join (env['absbuild'], 'po', env['out'],
+ 'lilypond.pot')
+env['pocommand'] = a
+
+ugh = '; mv ${TARGET} ${SOURCE}'
+a = 'msgmerge ${SOURCE} ${SOURCE.dir}/lilypond.pot -o ${TARGET}' + ugh
+POMERGE = Builder (action = a, suffix = '.pom', src_suffix = '.po')
+env.Append (BUILDERS = {'POMERGE': POMERGE})
+
+a = '$PYTHON $srcdir/buildscripts/bib2html.py -o $TARGET $SOURCE'
+BIB2HTML = Builder (action = a, suffix = '.html', src_suffix = '.bib')
+env.Append (BUILDERS = {'BIB2HTML': BIB2HTML})
+
+a = '$PYTHON $srcdir/buildscripts/lys-to-tely.py \
+--name=${TARGET.base} --title="$TITLE" $SOURCES'
+LYS2TELY = Builder (action = a, suffix = '.tely', src_suffix = '.ly')
+env.Append (BUILDERS = {'LYS2TELY': LYS2TELY})