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>
This commit is contained in:
Felix Singer 2023-06-16 06:26:05 +02:00 committed by Felix Held
parent 9fd5c69b79
commit f036b1d5e7
1 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
# #
PDFLATEX = pdflatex -t a4 PDFLATEX = pdflatex -t a4
SPHINXDIR = _build BUILDDIR ?= _build
FIGS=codeflow.pdf hypertransport.pdf FIGS=codeflow.pdf hypertransport.pdf
@ -33,8 +33,8 @@ else ifneq ($(strip $(CONVERT)),)
convert $< $@ convert $< $@
endif endif
$(SPHINXDIR): $(BUILDDIR):
mkdir -p $(SPHINXDIR) mkdir -p $(BUILDDIR)
corebootPortingGuide.toc: $(FIGS) corebootBuildingGuide.tex corebootPortingGuide.toc: $(FIGS) corebootBuildingGuide.tex
# 2 times to make sure we have a current toc. # 2 times to make sure we have a current toc.
@ -44,11 +44,11 @@ corebootPortingGuide.toc: $(FIGS) corebootBuildingGuide.tex
corebootPortingGuide.pdf: $(FIGS) corebootBuildingGuide.tex corebootPortingGuide.toc corebootPortingGuide.pdf: $(FIGS) corebootBuildingGuide.tex corebootPortingGuide.toc
$(PDFLATEX) corebootBuildingGuide.tex $(PDFLATEX) corebootBuildingGuide.tex
sphinx: $(SPHINXDIR) sphinx: $(BUILDDIR)
$(MAKE) -f Makefile.sphinx html BUILDDIR="$(SPHINXDIR)" $(MAKE) -f Makefile.sphinx html BUILDDIR="$(BUILDDIR)"
clean-sphinx: clean-sphinx:
$(MAKE) -f Makefile.sphinx clean BUILDDIR="$(SPHINXDIR)" $(MAKE) -f Makefile.sphinx clean BUILDDIR="$(BUILDDIR)"
clean: clean-sphinx clean: clean-sphinx
rm -f *.aux *.idx *.log *.toc *.out $(FIGS) rm -f *.aux *.idx *.log *.toc *.out $(FIGS)
@ -56,8 +56,8 @@ clean: clean-sphinx
distclean: clean distclean: clean
rm -f corebootPortingGuide.pdf rm -f corebootPortingGuide.pdf
livesphinx: $(SPHINXDIR) livesphinx: $(BUILDDIR)
$(MAKE) -f Makefile.sphinx livehtml SPHINXOPTS="$(SPHINXOPTS)" BUILDDIR="$(SPHINXDIR)" $(MAKE) -f Makefile.sphinx livehtml SPHINXOPTS="$(SPHINXOPTS)" BUILDDIR="$(BUILDDIR)"
test: test:
@echo "Test for logging purposes - Failing tests will not fail the build" @echo "Test for logging purposes - Failing tests will not fail the build"