mirror of
https://github.com/valitydev/parse_trans.git
synced 2024-11-06 00:25:16 +00:00
makefile and doc fixes
git-svn-id: http://svn.ulf.wiger.net/parse_trans/trunk/parse_trans@8 ae7daa23-5771-0410-ae54-ec81a0701e84
This commit is contained in:
parent
d8797a5b5b
commit
69a94863e7
8
Makefile
8
Makefile
@ -16,6 +16,9 @@ TEST_BEAMS := $(patsubst %.erl,%.beam, $(TEST_SOURCES))
|
||||
EXAMPLE_SOURCES := $(wildcard examples/*.erl)
|
||||
EXAMPLE_BEAMS := $(patsubst %.erl,%.beam, $(EXAMPLE_SOURCES))
|
||||
|
||||
UTIL_SOURCES := $(wildcard util/*.erl)
|
||||
UTIL_BEAMS := $(patsubst %.erl,%.beam, $(UTIL_SOURCES))
|
||||
|
||||
include vsn.mk
|
||||
|
||||
.PHONY: all clean dialyzer
|
||||
@ -50,7 +53,7 @@ ebin:
|
||||
@echo Creating ebin/
|
||||
@mkdir ebin/
|
||||
|
||||
doc: doc/edoc-info
|
||||
doc: doc/edoc-info util
|
||||
|
||||
dialyzer: util/my_plt.plt
|
||||
@echo Running dialyzer on sources
|
||||
@ -61,9 +64,10 @@ doc/edoc-info: doc/overview.edoc $(SOURCES)
|
||||
@echo Generating documentation from edoc
|
||||
@erl -pa util/ -noinput -s make_doc edoc
|
||||
|
||||
util: $(UTIL_BEAMS)
|
||||
|
||||
util/%.beam: util/%.erl
|
||||
@erlc -o util/ $<
|
||||
@erlc -o util/ -DTHIS_APP=$(APPLICATION) $<
|
||||
|
||||
util/my_plt.plt: util/make_plt.beam
|
||||
@erl -noinput -pa util -eval 'make_plt:add([syntax_tools],"util/my_plt.plt")'
|
||||
|
@ -63,6 +63,6 @@ Forms = [{attribute,1,file,{"./ex1.erl",1}},
|
||||
|
||||
<hr>
|
||||
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
|
||||
<p><i>Generated by EDoc, Sep 11 2009, 05:25:22.</i></p>
|
||||
<p><i>Generated by EDoc, Oct 14 2009, 08:22:53.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -180,6 +180,6 @@
|
||||
<hr>
|
||||
|
||||
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
|
||||
<p><i>Generated by EDoc, Sep 11 2009, 05:25:22.</i></p>
|
||||
<p><i>Generated by EDoc, Oct 14 2009, 08:22:53.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
Binary file not shown.
@ -30,7 +30,7 @@
|
||||
|
||||
edoc() ->
|
||||
try
|
||||
edoc:application(lhttpc, "./", [{doc, "doc/"}])
|
||||
edoc:application(?THIS_APP, "./", [{doc, "doc/"}])
|
||||
catch _:_ ->
|
||||
halt(1)
|
||||
end,
|
||||
|
@ -24,7 +24,7 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ----------------------------------------------------------------------------
|
||||
# Script for making a release of lhttpc. Or any program in hg really. Check
|
||||
# Script for making a release of this app. Or any program in hg really. Check
|
||||
# the Makefile target release for how to use it.
|
||||
|
||||
NAME=$1
|
||||
|
@ -36,6 +36,7 @@
|
||||
-define(FILE_NAME(MODULE),
|
||||
"cover_report/" ++ atom_to_list(MODULE) ++ ".html").
|
||||
|
||||
|
||||
run() ->
|
||||
Modules = get_modules(),
|
||||
ok = cover_compile(Modules),
|
||||
@ -77,7 +78,7 @@ write_report(Modules) ->
|
||||
[
|
||||
"<html>\n<head><title>Cover report index</title></head>\n"
|
||||
"<body>\n"
|
||||
"<h1>Cover report for lhttpc</h1>"
|
||||
"<h1>Cover report for ", atom_to_list(?THIS_APP), "</h1>"
|
||||
"Total coverage: ", integer_to_list(TotalPercentage), "%"
|
||||
"<h2>Cover for individual modules</h2>\n"
|
||||
"<ul>\n\t",
|
||||
@ -107,8 +108,8 @@ percentage([], Covered, Lines, Percentages) ->
|
||||
{(Covered * 100) div Lines, Percentages}.
|
||||
|
||||
get_modules() ->
|
||||
application:load(lhttpc),
|
||||
{ok, Modules} = application:get_key(lhttpc, modules),
|
||||
application:load(?THIS_APP),
|
||||
{ok, Modules} = application:get_key(?THIS_APP, modules),
|
||||
Modules.
|
||||
|
||||
cover_compile([Module | Modules]) ->
|
||||
@ -119,4 +120,4 @@ cover_compile([]) ->
|
||||
|
||||
%%% Eunit functions
|
||||
application_test_() ->
|
||||
{application, lhttpc}.
|
||||
{application, ?THIS_APP}.
|
||||
|
Loading…
Reference in New Issue
Block a user