aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorViktor Söderqvist <[email protected]>2015-01-10 17:09:35 +0100
committerViktor Söderqvist <[email protected]>2015-01-10 17:09:35 +0100
commitddca43cbb6b0ec3d2110a59a1571f9522e3b8e9c (patch)
treee5451373a296110edf5a5be4f22eb107aa665818 /test
parent7f1f97aef8b6e34f9641705dd4e2e556afb9e78f (diff)
downloaderlang.mk-ddca43cbb6b0ec3d2110a59a1571f9522e3b8e9c.tar.gz
erlang.mk-ddca43cbb6b0ec3d2110a59a1571f9522e3b8e9c.tar.bz2
erlang.mk-ddca43cbb6b0ec3d2110a59a1571f9522e3b8e9c.zip
Adds DOC_DEPS; fixes #75
Diffstat (limited to 'test')
-rw-r--r--test/Makefile28
1 files changed, 25 insertions, 3 deletions
diff --git a/test/Makefile b/test/Makefile
index 619c3e5..c387081 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -33,9 +33,9 @@ else
i = @echo ==
endif
-.PHONY: all clean app ct eunit
+.PHONY: all clean app ct eunit docs
-all: app ct eunit clean
+all: app ct eunit docs clean
$i '+---------------------+'
$i '| All tests passed. |'
$i '+---------------------+'
@@ -99,7 +99,6 @@ ct: app1
eunit: app1
$i "eunit: Testing the 'eunit' target."
- $t mkdir -p eunit
$i "Running eunit test case inside module src/t.erl"
$t printf '%s\n' \
'-module(t).' \
@@ -148,6 +147,29 @@ eunit: app1
$t rm -rf app1/eunit app1/src/t.erl app1/test-eunit.log
$i "Test 'eunit' passed."
+docs: app1
+ $i "docs: Testing EDoc including DOC_DEPS."
+ $t printf "%s\n" \
+ "PROJECT = app1" \
+ "DOC_DEPS = edown" \
+ "dep_edown = git https://github.com/uwiger/edown.git 0.5" \
+ "EDOC_OPTS = {doclet, edown_doclet}" \
+ "include erlang.mk" \
+ "distclean:: distclean-doc-md" \
+ "distclean-doc-md:" \
+ " rm -rf doc/*.md" \
+ > app1/Makefile-doc
+ $i "Downloading doc deps (edown) and building docs."
+ $t make -C app1 -f Makefile-doc docs $v
+ $i "Checking that 'make docs' using edown generated a markdown file."
+ $t [ -e app1/doc/m.md ]
+ $i "Checking that 'make distclean' deletes all generated doc files."
+ $t make -C app1 -f Makefile-doc distclean $v
+ $t [ "`ls app1/doc/`" == "" ]
+ $i "Cleaning up test data."
+ $t rm app1/Makefile-doc
+ $i "Test 'docs' passed."
+
# Test application used for testing.
app1:
$i "Setting up app."