aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall_meson.py11
-rw-r--r--man/mesonconf.125
-rw-r--r--test cases/common/50 subproject options/meson_options.txt2
-rw-r--r--test cases/common/50 subproject options/subproject/meson_options.txt2
4 files changed, 36 insertions, 4 deletions
diff --git a/install_meson.py b/install_meson.py
index 2289f71..f27492b 100755
--- a/install_meson.py
+++ b/install_meson.py
@@ -20,7 +20,7 @@
import os, sys, glob, shutil, gzip
from optparse import OptionParser
-from meson import version
+from coredata import version
usage_info = '%prog [--prefix PREFIX] [--destdir DESTDIR]'
@@ -51,16 +51,21 @@ script_dir = os.path.join(install_root, 'share/meson-' + version)
bin_dir = os.path.join(install_root, 'bin')
bin_script = os.path.join(script_dir, 'meson.py')
gui_script = os.path.join(script_dir, 'mesongui.py')
+conf_script = os.path.join(script_dir, 'mesonconf.py')
bin_name = os.path.join(bin_dir, 'meson')
gui_name = os.path.join(bin_dir, 'mesongui')
+conf_name = os.path.join(bin_dir, 'mesonconf')
man_dir = os.path.join(install_root, 'share/man/man1')
in_manfile = 'man/meson.1'
out_manfile = os.path.join(man_dir, 'meson.1.gz')
in_guimanfile = 'man/mesongui.1'
out_guimanfile = os.path.join(man_dir, 'mesongui.1.gz')
+in_confmanfile = 'man/mesonconf.1'
+out_confmanfile = os.path.join(man_dir, 'mesonconf.1.gz')
symlink_value = os.path.relpath(bin_script, os.path.dirname(bin_name))
guisymlink_value = os.path.relpath(gui_script, os.path.dirname(gui_name))
+confsymlink_value = os.path.relpath(conf_script, os.path.dirname(conf_name))
files = glob.glob('*.py')
files += glob.glob('*.ui')
@@ -84,6 +89,8 @@ except OSError:
print('Creating symlinks %s and %s.' % (bin_name, gui_name))
os.symlink(symlink_value, bin_name)
os.symlink(guisymlink_value, gui_name)
-print('Installing manfile to %s.' % man_dir)
+os.symlink(confsymlink_value, conf_name)
+print('Installing manfiles to %s.' % man_dir)
open(out_manfile, 'wb').write(gzip.compress(open(in_manfile, 'rb').read()))
+open(out_confmanfile, 'wb').write(gzip.compress(open(in_confmanfile, 'rb').read()))
open(out_guimanfile, 'wb').write(gzip.compress(open(in_guimanfile, 'rb').read()))
diff --git a/man/mesonconf.1 b/man/mesonconf.1
new file mode 100644
index 0000000..49c00c9
--- /dev/null
+++ b/man/mesonconf.1
@@ -0,0 +1,25 @@
+.TH MESONCONF "1" "December 2013" "mesonconf 0.11.0" "User Commands"
+.SH NAME
+mesonconf - a tool to configure Meson builds
+.SH DESCRIPTION
+
+Mesonconf provides a way to configure a Meson
+project from the command line. Its usage is simple.
+
+.B mesonconf [
+.I build directory
+.B ] [
+.I options to set
+.B ]
+
+If build directory is omitted, the current directory is used instead.
+
+If no parameters are set, mesonconf will print the value of all build
+options to the console.
+
+To set values, just use the -D command line argument like this.
+
+.B mesonconf -Dopt1=value1 -Dopt2=value2
+
+.SH SEE ALSO
+https://sourceforge.net/p/meson
diff --git a/test cases/common/50 subproject options/meson_options.txt b/test cases/common/50 subproject options/meson_options.txt
index 658c4b0..c295ddd 100644
--- a/test cases/common/50 subproject options/meson_options.txt
+++ b/test cases/common/50 subproject options/meson_options.txt
@@ -1 +1 @@
-option('opt', type : 'boolean', value : true)
+option('opt', type : 'boolean', value : true, description : 'main project option')
diff --git a/test cases/common/50 subproject options/subproject/meson_options.txt b/test cases/common/50 subproject options/subproject/meson_options.txt
index 071740b..ac78533 100644
--- a/test cases/common/50 subproject options/subproject/meson_options.txt
+++ b/test cases/common/50 subproject options/subproject/meson_options.txt
@@ -1 +1 @@
-option('opt', type : 'boolean', value : false)
+option('opt', type : 'boolean', value : false, description : 'subproject option')