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

[PATCH/RFCv4 1/4] Documentation: Preparation for gitweb manpages

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 18, 2011, 13:34 UTC
Message-ID
<1316352884-26193-2-git-send-email-jnareb@gmail.com>
In-Reply-To
<1316352884-26193-1-git-send-email-jnareb@gmail.com>

Gitweb documentation currently consist of gitweb/README, gitweb/INSTALL and comments in gitweb source code. This is harder to find, use and browse that manpages ("man gitweb" or "git help gitweb") and HTML documentation ("git help --web gitweb").

The goal is to move documentation out of gitweb/README to gitweb.txt and gitweb.conf.txt manpages, reducing its size 10x from around 500 to around 50 lines (two pages), and move information not related drectly to building and installing gitweb out of gitweb/INSTALL there.

The idea is to have gitweb manpage sources reside in AsciiDoc format in Documentation/ directory, like for gitk and git-gui. Alternate solution would be to have gitweb documentation in gitweb/ directory, perhaps in POD format (see perlpod(1)).

This patch adds infrastructure for easy generating gitweb-related manpages. It adds currently empty 'gitweb-doc' target to Documentation/Makefile, and 'doc' proxy target to gitweb's Makefile.

This way to build gitweb documentation one can use
  make -C gitweb doc
or
  cd gitweb; make doc

The gitweb.conf(5) and gitweb(1) manpages will be added in subsequent commits.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This changes were part of patch adding first gitweb manpage in
previous version of this series.

Compared to v3 series it lacks the following hunk (at the very end of Documentation/Makefile):

  @@ -334,4 +337,4 @@ quick-install-man:
   quick-install-html:
   	'$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)
  
  -.PHONY: FORCE
  +.PHONY: FORCE gitweb-doc

This is because it would introduce inconsistency, as 'gitweb-doc' would be only one of many phony targets in Documentation/Makefile that is explicitly marked .PHONY

So this is something left for other commit.
 Documentation/Makefile |    3 +++
 gitweb/Makefile        |    7 ++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 6346a75..44be67b 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -170,6 +170,9 @@ info: git.info gitman.info
 
 pdf: user-manual.pdf
 
+GITWEB_DOC = $(filter gitweb.%,$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7))
+gitweb-doc: $(GITWEB_DOC)
+
 install: install-man
 
 install-man: man
diff --git a/gitweb/Makefile b/gitweb/Makefile
index 1c85b5f..3014d80 100644
--- a/gitweb/Makefile
+++ b/gitweb/Makefile
@@ -174,6 +174,11 @@ test-installed:
 	GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \
 		$(MAKE) -C ../t gitweb-test
 
+### Documentation
+
+doc:
+	$(MAKE) -C ../Documentation gitweb-doc
+
 ### Installation rules
 
 install: all
@@ -187,5 +192,5 @@ install: all
 clean:
 	$(RM) gitweb.cgi static/gitweb.min.js static/gitweb.min.css GITWEB-BUILD-OPTIONS
 
-.PHONY: all clean install test test-installed .FORCE-GIT-VERSION-FILE FORCE
+.PHONY: all clean install test test-installed doc .FORCE-GIT-VERSION-FILE FORCE
 
-- 
1.7.6
Previous: Jakub NarebskiNext: Jonathan Nieder
Message 2 of 12 in “Moving gitweb documentation to manpages”
  1. 0/4 Moving gitweb documentation to manpagesJakub Narebski, Sep 18, 2011
  2. 1/4 Documentation: Preparation for gitweb manpagesJakub Narebski, Sep 18, 2011
  3. Jonathan NiederSep 19, 2011
  4. Jakub NarebskiSep 20, 2011
  5. Jakub NarebskiSep 20, 2011
  6. Jonathan NiederSep 20, 2011
  7. Jakub NarebskiSep 20, 2011
  8. 2/4 gitweb: Add manpage for /etc/gitweb.conf (for gitweb documentation)Jakub Narebski, Sep 18, 2011
  9. Jonathan NiederSep 20, 2011
  10. Jakub NarebskiSep 22, 2011
  11. 3/4 gitweb: Add manpage for gitwebJakub Narebski, Sep 18, 2011
  12. 4/4 gitweb: Add gitweb manpages to 'gitweb' package in git.specJakub Narebski, Sep 18, 2011

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.