aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-02-23 15:59:54 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-02-23 15:59:54 +0200
commit94d295070e530e1d0135acfbbfc07830aa6fdf15 (patch)
tree0799dab361d2fdedf197d6cbe63dbfba7206250c
parentab636476db20a3c88356dad247cc3d6c21377d6d (diff)
downloadmeson-94d295070e530e1d0135acfbbfc07830aa6fdf15.zip
meson-94d295070e530e1d0135acfbbfc07830aa6fdf15.tar.gz
meson-94d295070e530e1d0135acfbbfc07830aa6fdf15.tar.bz2
Created a man page.
-rwxr-xr-xinstall_meson.py16
-rw-r--r--man/meson.114
2 files changed, 27 insertions, 3 deletions
diff --git a/install_meson.py b/install_meson.py
index 8a2c48d..3337835 100755
--- a/install_meson.py
+++ b/install_meson.py
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os, sys, glob, shutil
+import os, sys, glob, shutil, gzip
from optparse import OptionParser
from meson import version
@@ -51,6 +51,9 @@ 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')
bin_name = os.path.join(bin_dir, 'meson')
+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')
symlink_value = os.path.relpath(bin_script, os.path.dirname(bin_name))
@@ -62,11 +65,18 @@ files = [x for x in files if x not in noinstall]
os.makedirs(script_dir, exist_ok=True)
os.makedirs(bin_dir, exist_ok=True)
+os.makedirs(man_dir, exist_ok=True)
for f in files:
- print('Installing %s to %s' %(f, script_dir))
+ print('Installing %s to %s.' %(f, script_dir))
outfilename = os.path.join(script_dir, f)
shutil.copyfile(f, outfilename)
shutil.copystat(f, outfilename)
-
+try:
+ os.remove(bin_name)
+except OSError:
+ pass
+print('Creating symlink %s.' % bin_name)
os.symlink(symlink_value, bin_name)
+print('Installing manfile to %s.' % man_dir)
+open(out_manfile, 'wb').write(gzip.compress(open(in_manfile, 'rb').read()))
diff --git a/man/meson.1 b/man/meson.1
new file mode 100644
index 0000000..813ede2
--- /dev/null
+++ b/man/meson.1
@@ -0,0 +1,14 @@
+.TH MESON "1" "February 2013" "meson 0.1.0" "User Commands"
+.SH NAME
+meson - an experimental build system
+.SH DESCRIPTION
+usage: meson [options] [source directory] [build directory]
+.SS "options:"
+.TP
+\fB\-\-version\fR
+print version number
+.TP
+\fB\-\-help\fR
+print command line help
+.SH SEE ALSO
+https://sourceforge.net/p/meson