doc/Makefile: Fix build dir setting
The commit 4d8da8ed ("Docs: Update sphinx targets with the build directory")
introduces an additional variable intending to allow an user to specify
a different build directory. Since the variable is not writable from the
outside and also the Docker container used to build doc.coreboot.org
calls the Makefile with `BUILDDIR` instead of `SPHINXDIR`, building the
documentation within the container doesn't work anymore.
Thus, change the variable name to `BUILDDIR` and make it writable.
Steps to reproduce:
cd util/docker
make doc.coreboot.org
make docker-build-docs
Change-Id: Ibc44134cf1996592597252aeb9dcf7ffb3378ee3
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 60a3f35..54306a2 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -5,7 +5,7 @@
#
PDFLATEX = pdflatex -t a4
-SPHINXDIR = _build
+BUILDDIR ?= _build
FIGS=codeflow.pdf hypertransport.pdf
@@ -33,8 +33,8 @@
convert $< $@
endif
-$(SPHINXDIR):
- mkdir -p $(SPHINXDIR)
+$(BUILDDIR):
+ mkdir -p $(BUILDDIR)
corebootPortingGuide.toc: $(FIGS) corebootBuildingGuide.tex
# 2 times to make sure we have a current toc.
@@ -44,11 +44,11 @@
corebootPortingGuide.pdf: $(FIGS) corebootBuildingGuide.tex corebootPortingGuide.toc
$(PDFLATEX) corebootBuildingGuide.tex
-sphinx: $(SPHINXDIR)
- $(MAKE) -f Makefile.sphinx html BUILDDIR="$(SPHINXDIR)"
+sphinx: $(BUILDDIR)
+ $(MAKE) -f Makefile.sphinx html BUILDDIR="$(BUILDDIR)"
clean-sphinx:
- $(MAKE) -f Makefile.sphinx clean BUILDDIR="$(SPHINXDIR)"
+ $(MAKE) -f Makefile.sphinx clean BUILDDIR="$(BUILDDIR)"
clean: clean-sphinx
rm -f *.aux *.idx *.log *.toc *.out $(FIGS)
@@ -56,8 +56,8 @@
distclean: clean
rm -f corebootPortingGuide.pdf
-livesphinx: $(SPHINXDIR)
- $(MAKE) -f Makefile.sphinx livehtml SPHINXOPTS="$(SPHINXOPTS)" BUILDDIR="$(SPHINXDIR)"
+livesphinx: $(BUILDDIR)
+ $(MAKE) -f Makefile.sphinx livehtml SPHINXOPTS="$(SPHINXOPTS)" BUILDDIR="$(BUILDDIR)"
test:
@echo "Test for logging purposes - Failing tests will not fail the build"