git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix and clean up man page building

From
Jonas Fonseca <fonseca@diku.dk>
Date
May 20, 2005, 13:35 UTC
Message-ID
<20050520133533.GA27395@diku.dk>
In-Reply-To
<E1DYpbT-0003jv-JY@highlab.com>
Sebastian Kuzminsky <seb@highlab.com> wrote Thu, May 19, 2005:
Show 8 quoted lines
> -%.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 <fonseca@diku.dk>

--- 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
Previous: Sebastian KuzminskyNext: Raja R Harinath
Message 7 of 10 in “manpage name conflict”
  1. Sebastian KuzminskyMay 19, 2005
  2. Petr BaudisMay 19, 2005
  3. Sebastian KuzminskyMay 19, 2005
  4. Linus TorvaldsMay 19, 2005
  5. Linus TorvaldsMay 19, 2005
  6. Sebastian KuzminskyMay 19, 2005
  7. Fix and clean up man page buildingJonas Fonseca, May 20, 2005
  8. Raja R HarinathMay 20, 2005
  9. Jonas FonsecaMay 20, 2005
  10. Sebastian KuzminskyMay 20, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.