From f036b1d5e79d5a0cd916b6c1fd85f82bc0441516 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Fri, 16 Jun 2023 06:26:05 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75893 Tested-by: build bot (Jenkins) Reviewed-by: Nicholas Chin Reviewed-by: Elyes Haouas Reviewed-by: Martin L Roth --- Documentation/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 60a3f359af..54306a278c 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 @@ else ifneq ($(strip $(CONVERT)),) 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.toc: $(FIGS) corebootBuildingGuide.tex 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 @@ clean: clean-sphinx 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"