man pages support

This commit is contained in:
Jonhnny Weslley 2010-10-27 17:14:38 -03:00
parent ea66a802ba
commit 81296601e9
2 changed files with 37 additions and 1 deletions

View file

@ -1,13 +1,22 @@
PREFIX ?= /usr/local
MANPATH= "$(PREFIX)/share/man/man1"
BINS = $(wildcard bin/git-*)
MANS = $(wildcard man/git-*.ronn)
install:
install: clean
@echo "... installing to $(PREFIX)/bin"
@$(foreach BIN, $(BINS), \
echo "... installing `basename $(BIN)`"; \
cp -f $(BIN) $(PREFIX)/$(BIN); \
)
@mkdir -p $(MANPATH)
@$(foreach MAN, $(MANS), \
echo "... generating manual `basename $(MAN)`"; \
ronn --manual="Git Extras" $(MAN); \
)
@gzip man/*.1
@cp -f man/*.1.gz $(MANPATH)
uninstall:
@$(foreach BIN, $(BINS), \
@ -15,4 +24,7 @@ uninstall:
rm -f $(PREFIX)/$(BIN); \
)
clean:
rm -f man/git-*.gz man/git-*.html
.PHONY: install uninstall

24
man/man-template.1.ronn Normal file
View file

@ -0,0 +1,24 @@
<NAME>(1) -- <short description>
================================
## SYNOPSIS
`<NAME>` [OPTIONS]
## DESCRIPTION
## OPTIONS
## EXAMPLES
## AUTHOR
Written by <AUTHOR> <EMAIL> [and <SECOND_AUTHOR> <EMAIL>]
## REPORTING BUGS
&lt;<http://github.com/visionmedia/git-extras/issues>&gt;
## SEE ALSO
&lt;<http://github.com/visionmedia/git-extras>&gt;