From 3d529f4ea2b0de42aa2144dbe904e564b7b0b813 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Mon, 20 Aug 2012 23:30:34 +0200 Subject: Imported Upstream version 2.2.0 --- src/engine/SCons/Tool/386asm.py | 4 +- src/engine/SCons/Tool/386asm.xml | 2 +- src/engine/SCons/Tool/BitKeeper.py | 4 +- src/engine/SCons/Tool/BitKeeper.xml | 2 +- src/engine/SCons/Tool/CVS.py | 4 +- src/engine/SCons/Tool/CVS.xml | 2 +- src/engine/SCons/Tool/FortranCommon.py | 4 +- src/engine/SCons/Tool/GettextCommon.py | 429 +++++++++++++++++++++++++ src/engine/SCons/Tool/JavaCommon.py | 4 +- src/engine/SCons/Tool/JavaCommonTests.py | 4 +- src/engine/SCons/Tool/MSCommon/__init__.py | 4 +- src/engine/SCons/Tool/MSCommon/arch.py | 4 +- src/engine/SCons/Tool/MSCommon/common.py | 4 +- src/engine/SCons/Tool/MSCommon/netframework.py | 4 +- src/engine/SCons/Tool/MSCommon/sdk.py | 4 +- src/engine/SCons/Tool/MSCommon/vc.py | 19 +- src/engine/SCons/Tool/MSCommon/vs.py | 31 +- src/engine/SCons/Tool/Perforce.py | 4 +- src/engine/SCons/Tool/Perforce.xml | 2 +- src/engine/SCons/Tool/PharLapCommon.py | 4 +- src/engine/SCons/Tool/PharLapCommonTests.py | 4 +- src/engine/SCons/Tool/RCS.py | 4 +- src/engine/SCons/Tool/RCS.xml | 2 +- src/engine/SCons/Tool/SCCS.py | 4 +- src/engine/SCons/Tool/SCCS.xml | 2 +- src/engine/SCons/Tool/Subversion.py | 4 +- src/engine/SCons/Tool/Subversion.xml | 2 +- src/engine/SCons/Tool/ToolTests.py | 4 +- src/engine/SCons/Tool/__init__.py | 4 +- src/engine/SCons/Tool/__init__.xml | 2 +- src/engine/SCons/Tool/aixc++.py | 4 +- src/engine/SCons/Tool/aixc++.xml | 2 +- src/engine/SCons/Tool/aixcc.py | 4 +- src/engine/SCons/Tool/aixcc.xml | 2 +- src/engine/SCons/Tool/aixf77.py | 4 +- src/engine/SCons/Tool/aixf77.xml | 2 +- src/engine/SCons/Tool/aixlink.py | 4 +- src/engine/SCons/Tool/aixlink.xml | 2 +- src/engine/SCons/Tool/applelink.py | 4 +- src/engine/SCons/Tool/applelink.xml | 2 +- src/engine/SCons/Tool/ar.py | 4 +- src/engine/SCons/Tool/ar.xml | 2 +- src/engine/SCons/Tool/as.py | 4 +- src/engine/SCons/Tool/as.xml | 2 +- src/engine/SCons/Tool/bcc32.py | 4 +- src/engine/SCons/Tool/bcc32.xml | 2 +- src/engine/SCons/Tool/c++.py | 4 +- src/engine/SCons/Tool/c++.xml | 2 +- src/engine/SCons/Tool/cc.py | 4 +- src/engine/SCons/Tool/cc.xml | 2 +- src/engine/SCons/Tool/cvf.py | 4 +- src/engine/SCons/Tool/cvf.xml | 2 +- src/engine/SCons/Tool/default.py | 4 +- src/engine/SCons/Tool/default.xml | 2 +- src/engine/SCons/Tool/dmd.py | 4 +- src/engine/SCons/Tool/dmd.xml | 2 +- src/engine/SCons/Tool/dvi.py | 4 +- src/engine/SCons/Tool/dvi.xml | 2 +- src/engine/SCons/Tool/dvipdf.py | 4 +- src/engine/SCons/Tool/dvipdf.xml | 2 +- src/engine/SCons/Tool/dvips.py | 4 +- src/engine/SCons/Tool/dvips.xml | 2 +- src/engine/SCons/Tool/f03.py | 4 +- src/engine/SCons/Tool/f03.xml | 2 +- src/engine/SCons/Tool/f77.py | 4 +- src/engine/SCons/Tool/f77.xml | 2 +- src/engine/SCons/Tool/f90.py | 4 +- src/engine/SCons/Tool/f90.xml | 2 +- src/engine/SCons/Tool/f95.py | 4 +- src/engine/SCons/Tool/f95.xml | 2 +- src/engine/SCons/Tool/filesystem.py | 4 +- src/engine/SCons/Tool/fortran.py | 4 +- src/engine/SCons/Tool/fortran.xml | 2 +- src/engine/SCons/Tool/g++.py | 4 +- src/engine/SCons/Tool/g++.xml | 2 +- src/engine/SCons/Tool/g77.py | 4 +- src/engine/SCons/Tool/g77.xml | 2 +- src/engine/SCons/Tool/gas.py | 4 +- src/engine/SCons/Tool/gas.xml | 2 +- src/engine/SCons/Tool/gcc.py | 4 +- src/engine/SCons/Tool/gcc.xml | 2 +- src/engine/SCons/Tool/gettext.py | 45 +++ src/engine/SCons/Tool/gettext.xml | 200 ++++++++++++ src/engine/SCons/Tool/gfortran.py | 4 +- src/engine/SCons/Tool/gfortran.xml | 2 +- src/engine/SCons/Tool/gnulink.py | 4 +- src/engine/SCons/Tool/gnulink.xml | 2 +- src/engine/SCons/Tool/gs.py | 4 +- src/engine/SCons/Tool/gs.xml | 2 +- src/engine/SCons/Tool/hpc++.py | 4 +- src/engine/SCons/Tool/hpc++.xml | 2 +- src/engine/SCons/Tool/hpcc.py | 4 +- src/engine/SCons/Tool/hpcc.xml | 2 +- src/engine/SCons/Tool/hplink.py | 4 +- src/engine/SCons/Tool/hplink.xml | 2 +- src/engine/SCons/Tool/icc.py | 4 +- src/engine/SCons/Tool/icc.xml | 2 +- src/engine/SCons/Tool/icl.py | 4 +- src/engine/SCons/Tool/icl.xml | 2 +- src/engine/SCons/Tool/ifl.py | 4 +- src/engine/SCons/Tool/ifl.xml | 2 +- src/engine/SCons/Tool/ifort.py | 4 +- src/engine/SCons/Tool/ifort.xml | 2 +- src/engine/SCons/Tool/ilink.py | 4 +- src/engine/SCons/Tool/ilink.xml | 2 +- src/engine/SCons/Tool/ilink32.py | 4 +- src/engine/SCons/Tool/ilink32.xml | 2 +- src/engine/SCons/Tool/install.py | 4 +- src/engine/SCons/Tool/install.xml | 2 +- src/engine/SCons/Tool/intelc.py | 4 +- src/engine/SCons/Tool/intelc.xml | 2 +- src/engine/SCons/Tool/ipkg.py | 4 +- src/engine/SCons/Tool/jar.py | 4 +- src/engine/SCons/Tool/jar.xml | 2 +- src/engine/SCons/Tool/javac.py | 14 +- src/engine/SCons/Tool/javac.xml | 2 +- src/engine/SCons/Tool/javacTests.py | 102 ++++++ src/engine/SCons/Tool/javah.py | 4 +- src/engine/SCons/Tool/javah.xml | 2 +- src/engine/SCons/Tool/latex.py | 4 +- src/engine/SCons/Tool/latex.xml | 2 +- src/engine/SCons/Tool/lex.py | 4 +- src/engine/SCons/Tool/lex.xml | 2 +- src/engine/SCons/Tool/link.py | 4 +- src/engine/SCons/Tool/link.xml | 2 +- src/engine/SCons/Tool/linkloc.py | 4 +- src/engine/SCons/Tool/linkloc.xml | 2 +- src/engine/SCons/Tool/m4.py | 4 +- src/engine/SCons/Tool/m4.xml | 2 +- src/engine/SCons/Tool/masm.py | 4 +- src/engine/SCons/Tool/masm.xml | 2 +- src/engine/SCons/Tool/midl.py | 4 +- src/engine/SCons/Tool/midl.xml | 2 +- src/engine/SCons/Tool/mingw.py | 12 +- src/engine/SCons/Tool/mingw.xml | 2 +- src/engine/SCons/Tool/msgfmt.py | 102 ++++++ src/engine/SCons/Tool/msgfmt.xml | 102 ++++++ src/engine/SCons/Tool/msginit.py | 114 +++++++ src/engine/SCons/Tool/msginit.xml | 168 ++++++++++ src/engine/SCons/Tool/msgmerge.py | 98 ++++++ src/engine/SCons/Tool/msgmerge.xml | 158 +++++++++ src/engine/SCons/Tool/mslib.py | 4 +- src/engine/SCons/Tool/mslib.xml | 2 +- src/engine/SCons/Tool/mslink.py | 21 +- src/engine/SCons/Tool/mslink.xml | 4 +- src/engine/SCons/Tool/mssdk.py | 4 +- src/engine/SCons/Tool/mssdk.xml | 2 +- src/engine/SCons/Tool/msvc.py | 4 +- src/engine/SCons/Tool/msvc.xml | 2 +- src/engine/SCons/Tool/msvs.py | 81 +++-- src/engine/SCons/Tool/msvs.xml | 2 +- src/engine/SCons/Tool/msvsTests.py | 4 +- src/engine/SCons/Tool/mwcc.py | 4 +- src/engine/SCons/Tool/mwcc.xml | 2 +- src/engine/SCons/Tool/mwld.py | 4 +- src/engine/SCons/Tool/mwld.xml | 2 +- src/engine/SCons/Tool/nasm.py | 4 +- src/engine/SCons/Tool/nasm.xml | 2 +- src/engine/SCons/Tool/packaging.xml | 2 +- src/engine/SCons/Tool/packaging/__init__.py | 4 +- src/engine/SCons/Tool/packaging/__init__.xml | 2 +- src/engine/SCons/Tool/packaging/ipk.py | 4 +- src/engine/SCons/Tool/packaging/msi.py | 4 +- src/engine/SCons/Tool/packaging/rpm.py | 4 +- src/engine/SCons/Tool/packaging/src_tarbz2.py | 4 +- src/engine/SCons/Tool/packaging/src_targz.py | 4 +- src/engine/SCons/Tool/packaging/src_zip.py | 4 +- src/engine/SCons/Tool/packaging/tarbz2.py | 4 +- src/engine/SCons/Tool/packaging/targz.py | 4 +- src/engine/SCons/Tool/packaging/zip.py | 4 +- src/engine/SCons/Tool/pdf.py | 4 +- src/engine/SCons/Tool/pdf.xml | 2 +- src/engine/SCons/Tool/pdflatex.py | 4 +- src/engine/SCons/Tool/pdflatex.xml | 2 +- src/engine/SCons/Tool/pdftex.py | 4 +- src/engine/SCons/Tool/pdftex.xml | 2 +- src/engine/SCons/Tool/qt.py | 4 +- src/engine/SCons/Tool/qt.xml | 2 +- src/engine/SCons/Tool/rmic.py | 4 +- src/engine/SCons/Tool/rmic.xml | 2 +- src/engine/SCons/Tool/rpcgen.py | 4 +- src/engine/SCons/Tool/rpcgen.xml | 2 +- src/engine/SCons/Tool/rpm.py | 4 +- src/engine/SCons/Tool/sgiar.py | 4 +- src/engine/SCons/Tool/sgiar.xml | 2 +- src/engine/SCons/Tool/sgic++.py | 4 +- src/engine/SCons/Tool/sgic++.xml | 2 +- src/engine/SCons/Tool/sgicc.py | 4 +- src/engine/SCons/Tool/sgicc.xml | 2 +- src/engine/SCons/Tool/sgilink.py | 4 +- src/engine/SCons/Tool/sgilink.xml | 2 +- src/engine/SCons/Tool/sunar.py | 4 +- src/engine/SCons/Tool/sunar.xml | 2 +- src/engine/SCons/Tool/sunc++.py | 4 +- src/engine/SCons/Tool/sunc++.xml | 2 +- src/engine/SCons/Tool/suncc.py | 4 +- src/engine/SCons/Tool/suncc.xml | 2 +- src/engine/SCons/Tool/sunf77.py | 4 +- src/engine/SCons/Tool/sunf77.xml | 2 +- src/engine/SCons/Tool/sunf90.py | 4 +- src/engine/SCons/Tool/sunf90.xml | 2 +- src/engine/SCons/Tool/sunf95.py | 4 +- src/engine/SCons/Tool/sunf95.xml | 2 +- src/engine/SCons/Tool/sunlink.py | 4 +- src/engine/SCons/Tool/sunlink.xml | 2 +- src/engine/SCons/Tool/swig.py | 4 +- src/engine/SCons/Tool/swig.xml | 2 +- src/engine/SCons/Tool/tar.py | 4 +- src/engine/SCons/Tool/tar.xml | 2 +- src/engine/SCons/Tool/tex.py | 90 +++++- src/engine/SCons/Tool/tex.xml | 2 +- src/engine/SCons/Tool/textfile.py | 4 +- src/engine/SCons/Tool/textfile.xml | 4 +- src/engine/SCons/Tool/tlib.py | 4 +- src/engine/SCons/Tool/tlib.xml | 2 +- src/engine/SCons/Tool/wix.py | 4 +- src/engine/SCons/Tool/xgettext.py | 333 +++++++++++++++++++ src/engine/SCons/Tool/xgettext.xml | 288 +++++++++++++++++ src/engine/SCons/Tool/yacc.py | 4 +- src/engine/SCons/Tool/yacc.xml | 2 +- src/engine/SCons/Tool/zip.py | 4 +- src/engine/SCons/Tool/zip.xml | 2 +- 222 files changed, 2638 insertions(+), 401 deletions(-) create mode 100644 src/engine/SCons/Tool/GettextCommon.py create mode 100644 src/engine/SCons/Tool/gettext.py create mode 100644 src/engine/SCons/Tool/gettext.xml create mode 100644 src/engine/SCons/Tool/javacTests.py create mode 100644 src/engine/SCons/Tool/msgfmt.py create mode 100644 src/engine/SCons/Tool/msgfmt.xml create mode 100644 src/engine/SCons/Tool/msginit.py create mode 100644 src/engine/SCons/Tool/msginit.xml create mode 100644 src/engine/SCons/Tool/msgmerge.py create mode 100644 src/engine/SCons/Tool/msgmerge.xml create mode 100644 src/engine/SCons/Tool/xgettext.py create mode 100644 src/engine/SCons/Tool/xgettext.xml (limited to 'src/engine/SCons/Tool') diff --git a/src/engine/SCons/Tool/386asm.py b/src/engine/SCons/Tool/386asm.py index 27748cb..bf32a0b 100644 --- a/src/engine/SCons/Tool/386asm.py +++ b/src/engine/SCons/Tool/386asm.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/386asm.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/386asm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.PharLapCommon import addPharLapPaths import SCons.Util diff --git a/src/engine/SCons/Tool/386asm.xml b/src/engine/SCons/Tool/386asm.xml index 8d45681..df5adb1 100644 --- a/src/engine/SCons/Tool/386asm.xml +++ b/src/engine/SCons/Tool/386asm.xml @@ -1,5 +1,5 @@ + + +This is actually a toolset, which supports internationalization and +localization of sofware being constructed with SCons. The toolset loads +following tools: + + + + &t-link-xgettext; - to extract internationalized messages from source code to + POT file(s), + + + &t-link-msginit; - may be optionally used to initialize PO + files, + + + &t-link-msgmerge; - to update PO files, that already contain + translated messages, + + &t-link-msgfmt; - to compile textual PO file to binary + installable MO file. + + + +When you enable &t-gettext;, it internally loads all abovementioned tools, +so you're encouraged to see their individual documentation. + +Each of the above tools provides its own builder(s) which may be used to +perform particular activities related to software internationalization. You +may be however interested in top-level builder +&b-Translate; described few paragraphs later. + +To use &t-gettext; tools add 'gettext' tool to your +environment: + + env = Environment( tools = ['default', 'gettext'] ) + + + + + + + + + + + +This pseudo-builder belongs to &t-link-gettext; toolset. The builder extracts +internationalized messages from source files, updates POT +template (if necessary) and then updates PO translations (if +necessary). If &cv-link-POAUTOINIT; is set, missing PO files +will be automatically created (i.e. without translator person intervention). +The variables &cv-link-LINGUAS_FILE; and &cv-link-POTDOMAIN; are taken into +acount too. All other construction variables used by &b-link-POTUpdate;, and +&b-link-POUpdate; work here too. + +Example 1. +The simplest way is to specify input files and output languages inline in +a SCons script when invoking &b-Translate; + +# SConscript in 'po/' directory +env = Environment( tools = ["default", "gettext"] ) +env['POAUTOINIT'] = 1 +env.Translate(['en','pl'], ['../a.cpp','../b.cpp']) + + +Example 2. +If you wish, you may also stick to conventional style known from +autotools, i.e. using +POTFILES.in and LINGUAS files + +# LINGUAS +en pl +#end + + + +# POTFILES.in +a.cpp +b.cpp +# end + + + +# SConscript +env = Environment( tools = ["default", "gettext"] ) +env['POAUTOINIT'] = 1 +env['XGETTEXTPATH'] = ['../'] +env.Translate(LINGUAS_FILE = 1, XGETTEXTFROM = 'POTFILES.in') + + +The last approach is perhaps the recommended one. It allows easily split +internationalization/localization onto separate SCons scripts, where a script +in source tree is responsible for translations (from sources to +PO files) and script(s) under variant directories are +responsible for compilation of PO to MO +files to and for installation of MO files. The "gluing +factor" synchronizing these two scripts is then the content of +LINGUAS file. Note, that the updated +POT and PO files are usually going to be +committed back to the repository, so they must be updated within the source +directory (and not in variant directories). Additionaly, the file listing of +po/ directory contains LINGUAS file, +so the source tree looks familiar to translators, and they may work with the +project in their usual way. + +Example 3. +Let's prepare a development tree as below + + project/ + + SConstruct + + build/ + + src/ + + po/ + + SConscript + + SConscript.i18n + + POTFILES.in + + LINGUAS + +with build being variant directory. Write the top-level +SConstruct script as follows + + # SConstruct + env = Environment( tools = ["default", "gettext"] ) + VariantDir('build', 'src', duplicate = 0) + env['POAUTOINIT'] = 1 + SConscript('src/po/SConscript.i18n', exports = 'env') + SConscript('build/po/SConscript', exports = 'env') + +the src/po/SConscript.i18n as + + # src/po/SConscript.i18n + Import('env') + env.Translate(LINGUAS_FILE=1, XGETTEXTFROM='POTFILES.in', XGETTEXTPATH=['../']) + +and the src/po/SConscript + + # src/po/SConscript + Import('env') + env.MOFiles(LINGUAS_FILE = 1) + +Such setup produces POT and PO files +under source tree in src/po/ and binary +MO files under variant tree in +build/po/. This way the POT and +PO files are separated from other output files, which must +not be committed back to source repositories (e.g. MO +files). + +In above example, the PO files are not updated, +nor created automatically when you issue scons '.' command. +The files must be updated (created) by hand via scons +po-update and then MO files can be compiled by +running scons '.'. + + + + + + +The &cv-POTDOMAIN; defines default domain, used to generate +POT filename as &cv-POTDOMAIN;.pot when +no POT file name is provided by the user. This applies to +&b-link-POTUpdate;, &b-link-POInit; and &b-link-POUpdate; builders (and +builders, that use them, e.g. &b-Translate;). Normally (if &cv-POTDOMAIN; is +not defined), the builders use messages.pot as default +POT file name. + + + + + +The &cv-POAUTOINIT; variable, if set to True (on non-zero +numeric value), let the &t-link-msginit; tool to automatically initialize +missing PO files with +msginit(1). This applies to both, +&b-link-POInit; and &b-link-POUpdate; builders (and others that use any of +them). + + + + + +The &cv-LINGUAS_FILE; defines file(s) containing list of additional linguas +to be processed by &b-link-POInit;, &b-link-POUpdate; or &b-link-MOFiles; +builders. It also affects &b-link-Translate; builder. If the variable contains +a string, it defines name of the list file. The &cv-LINGUAS_FILE; may be a +list of file names as well. If &cv-LINGUAS_FILE; is set to +True (or non-zero numeric value), the list will be read from +default file named +LINGUAS. + + + diff --git a/src/engine/SCons/Tool/gfortran.py b/src/engine/SCons/Tool/gfortran.py index 143af4c..2f9bddc 100644 --- a/src/engine/SCons/Tool/gfortran.py +++ b/src/engine/SCons/Tool/gfortran.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gfortran.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/gfortran.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/src/engine/SCons/Tool/gfortran.xml b/src/engine/SCons/Tool/gfortran.xml index a6a6850..8544c31 100644 --- a/src/engine/SCons/Tool/gfortran.xml +++ b/src/engine/SCons/Tool/gfortran.xml @@ -1,5 +1,5 @@ + + +This scons tool is a part of scons &t-link-gettext; toolset. It provides scons +interface to msgfmt(1) command, which generates binary +message catalog (MO) from a textual translation description +(PO). + + +MOSUFFIX +MSGFMT +MSGFMTCOM +MSGFMTCOMSTR +MSGFMTFLAGS +POSUFFIX + + +LINGUAS_FILE + + + + + +This builder belongs to &t-link-msgfmt; tool. The builder compiles +PO files to MO files. + +Example 1. +Create pl.mo and en.mo by compiling +pl.po and en.po: + + # ... + env.MOFiles(['pl', 'en']) + + +Example 2. +Compile files for languages defined in LINGUAS file: + + # ... + env.MOFiles(LINGUAS_FILE = 1) + + +Example 3. +Create pl.mo and en.mo by compiling +pl.po and en.po plus files for +languages defined in LINGUAS file: + + # ... + env.MOFiles(['pl', 'en'], LINGUAS_FILE = 1) + + +Example 4. +Compile files for languages defined in LINGUAS file +(another version): + + # ... + env['LINGUAS_FILE'] = 1 + env.MOFiles() + + + + + + +Suffix used for MO files (default: '.mo'). +See &t-link-msgfmt; tool and &b-link-MOFiles; builder. + + + + + +Absolute path to msgfmt(1) binary, found by +Detect(). +See &t-link-msgfmt; tool and &b-link-MOFiles; builder. + + + + + +Complete command line to run msgfmt(1) program. +See &t-link-msgfmt; tool and &b-link-MOFiles; builder. + + + + + +String to display when msgfmt(1) is invoked +(default: '', which means ``print &cv-link-MSGFMTCOM;''). +See &t-link-msgfmt; tool and &b-link-MOFiles; builder. + + + + + +Additional flags to msgfmt(1). +See &t-link-msgfmt; tool and &b-link-MOFiles; builder. + + diff --git a/src/engine/SCons/Tool/msginit.py b/src/engine/SCons/Tool/msginit.py new file mode 100644 index 0000000..210fbca --- /dev/null +++ b/src/engine/SCons/Tool/msginit.py @@ -0,0 +1,114 @@ +""" msginit tool + +Tool specific initialization of msginit tool. +""" + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/msginit.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +import SCons.Warnings +import SCons.Builder +import re + +############################################################################# +def _optional_no_translator_flag(env): + """ Return '--no-translator' flag if we run *msginit(1)* in non-interactive + mode.""" + import SCons.Util + if env.has_key('POAUTOINIT'): + autoinit = env['POAUTOINIT'] + else: + autoinit = False + if autoinit: + return [SCons.Util.CLVar('--no-translator')] + else: + return [SCons.Util.CLVar('')] +############################################################################# + +############################################################################# +def _POInitBuilder(env, **kw): + """ Create builder object for `POInit` builder. """ + import SCons.Action + from SCons.Tool.GettextCommon import _init_po_files, _POFileBuilder + action = SCons.Action.Action(_init_po_files, None) + return _POFileBuilder(env, action=action, target_alias='$POCREATE_ALIAS') +############################################################################# + +############################################################################# +from SCons.Environment import _null +############################################################################# +def _POInitBuilderWrapper(env, target=None, source=_null, **kw): + """ Wrapper for _POFileBuilder. We use it to make user's life easier. + + This wrapper checks for `$POTDOMAIN` construction variable (or override in + `**kw`) and treats it appropriatelly. + """ + if source is _null: + if 'POTDOMAIN' in kw: + domain = kw['POTDOMAIN'] + elif env.has_key('POTDOMAIN'): + domain = env['POTDOMAIN'] + else: + domain = 'messages' + source = [ domain ] # NOTE: Suffix shall be appended automatically + return env._POInitBuilder(target, source, **kw) +############################################################################# + +############################################################################# +def generate(env,**kw): + """ Generate the `msginit` tool """ + import SCons.Util + from SCons.Tool.GettextCommon import _detect_msginit + env['MSGINIT'] = _detect_msginit(env) + msginitcom = '$MSGINIT ${_MSGNoTranslator(__env__)} -l ${_MSGINITLOCALE}' \ + + ' $MSGINITFLAGS -i $SOURCE -o $TARGET' + # NOTE: We set POTSUFFIX here, in case the 'xgettext' is not loaded + # (sometimes we really don't need it) + env.SetDefault( + POSUFFIX = ['.po'], + POTSUFFIX = ['.pot'], + _MSGINITLOCALE = '${TARGET.filebase}', + _MSGNoTranslator = _optional_no_translator_flag, + MSGINITCOM = msginitcom, + MSGINITCOMSTR = '', + MSGINITFLAGS = [ ], + POAUTOINIT = False, + POCREATE_ALIAS = 'po-create' + ) + env.Append( BUILDERS = { '_POInitBuilder' : _POInitBuilder(env) } ) + env.AddMethod(_POInitBuilderWrapper, 'POInit') + env.AlwaysBuild(env.Alias('$POCREATE_ALIAS')) +############################################################################# + +############################################################################# +def exists(env): + """ Check if the tool exists """ + from SCons.Tool.GettextCommon import _msginit_exists + return _msginit_exists(env) +############################################################################# + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/src/engine/SCons/Tool/msginit.xml b/src/engine/SCons/Tool/msginit.xml new file mode 100644 index 0000000..34b2795 --- /dev/null +++ b/src/engine/SCons/Tool/msginit.xml @@ -0,0 +1,168 @@ + + + +This scons tool is a part of scons &t-link-gettext; toolset. It provides +scons interface to msginit(1) program, which creates new +PO file, initializing the meta information with values from +user's environment (or options). + + +MSGINIT +MSGINITCOM +MSGINITCOMSTR +MSGINITFLAGS +POAUTOINIT +POCREATE_ALIAS +POSUFFIX +POTSUFFIX +_MSGINITLOCALE + + +POTDOMAIN +LINGUAS_FILE +POAUTOINIT + + + + + +This builder belongs to &t-link-msginit; tool. The builder initializes missing +PO file(s) if &cv-link-POAUTOINIT; is set. If +&cv-link-POAUTOINIT; is not set (default), &b-POInit; prints instruction for +user (that is supposed to be a translator), telling how the +PO file should be initialized. In normal projects +you should not use &b-POInit; and use &b-link-POUpdate; +instead. &b-link-POUpdate; chooses intelligently between +msgmerge(1) and msginit(1). &b-POInit; +always uses msginit(1) and should be regarded as builder for +special purposes or for temporary use (e.g. for quick, one time initialization +of a bunch of PO files) or for tests. + +Target nodes defined through &b-POInit; are not built by default (they're +Ignored from '.' node) but are added to +special Alias ('po-create' by default). +The alias name may be changed through the &cv-link-POCREATE_ALIAS; +construction variable. All PO files defined through +&b-POInit; may be easily initialized by scons po-create. + +Example 1. +Initialize en.po and pl.po from +messages.pot: + + # ... + env.POInit(['en', 'pl']) # messages.pot --> [en.po, pl.po] + + +Example 2. +Initialize en.po and pl.po from +foo.pot: + + # ... + env.POInit(['en', 'pl'], ['foo']) # foo.pot --> [en.po, pl.po] + + +Example 3. +Initialize en.po and pl.po from +foo.pot but using &cv-link-POTDOMAIN; construction +variable: + + # ... + env.POInit(['en', 'pl'], POTDOMAIN='foo') # foo.pot --> [en.po, pl.po] + + +Example 4. +Initialize PO files for languages defined in +LINGUAS file. The files will be initialized from template +messages.pot: + + # ... + env.POInit(LINGUAS_FILE = 1) # needs 'LINGUAS' file + + +Example 5. +Initialize en.po and pl.pl +PO files plus files for languages defined in +LINGUAS file. The files will be initialized from template +messages.pot: + + # ... + env.POInit(['en', 'pl'], LINGUAS_FILE = 1) + + +Example 6. +You may preconfigure your environment first, and then initialize +PO files: + + # ... + env['POAUTOINIT'] = 1 + env['LINGUAS_FILE'] = 1 + env['POTDOMAIN'] = 'foo' + env.POInit() + +which has same efect as: + + # ... + env.POInit(POAUTOINIT = 1, LINGUAS_FILE = 1, POTDOMAIN = 'foo') + + + + + + + +Common alias for all PO files created with &b-POInit; +builder (default: 'po-create'). +See &t-link-msginit; tool and &b-link-POInit; builder. + + + + + +Suffix used for PO files (default: '.po') +See &t-link-msginit; tool and &b-link-POInit; builder. + + + + + +Path to msginit(1) program (found via +Detect()). +See &t-link-msginit; tool and &b-link-POInit; builder. + + + + + +Complete command line to run msginit(1) program. +See &t-link-msginit; tool and &b-link-POInit; builder. + + + + + +String to display when msginit(1) is invoked +(default: '', which means ``print &cv-link-MSGINITCOM;''). +See &t-link-msginit; tool and &b-link-POInit; builder. + + + + + +List of additional flags to msginit(1) (default: +[]). +See &t-link-msginit; tool and &b-link-POInit; builder. + + + + + +Internal ``macro''. Computes locale (language) name based on target filename +(default: '${TARGET.filebase}' ). + +See &t-link-msginit; tool and &b-link-POInit; builder. + diff --git a/src/engine/SCons/Tool/msgmerge.py b/src/engine/SCons/Tool/msgmerge.py new file mode 100644 index 0000000..2bc89f4 --- /dev/null +++ b/src/engine/SCons/Tool/msgmerge.py @@ -0,0 +1,98 @@ +""" msgmerget tool + +Tool specific initialization for `msgmerge` tool. +""" + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/msgmerge.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +############################################################################# +def _update_or_init_po_files(target, source, env): + """ Action function for `POUpdate` builder """ + import SCons.Action + from SCons.Tool.GettextCommon import _init_po_files + for tgt in target: + if tgt.rexists(): + action = SCons.Action.Action('$MSGMERGECOM', '$MSGMERGECOMSTR') + else: + action = _init_po_files + status = action([tgt], source, env) + if status : return status + return 0 +############################################################################# + +############################################################################# +def _POUpdateBuilder(env, **kw): + """ Create an object of `POUpdate` builder """ + import SCons.Action + from SCons.Tool.GettextCommon import _POFileBuilder + action = SCons.Action.Action(_update_or_init_po_files, None) + return _POFileBuilder(env, action=action, target_alias='$POUPDATE_ALIAS') +############################################################################# + +############################################################################# +from SCons.Environment import _null +############################################################################# +def _POUpdateBuilderWrapper(env, target=None, source=_null, **kw): + """ Wrapper for `POUpdate` builder - make user's life easier """ + if source is _null: + if 'POTDOMAIN' in kw: + domain = kw['POTDOMAIN'] + elif env.has_key('POTDOMAIN') and env['POTDOMAIN']: + domain = env['POTDOMAIN'] + else: + domain = 'messages' + source = [ domain ] # NOTE: Suffix shall be appended automatically + return env._POUpdateBuilder(target, source, **kw) +############################################################################# + +############################################################################# +def generate(env,**kw): + """ Generate the `xgettext` tool """ + from SCons.Tool.GettextCommon import _detect_msgmerge + env['MSGMERGE'] = _detect_msgmerge(env) + env.SetDefault( + POTSUFFIX = ['.pot'], + POSUFFIX = ['.po'], + MSGMERGECOM = '$MSGMERGE $MSGMERGEFLAGS --update $TARGET $SOURCE', + MSGMERGECOMSTR = '', + MSGMERGEFLAGS = [ ], + POUPDATE_ALIAS = 'po-update' + ) + env.Append(BUILDERS = { '_POUpdateBuilder':_POUpdateBuilder(env) }) + env.AddMethod(_POUpdateBuilderWrapper, 'POUpdate') + env.AlwaysBuild(env.Alias('$POUPDATE_ALIAS')) +############################################################################# + +############################################################################# +def exists(env): + """ Check if the tool exists """ + from SCons.Tool.GettextCommon import _msgmerge_exists + return _msgmerge_exists(env) +############################################################################# + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/src/engine/SCons/Tool/msgmerge.xml b/src/engine/SCons/Tool/msgmerge.xml new file mode 100644 index 0000000..43a5b69 --- /dev/null +++ b/src/engine/SCons/Tool/msgmerge.xml @@ -0,0 +1,158 @@ + + + +This scons tool is a part of scons &t-link-gettext; toolset. It provides +scons interface to msgmerge(1) command, which merges two +Uniform style .po files together. + + +MSGMERGE +MSGMERGECOM +MSGMERGECOMSTR +MSGMERGEFLAGS +POSUFFIX +POTSUFFIX +POUPDATE_ALIAS + + +POTDOMAIN +LINGUAS_FILE +POAUTOINIT + + + + + +The builder belongs to &t-link-msgmerge; tool. The builder updates +PO files with msgmerge(1), or initializes +missing PO files as described in documentation of +&t-link-msginit; tool and &b-link-POInit; builder (see also +&cv-link-POAUTOINIT;). Note, that &b-POUpdate; does not add its +targets to po-create alias as &b-link-POInit; +does. + +Target nodes defined through &b-POUpdate; are not built by default +(they're Ignored from '.' node). Instead, +they are added automatically to special Alias +('po-update' by default). The alias name may be changed +through the &cv-link-POUPDATE_ALIAS; construction variable. You can easilly +update PO files in your project by scons +po-update. + +Example 1. +Update en.po and pl.po from +messages.pot template (see also &cv-link-POTDOMAIN;), +assuming that the later one exists or there is rule to build it (see +&b-link-POTUpdate;): + + # ... + env.POUpdate(['en','pl']) # messages.pot --> [en.po, pl.po] + + +Example 2. +Update en.po and pl.po from +foo.pot template: + + # ... + env.POUpdate(['en', 'pl'], ['foo']) # foo.pot --> [en.po, pl.pl] + + +Example 3. +Update en.po and pl.po from +foo.pot (another version): + + # ... + env.POUpdate(['en', 'pl'], POTDOMAIN='foo') # foo.pot -- > [en.po, pl.pl] + + +Example 4. +Update files for languages defined in LINGUAS file. The +files are updated from messages.pot template: + + # ... + env.POUpdate(LINGUAS_FILE = 1) # needs 'LINGUAS' file + + +Example 5. +Same as above, but update from foo.pot template: + + # ... + env.POUpdate(LINGUAS_FILE = 1, source = ['foo']) + + +Example 6. +Update en.po and pl.po plus files for +languages defined in LINGUAS file. The files are updated +from messages.pot template: + + # produce 'en.po', 'pl.po' + files defined in 'LINGUAS': + env.POUpdate(['en', 'pl' ], LINGUAS_FILE = 1) + + +Example 7. +Use &cv-link-POAUTOINIT; to automatically initialize PO file +if it doesn't exist: + + # ... + env.POUpdate(LINGUAS_FILE = 1, POAUTOINIT = 1) + + +Example 8. +Update PO files for languages defined in +LINGUAS file. The files are updated from +foo.pot template. All necessary settings are +pre-configured via environment. + + # ... + env['POAUTOINIT'] = 1 + env['LINGUAS_FILE'] = 1 + env['POTDOMAIN'] = 'foo' + env.POUpdate() + + + + + + + + +Common alias for all PO files being defined with +&b-link-POUpdate; builder (default: 'po-update'). +See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + + + + +Absolute path to msgmerge(1) binary as found by +Detect(). +See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + + + + +Complete command line to run msgmerge(1) command. +See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + + + + +String to be displayed when msgmerge(1) is invoked +(default: '', which means ``print &cv-link-MSGMERGECOM;''). +See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + + + + +Additional flags to msgmerge(1) command. +See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + diff --git a/src/engine/SCons/Tool/mslib.py b/src/engine/SCons/Tool/mslib.py index cbd1cd7..82ea503 100644 --- a/src/engine/SCons/Tool/mslib.py +++ b/src/engine/SCons/Tool/mslib.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mslib.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/mslib.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/src/engine/SCons/Tool/mslib.xml b/src/engine/SCons/Tool/mslib.xml index a25bb6d..0ab927d 100644 --- a/src/engine/SCons/Tool/mslib.xml +++ b/src/engine/SCons/Tool/mslib.xml @@ -1,5 +1,5 @@ + + +This scons tool is a part of scons &t-link-gettext; toolset. It provides +scons interface to xgettext(1) +program, which extracts internationalized messages from source code. The tool +provides &b-POTUpdate; builder to make PO +Template files. + + +POTSUFFIX +POTUPDATE_ALIAS +XGETTEXTCOM +XGETTEXTCOMSTR +XGETTEXTFLAGS +XGETTEXTFROM +XGETTEXTFROMPREFIX +XGETTEXTFROMSUFFIX +XGETTEXTPATH +XGETTEXTPATHPREFIX +XGETTEXTPATHSUFFIX +_XGETTEXTDOMAIN +_XGETTEXTFROMFLAGS +_XGETTEXTPATHFLAGS + + +POTDOMAIN + + + + + +The builder belongs to &t-link-xgettext; tool. The builder updates target +POT file if exists or creates one if it doesn't. The node is +not built by default (i.e. it is Ignored from +'.'), but only on demand (i.e. when given +POT file is required or when special alias is invoked). This +builder adds its targe node (messages.pot, say) to a +special alias (pot-update by default, see +&cv-link-POTUPDATE_ALIAS;) so you can update/create them easily with +scons pot-update. The file is not written until there is no +real change in internationalized messages (or in comments that enter +POT file). + + You may see xgettext(1) being invoked by the +&t-link-xgettext; tool even if there is no real change in internationalized +messages (so the POT file is not being updated). This +happens every time a source file has changed. In such case we invoke +xgettext(1) and compare its output with the content of +POT file to decide whether the file should be updated or +not. + +Example 1. +Let's create po/ directory and place following +SConstruct script there: + + # SConstruct in 'po/' subdir + env = Environment( tools = ['default', 'xgettext'] ) + env.POTUpdate(['foo'], ['../a.cpp', '../b.cpp']) + env.POTUpdate(['bar'], ['../c.cpp', '../d.cpp']) + +Then invoke scons few times: + + user@host:$ scons # Does not create foo.pot nor bar.pot + user@host:$ scons foo.pot # Updates or creates foo.pot + user@host:$ scons pot-update # Updates or creates foo.pot and bar.pot + user@host:$ scons -c # Does not clean foo.pot nor bar.pot. + +the results shall be as the comments above say. + +Example 2. +The &b-POTUpdate; builder may be used with no target specified, in which +case default target messages.pot will be used. The +default target may also be overriden by setting &cv-link-POTDOMAIN; construction +variable or providing it as an override to &b-POTUpdate; builder: + + # SConstruct script + env = Environment( tools = ['default', 'xgettext'] ) + env['POTDOMAIN'] = "foo" + env.POTUpdate(source = ["a.cpp", "b.cpp"]) # Creates foo.pot ... + env.POTUpdate(POTDOMAIN = "bar", source = ["c.cpp", "d.cpp"]) # and bar.pot + + +Example 3. +The sources may be specified within separate file, for example +POTFILES.in: + + # POTFILES.in in 'po/' subdirectory + ../a.cpp + ../b.cpp + # end of file + +The name of the file (POTFILES.in) containing the list of +sources is provided via &cv-link-XGETTEXTFROM;: + + # SConstruct file in 'po/' subdirectory + env = Environment( tools = ['default', 'xgettext'] ) + env.POTUpdate(XGETTEXTFROM = 'POTFILES.in') + + +Example 4. +You may use &cv-link-XGETTEXTPATH; to define source search path. Assume, for +example, that you have files a.cpp, +b.cpp, po/SConstruct, +po/POTFILES.in. Then your POT-related +files could look as below: + + # POTFILES.in in 'po/' subdirectory + a.cpp + b.cpp + # end of file + + + + # SConstruct file in 'po/' subdirectory + env = Environment( tools = ['default', 'xgettext'] ) + env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH='../') + + +Example 5. +Multiple search directories may be defined within a list, i.e. +XGETTEXTPATH = ['dir1', 'dir2', ...]. The order in the list +determines the search order of source files. The path to the first file found +is used. + +Let's create 0/1/po/SConstruct script: + + # SConstruct file in '0/1/po/' subdirectory + env = Environment( tools = ['default', 'xgettext'] ) + env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH=['../', '../../']) + +and 0/1/po/POTFILES.in: + + # POTFILES.in in '0/1/po/' subdirectory + a.cpp + # end of file + +Write two *.cpp files, the first one is +0/a.cpp: + + /* 0/a.cpp */ + gettext("Hello from ../../a.cpp") + +and the second is 0/1/a.cpp: + + /* 0/1/a.cpp */ + gettext("Hello from ../a.cpp") + +then run scons. You'll obtain 0/1/po/messages.pot with the +message "Hello from ../a.cpp". When you reverse order in +$XGETTEXTFOM, i.e. when you write SConscript as + + # SConstruct file in '0/1/po/' subdirectory + env = Environment( tools = ['default', 'xgettext'] ) + env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH=['../../', '../']) + then the messages.pot will contain +msgid "Hello from ../../a.cpp" line and not +msgid "Hello from ../a.cpp". + + + + + + + + +Suffix used for PO Template files (default: '.pot'). +See &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +Name of the common phony target for all PO Templates created with +&b-link-POUpdate; (default: 'pot-update'). +See &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +Path to xgettext(1) program (found via +Detect()). +See &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +Complete xgettext command line. +See &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +A string that is shown when xgettext(1) command is invoked +(default: '', which means "print &cv-link-XGETTEXTCOM;"). +See &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +Additional flags to xgettext(1). +See &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +Name of file containing list of xgettext(1)'s source +files. Autotools' users know this as POTFILES.in so they +will in most cases set XGETTEXTFROM="POTFILES.in" here. +The &cv-XGETTEXTFROM; files have same syntax and semantics as the well known +GNU POTFILES.in. +See &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +List of directories, there xgettext(1) will look for +source files (default: []). + +This variable works only together with &cv-link-XGETTEXTFROM; + +See also &t-link-xgettext; tool and &b-link-POTUpdate; builder. + + + + + +This flag is used to add single search path to +xgettext(1)'s commandline (default: +'-D'). + + + + + +(default: '') + + + + + +This flag is used to add single &cv-link-XGETTEXTFROM; file to +xgettext(1)'s commandline (default: +'-f'). + + + + + +(default: '') + + + + + +Internal "macro". Generates xgettext domain name +form source and target (default: '${TARGET.filebase}'). + + + + + +Internal "macro". Genrates list of -D<dir> flags +from the &cv-link-XGETTEXTPATH; list. + + + + + +Internal "macro". Generates list of -f<file> flags +from &cv-link-XGETTEXTFROM;. + + + + diff --git a/src/engine/SCons/Tool/yacc.py b/src/engine/SCons/Tool/yacc.py index 60e1a83..580fe76 100644 --- a/src/engine/SCons/Tool/yacc.py +++ b/src/engine/SCons/Tool/yacc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/yacc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/yacc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/src/engine/SCons/Tool/yacc.xml b/src/engine/SCons/Tool/yacc.xml index b69afbc..c4d2762 100644 --- a/src/engine/SCons/Tool/yacc.xml +++ b/src/engine/SCons/Tool/yacc.xml @@ -1,5 +1,5 @@