[kupfer] wscript(s): Check for rst2man and build man page if available
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] wscript(s): Check for rst2man and build man page if available
- Date: Thu, 17 Sep 2009 19:23:50 +0000 (UTC)
commit 63c7416865daaccd41b10d80b5377aabc644cc0d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Thu Sep 17 20:44:17 2009 +0200
wscript(s): Check for rst2man and build man page if available
data/wscript_build | 22 +++++++++++++++-------
wscript | 4 ++--
2 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/data/wscript_build b/data/wscript_build
index 3f0a832..9dfc740 100644
--- a/data/wscript_build
+++ b/data/wscript_build
@@ -6,13 +6,21 @@ bld.install_files("${DATADIR}/kupfer", "preferences.ui")
bld.install_files("${DATADIR}/kupfer/art", "art/*")
bld.install_files("${DATADIR}/kupfer/searchplugins", "searchplugins/*")
-# compress and install man page
-bld.new_task_gen(
- source = "kupfer.1",
- target = "kupfer.1.gz",
- rule = 'gzip -c ${SRC} > ${TGT}',
- install_path = "${MANDIR}/man1",
-)
+if bld.env["RST2MAN"]:
+ # generate man page
+ bld.new_task_gen(
+ source = "kupfer.1.rst",
+ target = "kupfer.1",
+ rule = 'rst2man ${SRC} > ${TGT}',
+ )
+ bld.add_group()
+ # compress and install man page
+ bld.new_task_gen(
+ source = "kupfer.1",
+ target = "kupfer.1.gz",
+ rule = 'gzip -c ${SRC} > ${TGT}',
+ install_path = "${MANDIR}/man1",
+ )
# subst executable location into and
desktop_file = "kupfer.desktop.in"
diff --git a/wscript b/wscript
index c09a4ba..05638df 100644
--- a/wscript
+++ b/wscript
@@ -96,10 +96,10 @@ def configure(conf):
Utils.pprint("NORMAL", "Checking optional dependencies:")
- opt_programs = ["dbus-send"]
+ opt_programs = "dbus-send rst2man".split()
opt_pymodules = "wnck gnome.ui".split()
for prog in opt_programs:
- prog_path = conf.find_program(prog)
+ prog_path = conf.find_program(prog, var=prog.replace("-", "_").upper())
try:
conf.check_python_module("keybinder")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]