From 5fea9404feebd540ae55203228f48e786e25abac 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 doesn't 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 f5ed70eac89..a28829c48fe 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -962,26 +962,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 496eb3da9eb..949db329492 100644 --- a/libs/appleutility/wscript +++ b/libs/appleutility/wscript @@ -51,6 +51,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 1ca9653a6a6..eb84b5c405a 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 67e4cade268..d47ee0465a9 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 07253f85a96..6d87acf6e61 100644 --- a/wscript +++ b/wscript @@ -1677,31 +1677,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):