Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wscript: Cleanup around 'ardour' + MAJOR #907

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wscript: Use INTERNAL_NAME instead of 'ardour' + MAJOR
Replace repeated hardcoded appending of MAJOR with reuse of the existing
computed name, which is as available in env, exactly as MAJOR was.

Note: INTERNAL_NAME will sometimes be used with a prefix like 'gtk2_' or
'lib', or a suffix like '-lua'.
  • Loading branch information
kiilerix committed Oct 23, 2024
commit d4891db6c1eb763d3a20885a618fd967b1798b08
12 changes: 6 additions & 6 deletions gtk2_ardour/wscript
Original file line number Diff line number Diff line change
@@ -520,7 +520,7 @@ def configure(conf):
conf.env['define_key'] = bak

def build(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']

# Tool to dump lua-bindings (of gtk2ardour + libs)
if re.search ("linux", sys.platform) != None and bld.env['LUABINDINGDOC']:
@@ -754,7 +754,7 @@ def build(bld):

obj = bld(features = 'subst')
obj.source = 'ardour.sh.in'
obj.target = 'ardour' + bld.env['MAJOR']
obj.target = bld.env['INTERNAL_NAME']
obj.chmod = Utils.O755
obj.dict = wrapper_subst_dict
obj.install_path = bld.env['BINDIR']
@@ -969,27 +969,27 @@ def build(bld):
mo)

def i18n_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_pot(bld)
appdata_i18n_po(bld)
appdata_i18n_mo(bld)

def i18n_pot_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n_pot(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_pot(bld)

def i18n_po_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n_po(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_po(bld)

def i18n_mo_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n_mo(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')

22 changes: 10 additions & 12 deletions libs/ardour/wscript
Original file line number Diff line number Diff line change
@@ -7,8 +7,6 @@ import re
# default state file version for this build
CURRENT_SESSION_FILE_VERSION = 7003

I18N_PACKAGE = 'ardour'

libardour_sources = [
'amp.cc',
'analyser.cc',
@@ -421,7 +419,7 @@ def build(bld):
obj.vnum = LIBARDOUR_LIB_VERSION
obj.install_path = bld.env['LIBDIR']
obj.defines += [
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
'PACKAGE="' + bld.env['INTERNAL_NAME'] + '"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -592,7 +590,7 @@ def build(bld):
mo_files = bld.path.ant_glob('po/*.mo')
for mo in mo_files:
lang = os.path.basename(mo.srcpath()).replace('.mo', '')
bld.install_as(os.path.join(bld.env['LOCALEDIR'], lang, 'LC_MESSAGES', I18N_PACKAGE + bld.env['MAJOR'] + '.mo'),
bld.install_as(os.path.join(bld.env['LOCALEDIR'], lang, 'LC_MESSAGES', bld.env['INTERNAL_NAME'] + '.mo'),
mo)

if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
@@ -610,7 +608,7 @@ def build(bld):
else:
testcommon.use.extend(['libltc', 'librubberband', 'libfluidsynth'])
testcommon.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'test"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -686,7 +684,7 @@ def build(bld):
load_save_session.target = 'load-save-session'
load_save_session.install_path = ''
load_save_session.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'profile"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -712,7 +710,7 @@ def build(bld):
profilingobj.target = p
profilingobj.install_path = ''
profilingobj.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'profile"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -730,24 +728,24 @@ def create_ardour_test_program(bld, includes, name, target, sources):
# not sure about install path
testobj.install_path = bld.env['LIBDIR']
testobj.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'test"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]

def i18n_func(bld):
autowaf.build_i18n(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')

def i18n_pot_func(bld):
autowaf.build_i18n_pot(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n_pot(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')

def i18n_po_func(bld):
autowaf.build_i18n_po(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n_po(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')

def i18n_mo_func(bld):
autowaf.build_i18n_mo(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n_mo(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')
4 changes: 2 additions & 2 deletions luasession/wscript
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ def build(bld):
if bld.env['build_target'] != 'mingw':
obj = bld(features = 'subst')
obj.source = 'ardour-lua.sh.in'
obj.target = 'ardour' + bld.env['MAJOR'] + '-lua'
obj.target = bld.env['INTERNAL_NAME'] + '-lua'
obj.chmod = Utils.O755
obj.install_path = bld.env['BINDIR']
obj.LIBDIR = os.path.normpath(bld.env['DLLDIR'])
@@ -75,6 +75,6 @@ def build(bld):

if bld.env['build_target'] == 'mingw':
obj.install_path = bld.env['BINDIR']
obj.target = 'ardour' + bld.env['MAJOR'] + '-lua'
obj.target = bld.env['INTERNAL_NAME'] + '-lua'
else:
obj.install_path = bld.env['DLLDIR']
2 changes: 1 addition & 1 deletion wscript
Original file line number Diff line number Diff line change
@@ -1032,7 +1032,7 @@ def configure(conf):
if Options.options.lv2dir:
conf.env['LV2DIR'] = Options.options.lv2dir
else:
conf.env['LV2DIR'] = os.path.join(conf.env['LIBDIR'], 'ardour' + conf.env['MAJOR'], 'LV2')
conf.env['LV2DIR'] = os.path.join(conf.env['LIBDIR'], conf.env['INTERNAL_NAME'], 'LV2')

conf.env['LV2DIR'] = os.path.normpath(conf.env['LV2DIR'])