Permalink
Browse files

make_doc is now 'retargetable' using the TGT env var

  • Loading branch information...
1 parent 48bc5c3 commit a301b4f81dd23e17dedf57013f59b935f56aa56c @uwiger uwiger committed May 8, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 make_doc
View
@@ -8,15 +8,22 @@
%%
main([]) ->
code:add_patha("ebin"),
+ Default = "esl",
+ U = case os:getenv("TGT") of
+ [] -> Default;
+ false -> Default;
+ Str -> Str
+ end,
+ TopURL = "http://github.com/" ++ U ++ "/edown",
+ io:fwrite("Making edown docs for [~s]...~n", [TopURL]),
R = edoc:application(edown, ".",
[{doclet, edown_doclet},
{source_path, ["src"]},
{app_default,"http://www.erlang.org/doc/man"},
{stylesheet, ""}, % don't copy stylesheet.css
{image, ""}, % don't copy erlang.png
{top_level_readme,
- {"./README.md",
- "http://github.com/esl/edown"}}]),
+ {"./README.md", TopURL}}]),
case R of
ok ->
halt();

0 comments on commit a301b4f

Please sign in to comment.