Browse Source

Allow optional build of jack-example-tools

wscript:
Add option `--example-tools` to allow optional build of executables and
libraries provided by jack-example-tools (defaults to True).
It can be used as `--example-tools=yes|no` or `--no-example-tools` or
plain `--example-tools`.
Based on the new option, set the configuration environment variable
`HAVE_JACK_EXAMPLE_TOOLS` which is used throughout the configuration
and build steps to include the `example-clients`, `tools` and `tests`
subdirectories.

man/wscript:
Provide the `HAVE_JACK_EXAMPLE_TOOLS` build environment variable to the
`fill_template` script as second argument.
Remove unused imports.

man/fill_template:
Change the behavior of the script to only create all man pages if the
second argument to the script is `True` (the jack-example-tools are
being built), else only create the man page for jackd.
pull/827/head
David Runge Filipe Coelho <falktx@falktx.com> 3 years ago
parent
commit
61a708f2c6
3 changed files with 24 additions and 14 deletions
  1. +7
    -3
      man/fill_template
  2. +4
    -5
      man/wscript
  3. +13
    -6
      wscript

+ 7
- 3
man/fill_template View File

@@ -2,6 +2,10 @@
d=""
[ -z "$SOURCE_DATE_EPOCH" ] || d=--date=@$SOURCE_DATE_EPOCH

for i in *.0 ; do
sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%B %Y'`/g" < ${i} > ${i%%0}1
done
if [ "$2" == "True" ]; then
for i in *.0 ; do
sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%B %Y'`/g" < ${i} > ${i%%0}1
done
else
sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%B %Y'`/g" < jackd.0 > jackd.1
fi

+ 4
- 5
man/wscript View File

@@ -1,11 +1,10 @@
#! /usr/bin/python3
# encoding: utf-8

import re
import os


def build(bld):
bld.exec_command('cd man ; sh fill_template %s' % bld.env['JACK_VERSION'])
bld.exec_command('cd man ; sh fill_template {} {}'.format(
bld.env['JACK_VERSION'],
bld.env['HAVE_JACK_EXAMPLE_TOOLS'])
)
bld.install_files(bld.env['MANDIR'], bld.path.ant_glob('*.1'))


+ 13
- 6
wscript View File

@@ -134,6 +134,12 @@ def options(opt):
'celt',
help='Build with CELT')
celt.add_function(check_for_celt)
opt.add_auto_option(
'example-tools',
help='Build with jack-example-tools',
conf_dest='BUILD_JACK_EXAMPLE_TOOLS',
default=True,
)

# Suffix _PKG to not collide with HAVE_OPUS defined by the option.
opus = opt.add_auto_option(
@@ -296,9 +302,9 @@ def configure(conf):
else:
conf.env['SYSTEMD_USER_UNIT_DIR'] = None

conf.recurse('example-clients')
conf.recurse('tools')
if conf.env['HAVE_JACK_EXAMPLE_TOOLS']:
conf.recurse('example-clients')
conf.recurse('tools')

# test for the availability of ucontext, and how it should be used
for t in ['gp_regs', 'uc_regs', 'mc_gregs', 'gregs']:
@@ -839,13 +845,14 @@ def build(bld):

build_drivers(bld)

bld.recurse('example-clients')
bld.recurse('tools')
if bld.env['HAVE_JACK_EXAMPLE_TOOLS']:
bld.recurse('example-clients')
bld.recurse('tools')

if bld.env['IS_LINUX'] or bld.env['IS_FREEBSD']:
bld.recurse('man')
bld.recurse('systemd')
if not bld.env['IS_WINDOWS']:
if not bld.env['IS_WINDOWS'] and bld.env['HAVE_JACK_EXAMPLE_TOOLS']:
bld.recurse('tests')
if bld.env['BUILD_JACKDBUS']:
bld.recurse('dbus')


Loading…
Cancel
Save