summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--doc/doc.mk2
-rw-r--r--doc/documentation.tex1
3 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2615d02..63f9e65 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
BUILD_DIR := ./build
+DATE := $(BUILD_DIR)/date.txt
ARTIFACTS_DIR := $(BUILD_DIR)/artifacts
VERSION := $(shell git describe --dirty --long --always)
TARGET_NAME := soundbox-$(VERSION)
@@ -8,6 +9,9 @@ ARCHIVE := $(ARTIFACTS_DIR)/$(TARGET_NAME).tar.zst
all: $(ARCHIVE) $(VERSIONED_DOC)
+$(DATE):
+ git show -s --format=%cs > $@
+
$(ARCHIVE): $(TARGET_DIR)
tar --zstd -cf $@ -C $(ARTIFACTS_DIR) $(TARGET_NAME)
diff --git a/doc/doc.mk b/doc/doc.mk
index 351cd48..11571b6 100644
--- a/doc/doc.mk
+++ b/doc/doc.mk
@@ -9,7 +9,7 @@ IMAGES := $(DIAGRAMS:%=$(DIAGRAMS_BUILD_DIR)/%.pdf)
.PHONY: doc
doc: $(DOCUMENTS)
-$(DOC_BUILD_DIR)/%.pdf: doc/%.tex $(IMAGES)
+$(DOC_BUILD_DIR)/%.pdf: doc/%.tex $(IMAGES) $(DATE)
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 a6ba82b..6448186 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -1,6 +1,7 @@
\documentclass{report}
\author{xengineering}
\title{soundbox documentation}
+\date{\input{../date.txt}}
\usepackage{graphicx}
\graphicspath{ {./diagrams/} }