Commit 845cd040 authored by marcochapeau's avatar marcochapeau
Browse files

* Added the DISTDIR option for package maintainers


git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2118 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 5ef740ee
......@@ -56,6 +56,7 @@ opts = Options('cache/'+build_base+'options.cache')
# If this is just to display a help-text for the variable used via ARGUMENTS, then its wrong...
opts.Add( 'BUILDDIR', 'Path to place the built files in', '')
opts.AddOptions(
PathOption('DISTDIR', 'A prefix where the installed tree will be placed - for package maintainers', '', PathOption.PathAccept),
PathOption('PREFIX', 'The prefix where jackdmp will be installed to', '/usr/local', PathOption.PathAccept),
PathOption('BINDIR', 'Overwrite the directory where apps are installed to', '$PREFIX/bin', PathOption.PathAccept),
PathOption('LIBDIR', 'Overwrite the directory where libs are installed to', '$PREFIX/lib', PathOption.PathAccept),
......@@ -193,28 +194,35 @@ if env['FULL_MIMIC']:
env['CLIENTLIB'] = 'jack'
env['SERVERLIB'] = 'jackserver'
env['ADDON_DIR'] = env.subst(env['LIBDIR']) + "/jack"
env['INSTALL_ADDON_DIR'] = env['DISTDIR'] + env.subst(env['LIBDIR']) + "/jack"
else:
env['SERVER'] = 'jackdmp'
env['CLIENTLIB'] = 'jackmp'
env['SERVERLIB'] = 'jackservermp'
env['WRAPPERLIB'] = 'jack'
env['ADDON_DIR'] = env.subst(env['LIBDIR']) + "/jackmp"
env.Alias('install', env['LIBDIR'])
env.Alias('install', env['INCLUDEDIR'])
env.Alias('install', env['BINDIR'])
env.Alias('install', env['ADDON_DIR'])
env['INSTALL_ADDON_DIR'] = env['DISTDIR'] + env.subst(env['LIBDIR']) + "/jackmp"
env['PREFIX'] = env.subst(env['PREFIX'])
env['BINDIR'] = env.subst(env['BINDIR'])
env['LIBDIR'] = env.subst(env['LIBDIR'])
env['INCLUDEDIR'] = env.subst(env['INCLUDEDIR'])
env['INSTALL_PREFIX'] = env['DISTDIR'] + env['PREFIX']
env['INSTALL_BINDIR'] = env['DISTDIR'] + env['BINDIR']
env['INSTALL_LIBDIR'] = env['DISTDIR'] + env['LIBDIR']
env['INSTALL_INCLUDEDIR'] = env['DISTDIR'] + env['INCLUDEDIR'] + '/jack'
env.Alias('install', env['INSTALL_LIBDIR'])
env.Alias('install', env['INSTALL_INCLUDEDIR'])
env.Alias('install', env['INSTALL_BINDIR'])
env.Alias('install', env['INSTALL_ADDON_DIR'])
env.ScanReplace('jack.pc.in')
# jack.pc is always updated in case of config changes
# (PREFIX or JACK_VERSION for instance)
AlwaysBuild('jack.pc')
pkg_config_dir = env['LIBDIR']+"/pkgconfig/"
pkg_config_dir = env['INSTALL_LIBDIR']+"/pkgconfig/"
env.Install(pkg_config_dir, 'jack.pc')
env.Alias('install', pkg_config_dir)
......@@ -241,15 +249,14 @@ if env['BUILD_DOXYGEN_DOCS']:
subdirs=['common']
# TODO: Really handle each platform automatically
if env['PLATFORM'] == 'posix':
subdirs.append('linux')
# TODO FOR SLETZ: test macosx/SConscript
# TODO FOR Marc: make macosx/SConscript work right
if env['PLATFORM'] == 'macosx':
subdirs.append('macosx')
# TODO FOR SLETZ & MARC: create/check windows/SConscript
# TODO FOR Marc: create/check windows/SConscript
#if env['PLATFORM'] == 'windows':
# subdirs.append('windows')
......
......@@ -152,26 +152,26 @@ if env['PLATFORM'] == 'posix':
clientlib = libenv.SharedLibrary(env['CLIENTLIB'], srcfiles_common_clientlib)
serverlib = libenv.SharedLibrary(env['SERVERLIB'], srcfiles_common_serverlib)
env.Install( env['LIBDIR'], [clientlib, serverlib])
env.Install( env['INSTALL_LIBDIR'], [clientlib, serverlib])
if not env['FULL_MIMIC']:
# TODO: the next line generates a warning because of the LIBS variable addition
# Is there a clean way to do that ?
wrapperlib = libenv.SharedLibrary(env['WRAPPERLIB'], srcfiles_common_wrapperlib, LIBS='dl')
env.Install( env['LIBDIR'], [wrapperlib])
env.Alias('install', env['LIBDIR'])
env.Install( env['INSTALL_LIBDIR'], [wrapperlib])
env.Alias('install', env['INSTALL_LIBDIR'])
# Handle the way we name libraries on a POSIX system
# TODO: this is not quite clean yet. changing the library version is a pain we'll need a nicer loop and a config value somewhere
if env['PLATFORM'] == 'posix':
libs = [(env['CLIENTLIB'], clientlib), (env['SERVERLIB'], serverlib)]
if not env['FULL_MIMIC']:
libs.append((env['WRAPPERLIB'], wrapperlib))
for lib_name, lib in libs:
env.Command('#/common/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), lib, symlinkcmd)
env.Command('#/common/lib' + lib_name + '.so', '#/common/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), symlinkcmd)
env.Command(env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), env['LIBDIR'] + '/lib' + lib_name + '.so.' + env['JACKAPI_VERSION'], symlinkcmd)
env.Command(env['LIBDIR'] + '/lib' + lib_name + '.so', env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), symlinkcmd)
env.Alias('install', env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']))
env.Command('#/common/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), lib, symlinkcmd)
env.Command('#/common/lib' + lib_name + '.so', '#/common/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), symlinkcmd)
env.Command(env['INSTALL_LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), env['INSTALL_LIBDIR'] + '/lib' + lib_name + '.so.' + env['JACKAPI_VERSION'], symlinkcmd)
env.Command(env['INSTALL_LIBDIR'] + '/lib' + lib_name + '.so', env['INSTALL_LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), symlinkcmd)
env.Alias('install', env['INSTALL_LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']))
# Headers
for header in jack_headers:
env.Install(env['INCLUDEDIR'] + '/jack', 'jack/' + header)
env.Alias('install', env['INCLUDEDIR'])
env.Install(env['INSTALL_INCLUDEDIR'], 'jack/' + header)
......@@ -57,7 +57,7 @@ extra_libs = {}
for example_program in example_programs:
extra_libs[example_program] = ['jack']
# TODO: we need to really test for READLINE... pkgconfig ?
# TODO: we need to test for READLINE... is that even possible ?
env['HAS_READLINE']=True
if env['HAS_READLINE']:
example_programs['jack_transport'] = 'transport.c'
......@@ -73,12 +73,12 @@ if env['BUILD_EXAMPLES']:
for example_program, example_program_source in example_programs.items():
clientenv.Program(example_program, example_program_source, LIBS=extra_libs[example_program])
if env['INSTALL_EXAMPLES']:
clientenv.Install(env['BINDIR'], example_program)
jack_disconnect_install_path = env['BINDIR'] + '/jack_disconnect'
clientenv.Install(env['INSTALL_BINDIR'], example_program)
jack_disconnect_install_path = env['INSTALL_BINDIR'] + '/jack_disconnect'
env.Command(jack_disconnect_install_path, 'jack_connect', symlinkcmd)
env.Alias('install', jack_disconnect_install_path)
for example_lib, example_lib_source in example_libs.items():
lib = clientenv.SharedLibrary(example_lib, example_lib_source)
if clientenv['INSTALL_EXAMPLES']:
env.InstallAs(env['ADDON_DIR'] + '/' + example_lib + '.so', lib)
env.Alias('install', env['ADDON_DIR'] + '/' + example_lib + '.so')
env.InstallAs(env['INSTALL_ADDON_DIR'] + '/' + example_lib + '.so', lib)
env.Alias('install', env['INSTALL_ADDON_DIR'] + '/' + example_lib + '.so')
......@@ -62,9 +62,9 @@ serverenv.PrependUnique( LIBPATH=env['build_base'] )
serverenv.PrependUnique( LIBS=[env['SERVERLIB'], 'dl'] )
server = serverenv.Program(env['SERVER'], srcfiles_linux_server)
serverenv.Install( env['BINDIR'], server )
serverenv.Install( env['INSTALL_BINDIR'], server )
driver_dir = env['ADDON_DIR'] + "/"
driver_dir = env['INSTALL_ADDON_DIR'] + "/"
drv = serverenv.SharedLibrary( 'jack_dummy', srcfiles_linux_dummy )
serverenv.InstallAs( driver_dir + "jack_dummy.so", drv )
......
......@@ -47,10 +47,10 @@ serverenv.PrependUnique( LIBPATH=env['build_base'] )
serverenv.PrependUnique( LIBS=[env['SERVERLIB'], 'dl'] )
server = serverenv.Program(env['SERVER'], srcfiles_macosx_server)
serverenv.Install( env['BINDIR'], server )
serverenv.Install( env['INSTALL_BINDIR'], server )
drv = serverenv.SharedLibrary( 'jack_dummy', srcfiles_macosx_dummy )
serverenv.InstallAs( env['ADDON_DIR']+ '/jack_dummy.so', drv )
serverenv.InstallAs( env['INSTALL_ADDON_DIR']+ '/jack_dummy.so', drv )
drv = serverenv.SharedLibrary( 'jack_coreaudio', srcfiles_macosx_coreaudio )
serverenv.InstallAs( env['ADDON_DIR']+ '/jack_coreaudio.so', drv )
serverenv.InstallAs( env['INSTALL_ADDON_DIR']+ '/jack_coreaudio.so', drv )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment