Skip to content

Commit

Permalink
Fix documentation build
Browse files Browse the repository at this point in the history
  • Loading branch information
wallento committed Apr 22, 2017
1 parent a0848e3 commit fa8e2fd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 53 deletions.
11 changes: 6 additions & 5 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SPHINXBUILD=.venv/bin/sphinx-build
SPHINXBUILD?=.venv/bin/sphinx-build
OBJDIR?=_build

all: html

Expand All @@ -11,12 +12,12 @@ apidoc:
make -C api

html: .env apidoc
$(SPHINXBUILD) -b html . _build/html
$(SPHINXBUILD) -b html . $(OBJDIR)/html

pdf: .env apidoc
$(SPHINXBUILD) -b latex . _build/pdf
make -C _build/pdf/ all-pdf
$(SPHINXBUILD) -b latex . $(OBJDIR)/pdf
make -C $(OBJDIR)/pdf/ all-pdf

clean:
make -C api clean
rm -rf _build
rm -rf $(OBJDIR)
38 changes: 0 additions & 38 deletions doc/user_guide/Makefile

This file was deleted.

21 changes: 11 additions & 10 deletions tools/build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python3
#
# Copyright (c) 2016 by the author(s)
# Copyright (c) 2016-2017 by the author(s)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,6 +22,7 @@
#
# Author(s):
# Philipp Wagner <philipp.wagner@tum.de>
# Stefan Wallentowitz <stefan@wallentowitz.de>
#
#
# Build, package and install the OpTiMSoC distribution
Expand Down Expand Up @@ -519,24 +520,24 @@ def build_docs(options):

info("Build and install documentation")


check_program("python3")
check_program("pdflatex")

user_guide_srcdir = os.path.join(src, "doc", "user_guide")
user_guide_objdir = os.path.join(objdir, "doc", "user_guide")
ensure_directory(user_guide_objdir)
doc_srcdir = os.path.join(src, "doc")
doc_objdir = os.path.join(objdir, "doc")
ensure_directory(doc_objdir)

info(" + Build")
cmd="make -j {} pdf OBJDIR={}".format(nthreads, user_guide_objdir)
run_command(cmd, cwd=user_guide_srcdir)
cmd="make -j {} pdf OBJDIR={}".format(nthreads, doc_objdir)
run_command(cmd, cwd=doc_srcdir)

info(" + Install build artifacts")
distdoc = os.path.join(dist, "doc")
ensure_directory(distdoc)

srcuser_guide = os.path.join(user_guide_objdir, "user_guide.pdf")
distuser_guide = os.path.join(distdoc, "user_guide.pdf")
file_copy(srcuser_guide, distuser_guide)
srcdocpdf = os.path.join(doc_objdir, "pdf", "OpTiMSoC.pdf")
distdocpdf = os.path.join(distdoc, "OpTiMSoC.pdf")
file_copy(srcdocpdf, distdocpdf)

srcreadme = os.path.join(src, "README.installed")
distreadme = os.path.join(dist, "README")
Expand Down

0 comments on commit fa8e2fd

Please sign in to comment.