aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user-guide
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-05-31 20:50:08 -0300
committerdequis <dx@dxzone.com.ar>2015-06-04 14:13:22 -0300
commitfd45e859aad9a4978afdff0478fc05d8290d75e7 (patch)
tree9fea69f19f01f718dedb339ec854693572058cc0 /doc/user-guide
parent81d40fe05519c422ef39ae63bac125d37068b82d (diff)
Allow building docs from any directory
Also just remove the .git check completely - just rely on make skipping it if it exists already.
Diffstat (limited to 'doc/user-guide')
-rw-r--r--doc/user-guide/Makefile4
-rw-r--r--doc/user-guide/genhelp.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/doc/user-guide/Makefile b/doc/user-guide/Makefile
index 62107ab7..28dd56ec 100644
--- a/doc/user-guide/Makefile
+++ b/doc/user-guide/Makefile
@@ -30,8 +30,8 @@ help.xml: commands.xml
%.db.xml: %.xml docbook.xsl
xsltproc --xinclude --output $@ docbook.xsl $<
-help.txt: help.xml help.xsl commands.xml misc.xml quickstart.xml
- python genhelp.py $< $@
+help.txt: $(_SRCDIR_)help.xml $(_SRCDIR_)commands.xml $(_SRCDIR_)misc.xml $(_SRCDIR_)quickstart.xml
+ python $(_SRCDIR_)genhelp.py $< $@
clean:
rm -f *.html *.pdf *.ps *.rtf *.txt *.db.xml
diff --git a/doc/user-guide/genhelp.py b/doc/user-guide/genhelp.py
index c43c8d23..b6a23c11 100644
--- a/doc/user-guide/genhelp.py
+++ b/doc/user-guide/genhelp.py
@@ -19,6 +19,7 @@
# Boston, MA 02110-1301, USA.
+import os
import re
import sys
import xml.etree.ElementTree as ET
@@ -221,6 +222,9 @@ def main():
print("Usage: python genhelp.py input.xml output.txt")
return
+ # ensure that we really are in the same directory as the input file
+ os.chdir(os.path.dirname(os.path.abspath(sys.argv[1])))
+
txt = process_file(sys.argv[1])
open(sys.argv[2], "w").write(txt)