Skip to content

Commit

Permalink
wscript: the i18n worker functions doesn't define the i18n waf commands
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kiilerix committed Jul 24, 2024
1 parent 02d0cab commit 5fea940
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 24 deletions.
8 changes: 4 additions & 4 deletions gtk2_ardour/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
3 changes: 0 additions & 3 deletions libs/appleutility/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions libs/ardour/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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')
8 changes: 4 additions & 4 deletions libs/gtkmm2ext/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 8 additions & 9 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 5fea940

Please sign in to comment.