Commit d56af4d8 authored by Iñigo Martínez's avatar Iñigo Martínez

build: Follow the new meson porting guidelines

Following the new meson porting guidelines, this patch renames the
build options. The list of changes is as follows:

- Remove the enable prefix from boolean options.
- The character separator from multi-word options has been changed
  to underscore.

The warning compiler options are also removed because meson's
compiler related options should be used.

https://bugzilla.gnome.org/show_bug.cgi?id=788796
parent c876e0e2
......@@ -50,7 +50,7 @@ install_data(
install_dir: join_paths(gitg_mandir, 'man1')
)
enable_glade_catalog = get_option('enable-glade-catalog')
enable_glade_catalog = get_option('glade_catalog')
if enable_glade_catalog
install_data(
'gitg-glade.xml',
......
......@@ -140,7 +140,7 @@ custom_target(
install_dir: gitg_girepositorydir
)
enable_python = get_option('enable-python')
enable_python = get_option('python')
if enable_python
python = import('python3')
......
......@@ -121,7 +121,7 @@ endforeach
common_flags = ['-DHAVE_CONFIG_H']
warn_flags = []
if get_option('enable-deprecations')
if get_option('deprecations')
warn_flags += [
'-DG_DISABLE_DEPRECATED',
'-DGDK_DISABLE_DEPRECATED',
......@@ -134,8 +134,6 @@ endif
if gitg_debug
test_cflags = [
'-w',
'-Werror',
'-Werror=format=2',
'-Werror=implicit-function-declaration',
'-Werror=init-self',
......@@ -220,7 +218,7 @@ config_h.set_quoted('PLATFORM_NAME', platform_name)
g_ir_compiler = find_program('g-ir-compiler')
enable_docs = get_option('enable-docs')
enable_docs = get_option('docs')
if enable_docs
docs_dir = join_paths(meson.source_root(), 'docs')
valadoc = find_program('valadoc')
......@@ -257,7 +255,7 @@ configure_file(
meson.add_install_script(
'meson_post_install.py',
gitg_datadir,
(enable_python ? 'enable-python' : ''),
(enable_python ? 'python' : ''),
gitg_libdir
)
......
option('enable-glade-catalog', type: 'boolean', value: true, description: 'Install a glade catalog file')
option('enable-python', type: 'boolean', value: true, description: 'Build with python support')
option('enable-deprecations', type: 'boolean', value: false, description: 'warn about deprecated usages')
option('enable-docs', type: 'boolean', value: false, description: 'enable generating documentation')
option('glade_catalog', type: 'boolean', value: true, description: 'Install a glade catalog file')
option('python', type: 'boolean', value: true, description: 'Build with python support')
option('deprecations', type: 'boolean', value: false, description: 'warn about deprecated usages')
option('docs', type: 'boolean', value: false, description: 'enable generating documentation')
......@@ -25,7 +25,7 @@ if not os.environ.get('DESTDIR'):
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir])
if sys.argv[2] == 'enable-python':
if sys.argv[2] == 'python':
print('Byte-compiling python modules...')
subprocess.call(['python', '-m', 'compileall', '-f', '-q', sys.argv[3]])
......
Markdown is supported
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