diff options
| -rwxr-xr-x | configure | 8 | ||||
| -rw-r--r-- | doc/user-guide/Makefile | 6 | ||||
| -rw-r--r-- | doc/user-guide/genhelp.py | 3 | 
3 files changed, 15 insertions, 2 deletions
| @@ -684,14 +684,20 @@ if [ "$skype" = "1" -o "$skype" = "plugin" ]; then  	protocols_mods="$protocol_mods skype(plugin)"  fi +if [ -z "$PYTHON" ]; then +	PYTHON=python +fi +  if [ "$doc" = "1" ]; then  	# check this here just in case someone tries to install it in python2.4... -	if ! python -m xml.etree.ElementTree > /dev/null 2>&1; then +	if ! $PYTHON -m xml.etree.ElementTree > /dev/null 2>&1; then  		echo  		echo 'ERROR: Python (>=2.5 or 3.x) is required to generate docs' +		echo "(Use the PYTHON environment variable if it's in a weird location)"  		exit 1  	fi  	echo "DOC=1" >> Makefile.settings +	echo "PYTHON=$PYTHON" >> Makefile.settings  fi  get_version diff --git a/doc/user-guide/Makefile b/doc/user-guide/Makefile index 28dd56ec..01fd9aa2 100644 --- a/doc/user-guide/Makefile +++ b/doc/user-guide/Makefile @@ -3,6 +3,10 @@ ifdef _SRCDIR_  _SRCDIR_ := $(_SRCDIR_)doc/user-guide/  endif +ifndef PYTHON +PYTHON = python +endif  +  all: help.txt  user-guide: user-guide.txt user-guide.html # user-guide.pdf user-guide.ps user-guide.rtf @@ -31,7 +35,7 @@ help.xml: commands.xml  	xsltproc --xinclude --output $@ docbook.xsl $<   help.txt: $(_SRCDIR_)help.xml $(_SRCDIR_)commands.xml $(_SRCDIR_)misc.xml $(_SRCDIR_)quickstart.xml -	python $(_SRCDIR_)genhelp.py $< $@ +	$(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 b6a23c11..ec619344 100644 --- a/doc/user-guide/genhelp.py +++ b/doc/user-guide/genhelp.py @@ -2,6 +2,9 @@  # Usage: python genhelp.py input.xml output.txt  # (Both python2 (>=2.5) or python3 work) +# +# The shebang above isn't used, set the PYTHON environment variable +# before running ./configure instead  # This program is free software; you can redistribute it and/or  # modify it under the terms of the GNU General Public License | 
