diff --git a/Makefile b/Makefile index ec13625..fc08e57 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/man/man-template.1.ronn b/man/man-template.1.ronn new file mode 100644 index 0000000..c2e99e6 --- /dev/null +++ b/man/man-template.1.ronn @@ -0,0 +1,24 @@ +(1) -- +================================ + +## SYNOPSIS + +`` [OPTIONS] + +## DESCRIPTION + +## OPTIONS + +## EXAMPLES + +## AUTHOR + +Written by [and ] + +## REPORTING BUGS + +<> + +## SEE ALSO + +<>