X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=SConstruct;h=9e7c40b1034e86f96d75b518ae791e7633fe1164;hb=28b03579e5129ba89e9b07d0170dee73202bf110;hp=c515d9096fa6b4fff75dd4d038e99b7005de4bf5;hpb=b1e0774cfe58ab5ca1f1ade42e4dc9c2496ca828;p=lilypond.git diff --git a/SConstruct b/SConstruct index c515d9096f..9e7c40b103 100644 --- a/SConstruct +++ b/SConstruct @@ -248,6 +248,8 @@ prefix = env['prefix'] bindir = os.path.join (prefix, 'bin') sharedir = os.path.join (prefix, 'share') libdir = os.path.join (prefix, 'lib') +libdir_package = os.path.join (libdir, package.name) +lidbir_package_version = os.path.join (libdir_package, version) localedir = os.path.join (sharedir, 'locale') sharedir_doc_package = os.path.join (sharedir, 'doc', package.name) sharedir_package = os.path.join (sharedir, package.name) @@ -318,14 +320,14 @@ def configure (target, source, env): print f return test_version (lst, program, minimal, description, package) - def test_lib (lst, program, minimal, description): + def test_lib (lst, program, minimal, description, package): # FIXME: test for Debian or RPM (or -foo?) based dists # to guess (or get correct!: apt-cache search?) # package name. #if os.system ('pkg-config --atleast-version=0 freetype2'): # barf if test_version (lst, program, minimal, description, - 'lib%(program)s-dev or %(program)s-devel' + 'lib%(package)s-dev or %(package)s-devel' % vars ()): env.ParseConfig ('pkg-config --cflags --libs %(program)s' % vars ()) @@ -339,9 +341,11 @@ def configure (target, source, env): test_program (required, 'guile-config', '1.6', 'GUILE development', 'libguile-dev or guile-devel') test_program (required, 'mf', '0.0', 'Metafont', 'tetex-bin') - test_program (required, 'mftrace', '1.1.6', 'mftrace (http://xs4all.nl/~hanwen/mftrace)', 'mftrace') + test_program (required, 'mftrace', '1.1.9', + 'mftrace (http://xs4all.nl/~hanwen/mftrace)', 'mftrace') test_program (required, 'potrace', '0.0', 'Potrace', 'potrace') - test_program (required, 'python', '2.1', 'Python (www.python.org)', 'python') + test_program (required, 'python', '2.1', 'Python (www.python.org)', + 'python') test_program (required, 'sh', '0.0', 'Bourne shell', 'sh') optional = [] @@ -350,10 +354,14 @@ def configure (target, source, env): test_program (optional, 'bison', '1.25', 'Bison -- parser generator', 'bison') test_program (optional, 'dvips', '0.0', 'Dvips', 'tetex-bin') - test_program (optional, 'fontforge', '0.0.20041224', 'FontForge', 'fontforge') - test_program (optional, 'flex', '0.0', 'Flex -- lexer generator', 'flex') + test_program (optional, 'fontforge', '0.0.20041224', 'FontForge', + 'fontforge') + 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, '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') @@ -363,7 +371,7 @@ def configure (target, source, env): def CheckYYCurrentBuffer (context): context.Message ('Checking for yy_current_buffer... ') - ret = conf.TryLink ("""using namespace std; + ret = conf.TryCompile ("""using namespace std; #include class yy_flex_lexer: public yyFlexLexer { @@ -483,24 +491,26 @@ def configure (target, source, env): test_program (required, 'pkg-config', '0.9.0', 'pkg-config library compile manager', 'pkg-config') if test_lib (required, 'freetype2', '0.0', - 'Development files for FreeType 2 font engine'): + 'Development files for FreeType 2 font engine', + 'freetype6'): conf.env['DEFINES']['HAVE_FREETYPE2'] = '1' if test_lib (required, 'pangoft2', '1.6.0', - 'Development files for pango, with fontconfig2'): + 'Development files for pango, with FreeType2', + 'pango1.0'): conf.env['DEFINES']['HAVE_PANGO_FT2'] = '1' conf.env['DEFINES']['HAVE_PANGO16'] = '1' if test_lib (optional, 'fontconfig', '2.2.0', - 'Development files for fontconfig'): + 'Development files for fontconfig', 'fontconfig1'): conf.env['DEFINES']['HAVE_FONTCONFIG'] = '1' #this could happen only for compiling pango-* if env['gui']: test_lib (required, 'gtk+-2.0', '2.4.0', - 'Development files for GTK+') + 'Development files for GTK+', 'gtk2.0') if test_lib (required, 'pango', '1.6.0', - 'Development files for pango'): + 'Development files for pango', 'pango1.0'): conf.env['DEFINES']['HAVE_PANGO16'] = '1' if conf.CheckCHeader ('pango/pangofc-fontmap.h'): @@ -579,11 +589,16 @@ def save_config_cache (env): sys.stdout.write ('\n') sys.stdout.write ('\n') sys.stdout.write ('Examples:') + sys.stdout.write ('\n') sys.stdout.write (' scons lily # build lilypond') + sys.stdout.write ('\n') sys.stdout.write (' scons all # build everything') + sys.stdout.write ('\n') sys.stdout.write (' scons doc # build documentation') + sys.stdout.write ('\n') ## TODO ## sys.stdout.write (' scons prefix=/usr DESTDIR=/tmp/pkg all install') + ## sys.stdout.write ('\n') Exit (0) elif not env['checksums']: # When using timestams, config.hh is NEW. The next @@ -663,8 +678,9 @@ env.Append ( PSPDF_FLAGS = ['-sPAPERSIZE=$DVIPS_PAPERSIZE'], ) +env.Append (CCFLAGS = ['-pipe', '-Wno-pmf-conversions']) if env['debugging']: - env.Append (CCFLAGS = ['-g', '-pipe']) + env.Append (CCFLAGS = ['-g']) if env['optimising']: env.Append (CCFLAGS = '-O2') env.Append (CXXFLAGS = ['-DSTRING_UTILS_INLINED']) @@ -674,6 +690,8 @@ if env['warnings']: # ugr,huh? env.Append (LINKFLAGS = ['-Wl,--export-dynamic']) +# FIXME: ParseConfig ignores -L flag? +env.Append (LINKFLAGS = ['-L/usr/X11R6/lib']) if env['verbose']: env['__verbose'] = ' --verbose' @@ -742,10 +760,10 @@ env.Append ( # 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']),], + os.path.join (absbuild, 'kpath-guile', env['out']),], CPPPATH = [outdir, ], - LILYPOND_PATH = ['.', '$srcdir/input', + LILYPOND_PATH = ['.', + '$srcdir/input', '$srcdir/input/regression', '$srcdir/input/test', '$srcdir/input/tutorial', @@ -842,7 +860,7 @@ def symlink_tree (target, source, env): % vars ()) os.chdir (srcdir) -if env['debugging']: +if 1: #env['debugging']: stamp = os.path.join (run_prefix, 'stamp') env.Command (stamp, ['#/SConstruct', '#/VERSION'], [symlink_tree, 'touch $TARGET']) @@ -859,18 +877,20 @@ def cvs_entry_is_file (line): return line[0] == '/' and line[-2] == '/' def cvs_dirs (dir): - ENTRIES = os.path.join (dir, 'CVS/Entries') - if not os.path.exists (ENTRIES): + entries = os.path.join (dir, 'CVS/Entries') + if not os.path.exists (entries): return [] - entries = open (ENTRIES).readlines () + entries = open (entries).readlines () dir_entries = filter (cvs_entry_is_dir, entries) dirs = map (lambda x: os.path.join (dir, x[2:x[2:].index ('/')+3]), dir_entries) return dirs + map (cvs_dirs, dirs) def cvs_files (dir): - ENTRIES = os.path.join (dir, 'CVS/Entries') - entries = open (ENTRIES).readlines () + entries = os.path.join (dir, 'CVS/Entries') + if not os.path.exists (entries): + return [] + entries = open (entries).readlines () file_entries = filter (cvs_entry_is_file, entries) files = map (lambda x: x[1:x[1:].index ('/')+1], file_entries) return map (lambda x: os.path.join (dir, x), files) @@ -898,11 +918,11 @@ 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', + subdirs = ['lily', + 'flower', 'kpath-guile', - 'ttftool', 'mf', + 'python', ] if os.path.isdir ('%(srcdir)s/CVS' % vars ()):