Skip to content

Commit

Permalink
Added $(ERL_DOCUMENTS) to include.mk for edoc during Jungerl build.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpressey committed Feb 26, 2003
1 parent 4ce24ba commit 90797ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lib/wumpus/src/Makefile
@@ -1,18 +1,8 @@
include ../../../support/include.mk

# this is not the proper way to do it, but it works

../doc/%.html: %.erl
${ERL} -noshell \
-pa ../../syntax_tools/ebin \
-pa ../../edoc/ebin \
-pa ../../xmerl/ebin \
-run edoc file $< -run init stop
mv *.html ../doc/

all: $(ERL_OBJECTS) ../doc/wumpus.html
all: $(ERL_OBJECTS) $(ERL_DOCUMENTS)

clean:
-rm $(ERL_OBJECTS)
-rm ../doc/wumpus.html
-rm $(ERL_DOCUMENTS)

13 changes: 13 additions & 0 deletions support/include.mk.in
Expand Up @@ -40,12 +40,25 @@ 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)

$(EBIN_DIR)/%.$(EMULATOR): %.erl
$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $<

# generate documentation with edoc:
# this is still not the proper way to do it, but it works
# (see the wumpus application for an example)

$(DOC_DIR)/%.html: %.erl
${ERL} -noshell \
-pa ../../syntax_tools/ebin \
-pa ../../edoc/ebin \
-pa ../../xmerl/ebin \
-run edoc file $< -run init stop
mv *.html $(DOC_DIR)

0 comments on commit 90797ac

Please sign in to comment.