diff options
author | Jameson Little <t.jameson.little@gmail.com> | 2011-08-20 05:57:09 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-08-23 06:05:40 +0400 |
commit | a98be6a80d2e7e8a49a23de2ff19f0af40f27ad6 (patch) | |
tree | b7ac22a6e51a11d5f638535f1e5e7e03925aab45 /Makefile | |
parent | c7824f412f0cb59d6f55cf0bc220253c39e6029f (diff) |
Updated Makefile to enable building of api-docs into man3
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -1,12 +1,19 @@ SHELL = bash -docs = $(shell find doc -name '*.md' \ +cli_docs = $(shell find doc -name '*.md' \ |sed 's|.md|.1|g' \ |sed 's|doc/|man1/|g' ) -doc_subfolders = $(shell find doc -type d \ +api_docs = $(shell find api-doc -name '*.md' \ + |sed 's|.md|.3|g' \ + |sed 's|api-doc/|man3/|g' ) + +cli_doc_subfolders = $(shell find doc -type d \ |sed 's|doc/|man1/|g' ) +api_doc_subfolders = $(shell find api-doc -type d \ + |sed 's|api-doc/|man3/|g' ) + # This is the default make target. # Since 'make' typically does non-installation build stuff, # it seems appropriate. @@ -34,12 +41,15 @@ clean: uninstall uninstall: submodules node cli.js rm npm -g -f -man: man1 +man: man1 man3 -man1: $(doc_subfolders) +man1: $(cli_doc_subfolders) [ -d man1 ] || mkdir -p man1 -doc: man1 $(docs) +man3: $(api_doc_subfolders) + [ -d man3 ] || mkdir -p man3 + +doc: man1 $(cli_docs) man3 $(api_docs) # use `npm install ronn` for this to work. man1/%.1: doc/%.md @@ -49,6 +59,13 @@ man1/%.1: doc/%.md man1/%/: doc/%/ @[ -d $@ ] || mkdir -p $@ +man3/%.3: api-doc/%.md + @[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn + ./node_modules/.bin/ronn --roff $< > $@ + +man3/%/: api-doc/%/ + @[ -d $@ ] || mkdir -p $@ + test: submodules node cli.js test |