Permalink
Browse files

Add commands to make man files from the docs.

  • Loading branch information...
1 parent 836557e commit 86c296f2c63b7f08de0e51f2cc2e7a85cf5ddc27 @isaacs isaacs committed Apr 25, 2010
Showing with 21 additions and 4 deletions.
  1. +21 −4 Makefile
View
@@ -1,9 +1,26 @@
+docs = $(shell ls doc/*.md | sed 's|.md|.1|g' | sed 's|doc/|man/|g')
+
install: doc
node install-npm.js
- mv npm.1 /usr/local/share/man/man1/npm.1
+ cp man/npm.1 /usr/local/share/man/man1/npm.1
+
+clean:
+ rm -r man
+
+uninstall: clean
+ rm /usr/local/share/man/man1/npm.1
+ @echo TODO - npm uninstall itself
+
+man:
+ mkdir man
+
+doc: man man/npm.1 $(docs)
+
+man/npm.1: README.md
+ ronn --roff README.md > $@
-doc:
- ronn --roff README.md > npm.1
+man/%.1: doc/%.md
+ ronn --roff $< > $@
-.PHONY: install doc
+.PHONY: install doc clean uninstall

0 comments on commit 86c296f

Please sign in to comment.