diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | doc/doc.mk | 2 | ||||
-rw-r--r-- | doc/documentation.tex | 2 |
3 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,6 @@ BUILD_DIR := ./build DATE := $(BUILD_DIR)/date.txt +VERSION_FILE := $(BUILD_DIR)/version.txt ARTIFACTS_DIR := $(BUILD_DIR)/artifacts VERSION := $(shell git describe --dirty --long --always) TARGET_NAME := soundbox-$(VERSION) @@ -12,6 +13,9 @@ all: $(ARCHIVE) $(VERSIONED_DOC) $(DATE): git show -s --format=%cs > $@ +$(VERSION_FILE): + echo '$(VERSION)' > $@ + $(ARCHIVE): $(TARGET_DIR) tar --zstd -cf $@ -C $(ARTIFACTS_DIR) $(TARGET_NAME) @@ -9,7 +9,7 @@ IMAGES := $(DIAGRAMS:%=$(DIAGRAMS_BUILD_DIR)/%.pdf) .PHONY: doc doc: $(DOCUMENTS) -$(DOC_BUILD_DIR)/%.pdf: doc/%.tex $(IMAGES) $(DATE) +$(DOC_BUILD_DIR)/%.pdf: doc/%.tex $(IMAGES) $(DATE) $(VERSION_FILE) mkdir -p $(dir $@) pdflatex -halt-on-error -output-directory $(DOC_BUILD_DIR) $< pdflatex -halt-on-error -output-directory $(DOC_BUILD_DIR) $< diff --git a/doc/documentation.tex b/doc/documentation.tex index 8bc3112..0a59c7e 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -1,7 +1,7 @@ \documentclass{report} \author{xengineering} \title{soundbox documentation} -\date{\input{../date.txt}} +\date{\input{../date.txt}- version \input{../version.txt}} \usepackage{graphicx} \graphicspath{ {./diagrams/} } |