On Tue, Aug 25, 2009 at 02:18:12PM +0200, Michael Hanselmann wrote:
>
> This eliminates one temporary directory in the process.
> ---
> Makefile.am | 12 ++----------
> autotools/docbook-wrapper | 7 ++++---
> 2 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index aa7f254..fd44560 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -287,19 +287,11 @@ doc/%.png: doc/%.dot
>
> man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
> @test -n "$(DOCBOOK2MAN)" || { echo 'docbook2man' not found during
> configure; exit 1; }
> - TMPDIR=`mktemp -d` && { \
> - $(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $$TMPDIR/$(patsubst
> man/%.in,%,$@) ; \
> - mv $$TMPDIR/$(patsubst man/%.in,%,$@) $@ ; \
> - rm -rf "$$TMPDIR" ; \
> - }
> + $(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $(notdir $(@:.in=)) $@
The reason we use a temp dir here is that docbook2man leaves stuff
around, e.g. manpage.links and manpage.refs.
Are you sure you don't pollute the src dir with this?
iustin