Skip to content

Commit

Permalink
Add Bazel rules to build PDF docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lupino3 committed Jul 26, 2018
1 parent 4771f1a commit 6df923b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/user/en/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,25 @@ genrule(
]),
)

genrule(
name = "pdf",
srcs = [
":src",
":makefile",
"//docs/user:common_conf",
],
outs = ["EduMIPS64.pdf"],
cmd = "\n".join([
# Get the absolute path of the output directory as a destination.
"DST=$$(readlink -f $(@D))",
"echo $$DST",
"cd $$(dirname $(location :makefile))",
# Remove -Q to debug Sphinx.
"make latexpdf BUILDDIR=$$DST SPHINXOPTS='-N -a -E -Q'",
"cp $$DST/latex/EduMIPS64.pdf $$DST/EduMIPS64.pdf"
]),
)

filegroup(
name = "html_files",
srcs = html_files,
Expand Down
19 changes: 19 additions & 0 deletions docs/user/it/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,25 @@ genrule(
]),
)

genrule(
name = "pdf",
srcs = [
":src",
":makefile",
"//docs/user:common_conf",
],
outs = ["EduMIPS64.pdf"],
cmd = "\n".join([
# Get the absolute path of the output directory as a destination.
"DST=$$(readlink -f $(@D))",
"echo $$DST",
"cd $$(dirname $(location :makefile))",
# Remove -Q to debug Sphinx.
"make latexpdf BUILDDIR=$$DST SPHINXOPTS='-N -a -E -Q'",
"cp $$DST/latex/EduMIPS64.pdf $$DST/EduMIPS64.pdf"
]),
)

filegroup(
name = "html_files",
srcs = html_files,
Expand Down

0 comments on commit 6df923b

Please sign in to comment.