~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to Documentation/user/SConscript

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*-python-*-
 
2
 
 
3
import os
 
4
import string
 
5
 
 
6
Import ('env', 'base_glob')
 
7
tely = base_glob ('*.tely')
 
8
png = base_glob ('*.png')
 
9
 
 
10
# We need lily and mf to build these.
 
11
env.Depends ('lilypond.texi', ['#/lily', '#/mf', '#/python'])
 
12
env.Depends ('music-glossary.texi', ['#/lily', '#/mf', '#/python'])
 
13
 
 
14
env.Depends ('lilypond.texi', 'lilypond-internals.texi')
 
15
 
 
16
eps = map (env.PNG2EPS, png)
 
17
env.Depends ('lilypond.texi', eps)
 
18
 
 
19
e = env.Copy (
 
20
        LILYPOND_BOOK_FLAGS = '''--process="lilypond --backend=eps --formats=ps,png --header=texidoc -I#/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"''',
 
21
        __verbose = ' --verbose',
 
22
        GENERATE_DOCUMENTATION = '$srcdir/ly/generate-documentation',
 
23
        )
 
24
 
 
25
e.Command ('lilypond-internals.texi', ['#/lily', '#/mf', '#/python'],
 
26
           'cd ${TARGET.dir} && $LILYPOND $GENERATE_DOCUMENTATION')
 
27
 
 
28
## FIXME: implicit steps from [TE]LY -> PDF
 
29
texi = map (env.TEXI, tely)
 
30
dvi = map (env.TEXIDVI, tely)
 
31
ps = map (env.DVIPS, tely) ###map (lambda x: x + '.dvi', tely))
 
32
dvipdf = map (env.DVIPDF, tely)
 
33
pdf = map (env.PSPDF, dvipdf)
 
34
 
 
35
# FIXME: install
 
36
info = map (env.INFO, tely)
 
37
 
 
38
def file_subst (file_name, find, subst):
 
39
        s = open (file_name).read ()
 
40
        t = string.replace (s, find, subst)
 
41
        if s != t:
 
42
                os.rename (file_name, file_name + '~')
 
43
                h = open (file_name, "w")
 
44
                h.write (t)
 
45
                h.close ()
 
46
 
 
47
e['usersrc'] = Dir ('.').srcnode ().abspath
 
48
e['userout'] = Dir ('.').abspath
 
49
 
 
50
a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
 
51
     --css-include=$srcdir/Documentation/texinfo.css $__verbose \
 
52
     --output=${TARGET.dir} $SOURCE',
 
53
     'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/',]
 
54
 
 
55
e.Command ('lilypond/index.html', 'lilypond.texi', a)
 
56
e.Command ('lilypond-internals/index.html', 'lilypond-internals.texi', a)
 
57
e.Command ('music-glossary/index.html', 'music-glossary.texi', a)
 
58
 
 
59
a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
 
60
     --no-split --no-headers \
 
61
     --css-include=$srcdir/Documentation/texinfo.css $__verbose \
 
62
     --output=$TARGET $SOURCE']
 
63
 
 
64
e.Command ('lilypond.html', 'lilypond.texi', a)
 
65
e.Command ('lilypond-internals.html', 'lilypond-internals.texi', a)
 
66
e.Command ('music-glossary.html', 'music-glossary.texi', a)
 
67
 
 
68
#Hmm -- why not just mv ./Documentation/{*,*/*} ./doc :-)
 
69
env.Alias ('doc', texi)
 
70
env.Alias ('doc', dvi)
 
71
env.Alias ('doc', ps)
 
72
env.Alias ('doc', pdf)
 
73
 
 
74
env.Alias ('doc', 'lilypond/index.html')
 
75
env.Alias ('doc', 'lilypond-internals/index.html')
 
76
env.Alias ('doc', 'lilypond.html')
 
77
env.Alias ('doc', 'lilypond-internals.html')
 
78
 
 
79
# install ('lilypond/*', env['sharedir_doc_package'] + '/html')
 
80
# install ('lilypond-user/*', env['sharedir_doc_package'] + '/html')