]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Jul 2004 23:36:35 +0000 (23:36 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Jul 2004 23:36:35 +0000 (23:36 +0000)
SConstruct
buildscripts/builder.py
flower/SConscript
lily/SConscript
po/SConscript [new file with mode: 0644]
scm/SConscript
scripts/SConscript

index 539a03cf7dfc81fc9e22be0c9c30c26f24364a49..a71953922ba3fe056d0ca20ea7022ced05471950 100644 (file)
@@ -75,7 +75,7 @@ FOOSUMS = 1
 subdirs = ['flower', 'lily', 'mf', 'scm', 'ly', 'Documentation',
           'Documentation/user', 'Documentation/topdocs',
           'input', 'scripts', 'elisp',
-          'buildscripts', 'cygwin', 'debian']
+          'buildscripts', 'cygwin', 'debian', 'po']
 
 usage = r'''Usage:
 scons [KEY=VALUE].. [TARGET]..
@@ -184,6 +184,7 @@ env.Append (
        bindir = bindir,
        sharedir = sharedir,
        lilypond_datadir = sharedir_package,
+       localedir = localedir,
        local_lilypond_datadir = sharedir_package_version,
        lilypondprefix = lilypondprefix,
        sharedir_package = sharedir_package,
@@ -596,7 +597,6 @@ patch = env.PATCH (patch_name, tar_ball)
 env.Depends (patch_name, dist_ball)
 env.Alias ('release', patch)
 
-
 for d in subdirs:
        if os.path.exists (os.path.join (d, 'SConscript')):
                b = os.path.join (env['build'], d, env['out'])
index 6253bde17e3e386bbef83383917bee42a206e295..93b811300c3de6e8f6d070a5928f198bcfd6549a 100644 (file)
@@ -215,3 +215,20 @@ def at_copy (target, source, env):
 AT_COPY = Builder (action = at_copy)
 env.Append (BUILDERS = {'AT_COPY': AT_COPY})
 
+MO = Builder (action = '$MSGFMT -o $TARGET $SOURCE',
+             suffix = '.mo', src_suffix = '.po')
+env.Append (BUILDERS = {'MO': MO})
+
+a = 'xgettext --default-domain=lilypond --join \
+--output-dir=${TARGET.dir} --add-comments \
+--keyword=_ --keyword=_f --keyword=_i $SOURCES'
+POT = Builder (action = a, suffix = '.pot')
+#env.Append (BUILDERS = {'POT': POT})
+#env.Command(env['absbuild'] + '/po/' + env['out'] + '/lilypond.pot',
+env['pottarget'] = os.path.join (env['absbuild'], 'po', env['out'],
+                              'lilypond.pot')
+env['potcommand'] = a
+
+a = 'msgmerge ${SOURCE} ${TARGET.dir}/lilypond.pot -o ${TARGET}'
+POMERGE = Builder (action = a, suffix = '.pom', src_suffix = '.po')
+env.Append (BUILDERS = {'POMERGE': POMERGE})
index e4d36036e603e2782023f233d452dcaeeccf8b8f..8b7d6e9866c6bfebaaa6b7066704e27b0a41d909 100644 (file)
@@ -2,6 +2,7 @@
 
 Import ('env')
 sources = env['src_glob'] (env, '*.cc')
+includes = env['src_glob'] (env, '*.hh')
 outdir = Dir ('.').path
 
 # abs_srcdir = Dir ('.').srcnode ().abspath
@@ -14,3 +15,8 @@ if env['static']:
        e.Library (name, sources) 
 if not env['static'] or env['shared']:
        e.SharedLibrary (name, sources)
+
+#pot = env.POT (sources + includes)
+#map (lambda x: e.Depends
+pot = env.Command (env['pottarget'], sources + includes, env['potcommand'])
+env.Alias ('pot', pot)
index d027ea99e0a867daf0c1a87c9515bccdec28f0c2..224b8a4236550116bf79716edc9db37498d2dae3 100644 (file)
@@ -21,4 +21,5 @@ lily = e.Program (name, sources)
 env.Install (env['bindir'], lily)
 env.Alias ('install', env['bindir'])
 
-env.Alias ('lily', lily)
+#po = e.PO (sources + includes)
+#env.Alias ('po', po)
diff --git a/po/SConscript b/po/SConscript
new file mode 100644 (file)
index 0000000..07696b6
--- /dev/null
@@ -0,0 +1,22 @@
+# -*-python-*-
+
+Import ('env')
+pos = env['glob'] (env, '*.po')
+#pot = env['glob'] (env, '*.pot')
+#pot = 'lilypond'
+mos = map (env.MO, pos)
+dir = env['localedir']
+env.Install (dir, mos)
+env.Alias ('install', dir)
+
+
+
+outdir = Dir ('.').abspath
+env.Depends ('po', 'pot')
+env.Depends ('po', env['pottarget'])
+
+#pots = map (lambda x: outdir + '/' + x + '.po', pos)
+map (lambda x: env.Depends (outdir + '/lilypond.pot', x), pos)
+poms = map (env.POMERGE, pos)
+env.Alias ('po', poms)
+
index c0c45dd4df2fedd74d563010e3de0293466249b9..0559bbc8cdbdf69f3dfde44ce4787b37528cf907 100644 (file)
@@ -1,7 +1,7 @@
 # -*-python-*-
 
 Import ('env')
-sources = env['src_glob'] (env, '*.scm')
+sources = env['glob'] (env, '*.scm')
 dir = env['sharedir_package_version'] + '/scm'
 env.Install (dir, sources)
 env.Alias ('install', dir)
index d69b615b8ae804d041360adca05ff54daa0d6738..859c7b7cc191bf2b87e134a1945fcd8c0d3c010f 100644 (file)
@@ -8,3 +8,6 @@ gen_files = map (lambda x: os.path.splitext (x)[0], sources)
 gens = map (env.AT_COPY, sources)
 dir = env['bindir']
 env.Install (dir, gen_files)
+
+#pot = env.POT (sources)
+#env.Alias ('pot', pot)