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
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
then
echo "Building ${output} failed." >&2
exit 1
-fi;
+fi
mv "${tmpdir}/`basename "${output}"`" "${output}"