aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordrowe67 <[email protected]>2023-12-11 11:54:02 +1030
committerDavid Rowe <[email protected]>2023-12-11 11:54:02 +1030
commit21dd265f96391d11c0e09196e62bcd62a3d2828c (patch)
treeadf635a4be8f750958a0b57cdd076b3e7e0d0240 /doc
parentea0379f375fee5f9574a51a797025aa5e9390db8 (diff)
way to run doc ctest without over writing codec2.doc
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile23
1 files changed, 12 insertions, 11 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 606d05f..0658fe1 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -5,24 +5,25 @@
# cd ~/codec2/doc
# make
-# Set these externally with an env variable (e.g. for GitHub action) to override
-# defaults below. Need to run cmake with -DDUMP
+DOCNAME ?= codec2
+
+# Set these externally to override defaults. JOBNAME sets the output file basename,
+# and avoids over writing codec2.pdf (e.g. when we are running a doc build test, but don't actually
+# want to change codec2.pdf in the repo)
CODEC2_SRC ?= $(HOME)/codec2
CODEC2_BINARY ?= $(HOME)/codec2/build_linux
+JOBNAME ?= $(DOCNAME)
PATH := $(PATH):$(CODEC2_BINARY)/src
-DOCNAME := codec2
PLOT_FILES := hts2a_37_sn.tex hts2a_37_sw.tex hts2a_37_lpc_lsp.tex hts2a_37_lpc_pf.tex
-# For automated tests we always want to build the PDF, despite codec2.pdf existing in the repo
-.PHONY: pdf
-pdf: $(PLOT_FILES) $(DOCNAME).tex $(DOCNAME)_refs.bib
- pdflatex $(DOCNAME).tex
- bibtex $(DOCNAME).aux
- pdflatex $(DOCNAME).tex
- pdflatex $(DOCNAME).tex
+$(DOCNAME).pdf: $(PLOT_FILES) $(DOCNAME).tex $(DOCNAME)_refs.bib
+ pdflatex -jobname=$(JOBNAME) $(DOCNAME).tex
+ bibtex $(JOBNAME).aux
+ pdflatex -jobname=$(JOBNAME) $(DOCNAME).tex
+ pdflatex -jobname=$(JOBNAME) $(DOCNAME).tex
$(PLOT_FILES):
echo $(PATH)
@@ -31,4 +32,4 @@ $(PLOT_FILES):
.PHONY: clean
clean:
- rm -f *.blg *.bbl *.aux *.log *.out $(DOCNAME).pdf hts2a* \ No newline at end of file
+ rm -f *.blg *.bbl *.aux *.log *.out hts2a* \ No newline at end of file