Skip to content

Commit 2690419

Browse files
author
José Valim
committed
Merge pull request #1222 from jjh42/doc-error
Added more informative error to Makefile when ex_doc is not available.
2 parents f552d76 + ce55936 commit 2690419

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ erl_crash.dump
1414
.dialyzer_plt
1515
.dialyzer.base_plt
1616
.*.swp
17+
docs

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,15 @@ clean:
9696

9797
SOURCE_REF = $(shell head="$$(git rev-parse HEAD)" tag="$$(git tag --points-at $$head | tail -1)" ; echo "$${tag:-$$head}\c")
9898

99-
docs: compile
99+
docs: compile ../ex_doc/bin/ex_doc
100100
mkdir -p ebin
101101
rm -rf docs
102102
cp -R -f lib/*/ebin/*.beam ./ebin
103103
bin/elixir ../ex_doc/bin/ex_doc "Elixir" "$(VERSION)" -m Kernel -u "https://github.com/elixir-lang/elixir" --source-ref "$(call SOURCE_REF)"
104-
rm -rf ebin
104+
105+
../ex_doc/bin/ex_doc:
106+
@ echo "ex_doc is not found in ../ex_doc as expected. See README for more information."
107+
@ false
105108

106109
release_zip: compile
107110
rm -rf v$(VERSION).zip

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ However, if tests fail, it is likely you have an outdated Erlang version (Elixir
2020

2121
If you have the correct version and tests still fail, feel free to [open an issue][2].
2222

23+
## Building documentation
24+
25+
Building the documentation requires [ex_doc](https://github.com/elixir-lang/ex_doc) to be installed and built in the same containing folder as elixir.
26+
27+
# After cloning and compiling Elixir
28+
$ git clone git://github.com/elixir-lang/ex_doc.git
29+
$ cd ../ex_doc && ../elixir/bin/mix compile
30+
$ cd ../elixir && make docs
31+
2332
## Contributing
2433

2534
We appreciate any contribution to Elixir, so check out our [CONTRIBUTING.md](CONTRIBUTING.md) guide for more information. We usually keep a list of features and bugs [in the issue tracker][2].

0 commit comments

Comments
 (0)