From 3228a61e62f4136db0e8c69c8b1a503af9c536dc Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Tue, 25 Jan 2022 21:28:12 +0100 Subject: [PATCH] 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. --- gtk2_ardour/wscript | 8 ++++---- libs/appleutility/wscript | 3 --- libs/ardour/wscript | 8 ++++---- libs/gtkmm2ext/wscript | 8 ++++---- wscript | 17 ++++++++--------- 5 files changed, 20 insertions(+), 24 deletions(-) diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index ae7f48c497..1054cc94b9 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -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') diff --git a/libs/appleutility/wscript b/libs/appleutility/wscript index 51be798e82..6136aafc71 100644 --- a/libs/appleutility/wscript +++ b/libs/appleutility/wscript @@ -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 diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 30f6e861a3..b45efb06c3 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -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') diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 67e4cade26..d47ee0465a 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -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') diff --git a/wscript b/wscript index 6cf190e344..44702d2e9b 100644 --- a/wscript +++ b/wscript @@ -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):