Skip to content

Commit

Permalink
Add API doc generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
xandkar committed Feb 21, 2014
1 parent 88d0ef1 commit a14d591
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
_obuild/
bin/
doc/api/
ocp-build.root*
*.cmi
*.cmo
17 changes: 17 additions & 0 deletions Makefile
@@ -1,6 +1,9 @@
PROGRAMS := \
httpc_example

DOC_FORMAT := html

DIR_DOC := doc/api/$(DOC_FORMAT)
DIR_BUILD := _obuild
DIR_SRC := lib

Expand All @@ -13,6 +16,8 @@ MAX_BUILD_WORKERS := $(shell sysctl -n hw.ncpu)
build \
clean \
deps \
doc \
doc_httpc \
programs \
purge

Expand All @@ -33,6 +38,18 @@ build: ocp-build.root
ocp-build.root:
@ocp-build -init -njobs $(MAX_BUILD_WORKERS)

doc: doc_httpc

doc_httpc: $(DIR_DOC) build
@ocamlfind ocamldoc \
-d $(DIR_DOC) \
-$(DOC_FORMAT) \
-I $(DIR_BUILD)/httpc \
$(DIR_SRC)/*.ml

$(DIR_DOC):
@mkdir -p $(DIR_DOC)

clean: clean_bin
@ocp-build clean
@rm -f ocp-build.root*
Expand Down

0 comments on commit a14d591

Please sign in to comment.