Commit 65dfd777 authored by Michael Hanselmann's avatar Michael Hanselmann

Use docbook2* paths found during configure for actual build

docbook-wrapper had the names for the docbook2* programs hardcoded. This
patch changes Makefile.am and the wrapper script to pass them via
another argument.

Another issue where rapi.in was built before rapi-resources.sgml is
also fixed.

Reviewed-by: iustinp
parent ffa1c260
......@@ -228,24 +228,24 @@ man/%.in: man/%.sgml stamp-directories $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
doc/%.pdf: doc/%.in $(DOCBOOK_WRAPPER)
$(DOCBOOK_WRAPPER) $< $@
$(DOCBOOK_WRAPPER) "$(DOCBOOK2PDF)" $< $@
doc/%.html: doc/%.in $(DOCBOOK_WRAPPER)
$(DOCBOOK_WRAPPER) $< $@
$(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $@
doc/%.html: doc/%.rst
$(RST2HTML) $< $@
doc/rapi.pdf doc/rapi.html: doc/rapi-resources.sgml
doc/rapi.pdf doc/rapi.html doc/rapi.in: doc/rapi-resources.sgml
doc/rapi-resources.sgml: $(BUILD_RAPI_RESOURCE_DOC) lib/rapi/connector.py
PYTHONPATH=.:$(top_builddir) $(BUILD_RAPI_RESOURCE_DOC) > $@ || rm -f $@
man/%.7: man/%.in man/footer.sgml $(DOCBOOK_WRAPPER)
$(DOCBOOK_WRAPPER) $< $@
$(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $@
man/%.8: man/%.in man/footer.sgml $(DOCBOOK_WRAPPER)
$(DOCBOOK_WRAPPER) $< $@
$(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $@
man/footer.sgml $(TESTS): srclinks
......
......@@ -2,23 +2,20 @@
set -e
input="${1}"
output="${2}"
if test "$#" != 3
then
echo "Wrong number of arguments." >&2
exit 1
fi
cmd="${1}"
input="${2}"
output="${3}"
# docbook2man inserts a date formatted using the current locale into its
# output. Using the "C" locale makes sure it's always in the default format.
export LC_ALL=C
case "${output}" in
*.pdf) cmd=docbook2pdf ;;
*.html) cmd='docbook2html --nochunks' ;;
*.7|*.8) cmd=docbook2man ;;
*)
echo "Unknown filetype: ${output}" >&2
exit 1
;;
esac
tmpdir=`mktemp -d`
trap "rm -rf ${tmpdir}" EXIT
......@@ -27,7 +24,7 @@ if ! ( cd `dirname ${input}` &&
then
echo "Building ${output} failed." >&2
exit 1
fi;
fi
mv "${tmpdir}/`basename "${output}"`" "${output}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment