Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build documentation #135

Closed
bangbambang opened this issue Sep 12, 2014 · 2 comments
Closed

Failed to build documentation #135

bangbambang opened this issue Sep 12, 2014 · 2 comments

Comments

@bangbambang
Copy link

Trying to build documentation.

make edoc
==> mochiweb (doc)
ERROR: doc failed while processing /home/bambang/mochiweb: {'EXIT',{{badmatch,{error,bad_directory}},
         [{rebar_edoc,setup_code_path,0,[]},
          {rebar_edoc,doc,2,[]},
          {rebar_core,run_modules,4,[]},
          {rebar_core,execute,6,[]},
          {rebar_core,maybe_execute,8,[]},
          {rebar_core,process_dir1,7,[]},
          {rebar_core,process_commands,2,[]},
          {rebar,main,1,[]}]}}
make: *** [edoc] Error 1

Directory content:

[bambang@host mochiweb]$ ls
CHANGES.md  Makefile  examples  rebar         scripts  support
LICENSE     README    include   rebar.config  src      test

System info:

[bambang@host mochiweb]$ erl -noshell -eval 'io:fwrite("~s\n", [erlang:system_info(otp_release)]).' -s erlang halt
17
[bambang@host mochiweb]$ uname -a
Linux host 2.6.32-042stab090.5 #1 SMP Sat Jun 21 00:15:09 MSK 2014 i686 i686 i386 GNU/Linux

Any help on how to fix this?

@twonds
Copy link
Member

twonds commented Sep 12, 2014

Its missing the ebin directory on a fresh clone so you need to create it or run make all before running make edoc

 ~/src/github.com/mochiweb> make edoc
==> mochiweb (doc)
ERROR: doc failed while processing /Users/czorn/src/github.com/mochiweb: {'EXIT',{{badmatch,{error,bad_directory}},
         [{rebar_edoc,setup_code_path,0,[]},
          {rebar_edoc,doc,2,[]},
          {rebar_core,run_modules,4,[]},
          {rebar_core,execute,6,[]},
          {rebar_core,maybe_execute,8,[]},
          {rebar_core,process_dir1,7,[]},
          {rebar_core,process_commands,2,[]},
          {rebar,main,1,[]}]}}
make: *** [edoc] Error 1
 ~/src/github.com/mochiweb> make
==> mochiweb (prepare-deps)
==> mochiweb (get-deps)
==> mochiweb (compile)
Compiled src/mochifmt_records.erl
Compiled src/mochifmt_std.erl
Compiled src/mochifmt.erl
Compiled src/mochihex.erl
Compiled src/mochiglobal.erl
Compiled src/mochilists.erl
Compiled src/mochilogfile2.erl
Compiled src/mochinum.erl
Compiled src/mochitemp.erl
Compiled src/mochiutf8.erl
Compiled src/mochijson.erl
Compiled src/mochiweb.erl
Compiled src/mochiweb_acceptor.erl
Compiled src/mochiweb_base64url.erl
Compiled src/mochiweb_cookies.erl
Compiled src/mochiweb_cover.erl
Compiled src/mochiweb_echo.erl
Compiled src/mochijson2.erl
Compiled src/mochiweb_headers.erl
Compiled src/mochiweb_http.erl
Compiled src/mochiweb_io.erl
Compiled src/mochiweb_mime.erl
Compiled src/mochiweb_multipart.erl
Compiled src/mochiweb_html.erl
Compiled src/mochiweb_response.erl
Compiled src/mochiweb_session.erl
Compiled src/mochiweb_socket.erl
Compiled src/mochiweb_request.erl
Compiled src/mochiweb_socket_server.erl
Compiled src/mochiweb_util.erl
Compiled src/reloader.erl
Compiled src/mochiweb_websocket.erl
Compiled src/mochiweb_charref.erl
czorn@czorn ~/src/github.com/mochiweb> make edoc
==> mochiweb (doc)
~/src/github.com/mochiweb> ls doc
edoc-info           mochihex.html           mochiutf8.html          mochiweb_echo.html      mochiweb_request.html       modules-frame.html
erlang.png          mochijson.html          mochiweb.html           mochiweb_headers.html       mochiweb_response.html      overview-summary.html
index.html          mochijson2.html         mochiweb_acceptor.html      mochiweb_html.html      mochiweb_session.html       packages-frame.html
mochifmt.html           mochilists.html         mochiweb_base64url.html     mochiweb_http.html      mochiweb_socket.html        reloader.html
mochifmt_records.html       mochilogfile2.html      mochiweb_charref.html       mochiweb_io.html        mochiweb_socket_server.html stylesheet.css
mochifmt_std.html       mochinum.html           mochiweb_cookies.html       mochiweb_mime.html      mochiweb_util.html
mochiglobal.html        mochitemp.html          mochiweb_cover.html     mochiweb_multipart.html     mochiweb_websocket.html

A quick fix would be

diff --git a/Makefile b/Makefile
index e53eef5..33601c7 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ REBAR=./rebar
 all:
        @$(REBAR) prepare-deps

-edoc:
+edoc: all
        @$(REBAR) doc

@bangbambang
Copy link
Author

Thanks. I suppose this issue can be closed, yes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants