generated docs: docs/ instead of doc/

This appears to be more of a standard directory name.

See #21
master
Andrew Kelley 2019-10-06 14:48:01 -04:00
parent 571123465b
commit 86171afb9b
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 4 additions and 4 deletions

View File

@ -10355,15 +10355,15 @@ void codegen_build_and_link(CodeGen *g) {
}
}
if (g->enable_doc_generation) {
Buf *doc_dir_path = buf_sprintf("%s" OS_SEP "doc", buf_ptr(g->output_dir));
Buf *doc_dir_path = buf_sprintf("%s" OS_SEP "docs", buf_ptr(g->output_dir));
if ((err = os_make_path(doc_dir_path))) {
fprintf(stderr, "Unable to create directory %s: %s\n", buf_ptr(doc_dir_path), err_str(err));
exit(1);
}
Buf *index_html_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "doc" OS_SEP "index.html",
Buf *index_html_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "index.html",
buf_ptr(g->zig_std_dir));
Buf *index_html_dest_path = buf_sprintf("%s" OS_SEP "index.html", buf_ptr(doc_dir_path));
Buf *main_js_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "doc" OS_SEP "main.js",
Buf *main_js_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "main.js",
buf_ptr(g->zig_std_dir));
Buf *main_js_dest_path = buf_sprintf("%s" OS_SEP "main.js", buf_ptr(doc_dir_path));

View File

@ -65,7 +65,7 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
" -ftime-report print timing diagnostics\n"
" -fstack-report print stack size diagnostics\n"
" -fdump-analysis write analysis.json file with type information\n"
" -fgenerate-docs create a doc/ dir with html documentation\n"
" -fgenerate-docs create a docs/ dir with html documentation\n"
" --libc [file] Provide a file which specifies libc paths\n"
" --name [name] override output name\n"
" --output-dir [dir] override output directory (defaults to cwd)\n"