]> git.donarmstrong.com Git - lilypond.git/blobdiff - SConstruct
* SConstruct (symlink):
[lilypond.git] / SConstruct
index 124797edaa7f3d8cb5a7cb6c758472d8e4972a7c..6246d5268ef9cdb61336fdb5db4ff3c14d808d64 100644 (file)
@@ -150,6 +150,7 @@ env = Environment (
        ENV = ENV,
 
        BASH = '/bin/bash',
+       CPPDEFINES = '-DHAVE_CONFIG_H',
        PERL = '/usr/bin/perl',
        PYTHON = '/usr/bin/python',
        SH = '/bin/sh',
@@ -201,10 +202,10 @@ env.Alias ('config', config_cache)
 
 cachedir = os.path.join (outdir, 'build-cache')
 
-if not os.path.exists(cachedir):
-       os.makedirs(cachedir)
+if not os.path.exists (cachedir):
+       os.makedirs (cachedir)
 
-CacheDir (os.path.join (outdir, 'build-cache'))
+CacheDir (cachedir)
 
 # No need to set $LILYPONDPREFIX to run lily, but cannot install...
 if env['debugging'] and not 'install' in COMMAND_LINE_TARGETS:
@@ -330,7 +331,8 @@ def configure (target, source, env):
        else:
                env.Append (CPPPATH = PYTHON_INCLUDE)
 
-       headers = ('sys/stat.h', 'assert.h', 'kpathsea/kpathsea.h', 'Python.h')
+       headers = ('sys/stat.h', 'assert.h', 'kpathsea/kpathsea.h', 'libio.h',
+                  'Python.h')
        for i in headers:
                if conf.CheckCHeader (i):
                        key = re.sub ('[./]', '_', 'HAVE_' + string.upper (i))
@@ -342,7 +344,8 @@ def configure (target, source, env):
                        key = re.sub ('[./]', '_', 'HAVE_' + string.upper (i))
                        conf.env['DEFINES'][key] = 1
 
-       functions = ('gettext', 'isinf', 'memmem', 'snprintf', 'vsnprintf')
+       functions = ('fopencookie', 'funopen',
+                    'gettext', 'isinf', 'memmem', 'snprintf', 'vsnprintf')
        for i in functions:
                if 0 or conf.CheckFunc (i):
                        key = re.sub ('[./]', '_', 'HAVE_' + string.upper (i))
@@ -363,6 +366,9 @@ def configure (target, source, env):
        if conf.CheckLib ('kpathsea', 'kpse_find_tfm'):
                conf.env['DEFINES']['HAVE_KPSE_FIND_TFM'] = '1'
 
+       # FIXME fc3 - move to kpath-guile/SConscript?
+       conf.env['DEFINES']['HAVE_LIBKPATHSEA_SO'] = '1'
+
        if env['fast']:
                cpppath = []
                if env.has_key ('CPPPATH'):
@@ -372,6 +378,17 @@ def configure (target, source, env):
        #this could happen after flower...
        env.ParseConfig ('guile-config compile')
 
+       ## FIXME: pkg-test to required/optional
+       if os.system ('pkg-config --atleast-version=1.6.0 pango'):
+               barf
+       env.ParseConfig ('pkg-config --cflags --libs pango')
+       conf.env['DEFINES']['HAVE_PANGO16'] = '1'
+       
+       if os.system ('pkg-config --atleast-version=1.6.0 pangoft2'):
+               barf
+       env.ParseConfig ('pkg-config --cflags --libs pangoft2')
+       conf.env['DEFINES']['HAVE_PANGO_FT2'] = '1'
+       
        #this could happen only for compiling pango-*
        if env['gui']:
                env.ParseConfig ('pkg-config --cflags --libs gtk+-2.0')
@@ -608,7 +625,10 @@ env.Append (
        run_prefix = run_prefix,
        LILYPONDPREFIX = os.path.join (run_prefix, 'share/lilypond'),
 
-       LIBPATH = [os.path.join (absbuild, 'flower', env['out']),],
+       # FIXME: move to lily/SConscript?
+       LIBPATH = [os.path.join (absbuild, 'flower', env['out']),
+                  os.path.join (absbuild, 'kpath-guile', env['out']),
+                  os.path.join (absbuild, 'ttftool', env['out']),],
        CPPPATH = [outdir, ],
        LILYPOND_PATH = ['.', '$srcdir/input',
                         '$srcdir/input/regression',
@@ -659,30 +679,36 @@ def symlink_tree (target, source, env):
                os.symlink (frm, os.path.basename (dst))
        shutil.rmtree (run_prefix)
        prefix = os.path.join (env['out'], 'usr')
-       map (lambda x: symlink (x[0], os.path.join (prefix, x[1])),
+       map (lambda x: symlink (x[0], os.path.join (prefix,
+                                                   x[1] % {'ver' : version})),
             # ^# := source dir
             # @  := out
             # /$ := add dst file_name
             (('python',     'lib/lilypond/python'),
-             ('lily/',      'bin/lilypond-bin'),
-             ('scripts/',   'bin/lilypond'),
+             ('lily/',      'bin/lilypond'),
+             ('scripts/',   'bin/convert-ly'),
              ('scripts/',   'bin/lilypond-book'),
-             ('mf',         'share/lilypond/dvips'),
-             ('#ps',        'share/lilypond/tex/music-drawing-routines.ps'),
-             ('mf',         'share/lilypond/otf'),
-             ('mf',         'share/lilypond/tfm'),
-             ('#mf',        'share/lilypond/fonts/mf'),
-             ('mf',         'share/lilypond/fonts/otf'),
-             ('mf',         'share/lilypond/fonts/tfm'),
-             ('mf',         'share/lilypond/fonts/type1'),
-             ('#tex',       'share/lilypond/tex/source'),
-             ('tex',        'share/lilypond/tex/tex-out'),
-             ('mf',         'share/lilypond/tex/mf-out'),
-             ('#ly',        'share/lilypond/ly'),
-             ('#scm',       'share/lilypond/scm'),
-             ('#ps',        'share/lilypond/ps'),
+             ('scripts/',   'bin/ps2png'),
+             ('mf',         'share/lilypond/%(ver)s/dvips/mf-out'),
+             ('#ps',        'share/lilypond/%(ver)s/dvips/ps'),
+             ('#ps',        'share/lilypond/%(ver)s/tex/music-drawing-routines.ps'),
+             ('mf',         'share/lilypond/%(ver)s/otf'),
+             ('mf',         'share/lilypond/%(ver)s/tfm'),
+             ('tex',        'share/lilypond/%(ver)s/tex/enc'),
+             ('#mf',        'share/lilypond/%(ver)s/fonts/mf'),
+             ('mf',         'share/lilypond/%(ver)s/fonts/map'),
+             ('mf',         'share/lilypond/%(ver)s/fonts/otf'),
+             ('mf',         'share/lilypond/%(ver)s/fonts/tfm'),
+             ('mf',         'share/lilypond/%(ver)s/fonts/type1'),
+             ('#tex',       'share/lilypond/%(ver)s/tex/source'),
+             ('tex',        'share/lilypond/%(ver)s/tex/tex-out'),
+             ('mf',         'share/lilypond/%(ver)s/tex/mf-out'),
+             ('#ly',        'share/lilypond/%(ver)s/ly'),
+             ('#scm',       'share/lilypond/%(ver)s/scm'),
+             ('#scripts',   'share/lilypond/%(ver)s/scripts'),
+             ('#ps',        'share/lilypond/%(ver)s/ps'),
              ('po/@/nl.mo', 'share/locale/nl/LC_MESSAGES/lilypond.mo'),
-             ('elisp',      'share/lilypond/elisp')))
+             ('elisp',      'share/lilypond/%(ver)s/elisp')))
        os.chdir (srcdir)
 
 if env['debugging']:
@@ -732,7 +758,12 @@ if env['fast']\
    and 'web' not in COMMAND_LINE_TARGETS\
    and 'install' not in COMMAND_LINE_TARGETS\
    and 'clean' not in COMMAND_LINE_TARGETS:
-       subdirs = ['lily', 'lily/include', 'flower', 'flower/include', 'mf']
+       subdirs = ['lily', 'lily/include',
+                  'flower', 'flower/include',
+                  'kpath-guile',
+                  'ttftool',
+                  'mf',
+                  ]
 else:
        subdirs = flatten (cvs_dirs ('.'), [])