13
0

wscript: the i18n worker functions do not define the i18n waf commands

Rename the worker functions to make it clear that their name in this
case isn't magic. These functions "are not" the waf commands. It is the
custom build context class definitions that define the i18n commands ...
which will invoke these top level worker functions which in turn invoke
the others recursively.

The bare printing of the build environment in the top level i18n command
seems to be old debug code that safely can be removed.
This commit is contained in:
Mads Kiilerich 2022-01-25 21:28:12 +01:00 committed by Paul Davis
parent 27acda4ccd
commit 3228a61e62
5 changed files with 20 additions and 24 deletions

View File

@ -968,26 +968,26 @@ def build(bld):
bld.install_as (os.path.join(os.path.normpath(bld.env['LOCALEDIR']), lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
mo)
def i18n(bld):
def i18n_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_pot(bld)
appdata_i18n_po(bld)
def i18n_pot(bld):
def i18n_pot_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n_pot(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_pot(bld)
def i18n_po(bld):
def i18n_po_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n_po(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_po(bld)
def i18n_mo(bld):
def i18n_mo_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n_mo(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')

View File

@ -42,6 +42,3 @@ def build(bld):
obj.name = 'libappleutility'
obj.target = 'appleutility'
obj.install_path = os.path.join(bld.env['LIBDIR'], 'appleutility')
def i18n(bld):
pass

View File

@ -736,18 +736,18 @@ def create_ardour_test_program(bld, includes, name, target, sources):
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]
def i18n(bld):
def i18n_func(bld):
autowaf.build_i18n(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
'Paul Davis')
def i18n_pot(bld):
def i18n_pot_func(bld):
autowaf.build_i18n(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
'Paul Davis')
def i18n_po(bld):
def i18n_po_func(bld):
autowaf.build_i18n_po(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
'Paul Davis')
def i18n_mo(bld):
def i18n_mo_func(bld):
autowaf.build_i18n_mo(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
'Paul Davis')

View File

@ -99,18 +99,18 @@ def build(bld):
bld.install_as (os.path.join(os.path.normpath(bld.env['LOCALEDIR']), lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
mo)
def i18n(bld):
def i18n_func(bld):
autowaf.build_i18n(bld, '.', 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
'Paul Davis')
def i18n_pot(bld):
def i18n_pot_func(bld):
autowaf.build_i18n_pot(bld, '.', 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
'Paul Davis')
def i18n_po(bld):
def i18n_po_func(bld):
autowaf.build_i18n_po(bld, '.', 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
'Paul Davis')
def i18n_mo(bld):
def i18n_mo_func(bld):
autowaf.build_i18n_mo(bld, '.', 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
'Paul Davis')

17
wscript
View File

@ -1638,31 +1638,30 @@ def build(bld):
class _i18n_build_context(BuildContext):
cmd = 'i18n'
fun = 'i18n'
fun = 'i18n_func'
def i18n(bld):
print(bld.env)
def i18n_func(bld):
bld.recurse (i18n_children)
class _i18n_pot_build_context(BuildContext):
cmd = 'i18n_pot'
fun = 'i18n_pot'
fun = 'i18n_pot_func'
def i18n_pot(bld):
def i18n_pot_func(bld):
bld.recurse (i18n_children)
class _i18n_po_build_context(BuildContext):
cmd = 'i18n_po'
fun = 'i18n_po'
fun = 'i18n_po_func'
def i18n_po(bld):
def i18n_po_func(bld):
bld.recurse (i18n_children)
class _i18n_mo_build_context(BuildContext):
cmd = 'i18n_mo'
fun = 'i18n_mo'
fun = 'i18n_mo_func'
def i18n_mo(bld):
def i18n_mo_func(bld):
bld.recurse (i18n_children)
def tarball(bld):