Skip to content

Commit

Permalink
Fix out-of-tree build of docs, fix #29757.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Oct 25, 2018
1 parent 66cd7d2 commit e17e4d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ help:
@echo "To fix outdated doctests, use 'make <target> doctest=fix'"


DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest)
DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT))

UnicodeData.txt:
$(JLDOWNLOAD) http:https://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt
Expand Down
8 changes: 6 additions & 2 deletions doc/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,12 @@ for stdlib in STDLIB_DOCS
end

const render_pdf = "pdf" in ARGS
let r = r"buildroot=(.+)", i = findfirst(x -> occursin(r, x), ARGS)
global const buildroot = i === nothing ? (@__DIR__) : first(match(r, ARGS[i]).captures)
end

makedocs(
build = joinpath(@__DIR__, "_build", (render_pdf ? "pdf" : "html"), "en"),
build = joinpath(buildroot, "doc", "_build", (render_pdf ? "pdf" : "html"), "en"),
modules = [Base, Core, BuildSysImg, [Base.root_module(Base, stdlib.stdlib) for stdlib in STDLIB_DOCS]...],
clean = true,
doctest = ("doctest=fix" in ARGS) ? (:fix) : ("doctest=true" in ARGS) ? true : false,
Expand All @@ -171,7 +175,7 @@ makedocs(
if "deploy" in ARGS && Sys.ARCH === :x86_64 && Sys.KERNEL === :Linux
deploydocs(
repo = "github.com/JuliaLang/julia.git",
target = "_build/html/en",
target = joinpath(buildroot, "doc", "_build", "html", "en"),
dirname = "en",
devurl = "v1.1-dev",
versions = ["v#.#", "v1.1-dev" => "v1.1-dev"]
Expand Down

0 comments on commit e17e4d3

Please sign in to comment.