From 9b2eb381ee13ff2326f0fdc256f31ae2f48b6632 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Tue, 30 Jan 2018 12:18:28 +0100 Subject: [PATCH 1/2] Add install-docs meson build option. --install-docs=false can be used to disable installation of documentation, which right now can't be disabled as it was possible with cmake. --- README.md | 15 ++++++++------- docs/meson.build | 6 ++++-- meson_options.txt | 5 +++++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 76d181d5..8a63b56c 100644 --- a/README.md +++ b/README.md @@ -62,13 +62,14 @@ meson .. ninja ninja test ``` -Possible AppStream-specific flags are: - -Dqt=true -- Build the Qt interface library (default: false) - -Dvapi=true -- Build Vala API to use the library with the Vala programming language (default: false) - -Ddocs=true -- Build specification and other documentation, requires Publican (default: false) - -Dmaintainer=true -- Enable strict compiler options - use this if you write a patch for AppStream (default: false) - -Dstemming=true -- Enable support for stemming in fulltext searches (default: true) - -Dapt-support=true -- Enable integration with the APT package manager on Debian (default: false) +Possible AppStream-specific flags are: + -Dqt=true -- Build the Qt interface library (default: false) + -Dvapi=true -- Build Vala API to use the library with the Vala programming language (default: false) + -Ddocs=true -- Build specification and other documentation, requires Publican (default: false) + -Dinstall-docs=true -- Install documentation (default: true) + -Dmaintainer=true -- Enable strict compiler options - use this if you write a patch for AppStream (default: false) + -Dstemming=true -- Enable support for stemming in fulltext searches (default: true) + -Dapt-support=true -- Enable integration with the APT package manager on Debian (default: false) ### Installation diff --git a/docs/meson.build b/docs/meson.build index e7be32d6..9bf4b168 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -99,8 +99,10 @@ if get_option('docs') # helper if you only and always want to rebuild the docs run_target('documentation', command: build_docs_cmd) - install_subdir('html', install_dir: as_doc_target_dir) -else + if get_option('install-docs') + install_subdir('html', install_dir: as_doc_target_dir) + endif +elif get_option('install-docs') if run_command('[', '-d', join_paths(meson.current_source_dir(), 'html'), ']').returncode() == 0 # install documentation, if it exists install_subdir('html', install_dir: as_doc_target_dir) diff --git a/meson_options.txt b/meson_options.txt index a57bb79d..316b9e44 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -23,6 +23,11 @@ option('apidocs', value : true, description : 'Build API documentation (automatically enabled when "-Ddocs=true" is passed)' ) +option('install-docs', + type : 'boolean', + value : true, + description : 'Install documentation for API and specification' +) option('apt-support', type : 'boolean', value : false, From 14f1eb7a12de4bc39266b1deebff03d97965c913 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Fri, 21 Jun 2019 16:47:16 +0200 Subject: [PATCH 2/2] Restore end-of-line whitespaces in README.md I removed those spaces in my previous commit assuming they were useless but forgot markdown uses them as linebreaks. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8a63b56c..7fba4ddd 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,14 @@ meson .. ninja ninja test ``` -Possible AppStream-specific flags are: - -Dqt=true -- Build the Qt interface library (default: false) - -Dvapi=true -- Build Vala API to use the library with the Vala programming language (default: false) - -Ddocs=true -- Build specification and other documentation, requires Publican (default: false) - -Dinstall-docs=true -- Install documentation (default: true) - -Dmaintainer=true -- Enable strict compiler options - use this if you write a patch for AppStream (default: false) - -Dstemming=true -- Enable support for stemming in fulltext searches (default: true) - -Dapt-support=true -- Enable integration with the APT package manager on Debian (default: false) +Possible AppStream-specific flags are: + -Dqt=true -- Build the Qt interface library (default: false) + -Dvapi=true -- Build Vala API to use the library with the Vala programming language (default: false) + -Ddocs=true -- Build specification and other documentation, requires Publican (default: false) + -Dinstall-docs=true -- Install documentation (default: true) + -Dmaintainer=true -- Enable strict compiler options - use this if you write a patch for AppStream (default: false) + -Dstemming=true -- Enable support for stemming in fulltext searches (default: true) + -Dapt-support=true -- Enable integration with the APT package manager on Debian (default: false) ### Installation