From 21dd265f96391d11c0e09196e62bcd62a3d2828c Mon Sep 17 00:00:00 2001 From: drowe67 Date: Mon, 11 Dec 2023 11:54:02 +1030 Subject: way to run doc ctest without over writing codec2.doc --- doc/Makefile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'doc/Makefile') 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 -- cgit v1.2.3