From: Jonas Fonseca Date: Fri, 20 May 2005 13:35:33 GMT Subject: [PATCH] Fix and clean up man page building Message-ID: <20050520133533.GA27395@diku.dk> In-Reply-To: Sebastian Kuzminsky wrote Thu, May 19, 2005: > -%.1 : %.xml > +%.1 %.7 : %.xml > xmlto man $< > + # FIXME: this next line works around an output filename bug in asciidoc 6.0.3 > + [ "$@" = "git.7" ] || mv git.1 $@ > > %.xml : %.txt > asciidoc -b docbook -d manpage $< This doesn't work for me since make stops when the test fails. Besides it is a bit verbose. Following is a patch which will only check for moving when building .7 files. It also cleans up the Makefile so it will be easier to add the manpages for cogito. Signed-off-by: Jonas Fonseca --- f435f47dab3465a47fbd2114cf006e0e869f31a9/Documentation/Makefile (mode:100644) +++ uncommitted/Documentation/Makefile (mode:100644) @@ -1,6 +1,7 @@ -DOC_SRC=$(wildcard git*.txt) -DOC_HTML=$(patsubst %.txt,%.html,$(DOC_SRC)) -DOC_MAN=$(patsubst %.txt,%.1,$(wildcard git-*.txt)) git.7 +MAN1_TXT=$(wildcard git-*.txt) +MAN7_TXT=git.txt +DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT)) +DOC_MAN=$(patsubst %.txt,%.1,$(MAN1_TXT)) $(patsubst %.txt,%.7,$(MAN7_TXT)) all: $(DOC_HTML) $(DOC_MAN) @@ -18,10 +19,12 @@ %.html : %.txt asciidoc -b css-embedded -d manpage $< +%.7 : %.1 + # FIXME: this next line works around an output filename bug in asciidoc 6.0.3 + if [ -f "$<" ]; then mv $< $@; fi + %.1 %.7 : %.xml xmlto man $< - # FIXME: this next line works around an output filename bug in asciidoc 6.0.3 - [ "$@" = "git.7" ] || mv git.1 $@ %.xml : %.txt asciidoc -b docbook -d manpage $< -- Jonas Fonseca