Permalink
Browse files

http://code.google.com/p/mochiweb/issues/detail?id=23 use edoc:applic…

…ation, switch to an explicit make doc phase
  • Loading branch information...
1 parent bc7f0f6 commit 3e0e826168b00cdf0c25a55609269373121ecb2c @etrepum etrepum committed Feb 16, 2009
Showing with 14 additions and 10 deletions.
  1. +4 −1 Makefile
  2. +9 −1 src/Makefile
  3. +1 −8 support/include.mk
View
@@ -1,5 +1,8 @@
all:
- (cd src;$(MAKE))
+ (cd src;$(MAKE) all)
+
+edoc:
+ (cd src;$(MAKE) edoc)
test:
(cd src;$(MAKE) test)
View
@@ -1,5 +1,8 @@
include ../support/include.mk
+APPLICATION=mochiweb
+DOC_OPTS={dir,\"../doc\"}
+
all: $(EBIN_FILES)
debug:
@@ -8,5 +11,10 @@ debug:
clean:
rm -rf $(EBIN_FILES)
+edoc:
+ $(ERL) -noshell -pa ../ebin \
+ -eval "edoc:application($(APPLICATION), \".\", [$(DOC_OPTS)])" \
+ -s init stop
+
test: all
- $(ERL) -noshell -pa ../ebin -s mochiweb test -s init stop
+ $(ERL) -noshell -pa ../ebin -s $(APPLICATION) test -s init stop
View
@@ -19,17 +19,14 @@ ifdef debug
endif
EBIN_DIR := ../ebin
-DOC_DIR := ../doc
EMULATOR := beam
ERL_SOURCES := $(wildcard *.erl)
ERL_HEADERS := $(wildcard *.hrl) $(wildcard ../include/*.hrl)
ERL_OBJECTS := $(ERL_SOURCES:%.erl=$(EBIN_DIR)/%.$(EMULATOR))
-ERL_DOCUMENTS := $(ERL_SOURCES:%.erl=$(DOC_DIR)/%.html)
ERL_OBJECTS_LOCAL := $(ERL_SOURCES:%.erl=./%.$(EMULATOR))
APP_FILES := $(wildcard *.app)
-EBIN_FILES = $(ERL_OBJECTS) $(ERL_DOCUMENTS) $(APP_FILES:%.app=../ebin/%.app)
-EBIN_FILES_NO_DOCS = $(ERL_OBJECTS) $(APP_FILES:%.app=../ebin/%.app)
+EBIN_FILES = $(ERL_OBJECTS) $(APP_FILES:%.app=../ebin/%.app)
MODULES = $(ERL_SOURCES:%.erl=%)
../ebin/%.app: %.app
@@ -40,7 +37,3 @@ $(EBIN_DIR)/%.$(EMULATOR): %.erl
./%.$(EMULATOR): %.erl
$(ERLC) $(ERLC_FLAGS) -o . $<
-
-$(DOC_DIR)/%.html: %.erl
- $(ERL) -noshell -run edoc file $< -run init stop
- mv *.html $(DOC_DIR)

0 comments on commit 3e0e826

Please sign in to comment.