diff options
| author | drowe67 <[email protected]> | 2023-12-11 11:54:02 +1030 |
|---|---|---|
| committer | David Rowe <[email protected]> | 2023-12-11 11:54:02 +1030 |
| commit | 21dd265f96391d11c0e09196e62bcd62a3d2828c (patch) | |
| tree | adf635a4be8f750958a0b57cdd076b3e7e0d0240 | |
| parent | ea0379f375fee5f9574a51a797025aa5e9390db8 (diff) | |
way to run doc ctest without over writing codec2.doc
| -rw-r--r-- | CMakeLists.txt | 3 | ||||
| -rw-r--r-- | doc/Makefile | 23 |
2 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f3a1dc..ff1b295 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,7 +314,8 @@ if(UNITTEST) add_test(NAME test_codec2_doc COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/doc; - CODEC2_SRC=${CMAKE_CURRENT_SOURCE_DIR} CODEC2_BINARY=${CMAKE_CURRENT_BINARY_DIR} make") + make clean; + CODEC2_SRC=${CMAKE_CURRENT_SOURCE_DIR} CODEC2_BINARY=${CMAKE_CURRENT_BINARY_DIR} JOBNAME=test make") add_test(NAME test_freedv_get_hash COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/unittest/thash") 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 |
