summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2021-12-15 20:00:07 +0100
committerJonas Bernoulli <jonas@bernoul.li>2021-12-15 22:36:41 +0100
commitf4790969fe9ed0084be537ed476e9292d1e92244 (patch)
treeb6944a0c86615e4b0d865b9f986b57739d66a04d
parent459e28e28a5f29e4dd59c7d61ec8557ce9b57ef3 (diff)
make: Add stats target
-rw-r--r--.gitignore1
-rw-r--r--Makefile4
-rw-r--r--default.mk4
-rw-r--r--docs/Makefile5
4 files changed, 14 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 668ffb9..3578139 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
/docs/*.info
/docs/*.pdf
/docs/dir
+/docs/stats/
/docs/transient/
/lisp/*.elc
/lisp/transient-autoloads.el
diff --git a/Makefile b/Makefile
index 7f5ab43..db38d2c 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ help:
$(info make html - generate html manual file)
$(info make html-dir - generate html manual directory)
$(info make pdf - generate pdf manual)
+ $(info make stats - generate statistics)
$(info make publish - publish snapshot manuals)
$(info make release - publish release manuals)
$(info make clean - remove most generated files)
@@ -40,6 +41,9 @@ html-dir:
pdf:
@$(MAKE) -C docs pdf
+stats:
+ @$(MAKE) -C docs stats
+
publish:
@$(MAKE) -C docs publish
diff --git a/default.mk b/default.mk
index 1d4fd17..6977ea0 100644
--- a/default.mk
+++ b/default.mk
@@ -1,3 +1,5 @@
+TOP := $(dir $(lastword $(MAKEFILE_LIST)))
+
PKG = transient
ELS = $(PKG).el
@@ -21,3 +23,5 @@ endif
INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
MAKEINFO ?= makeinfo
MANUAL_HTML_ARGS ?= --css-ref /assets/page.css
+
+STATS_DIR ?= $(TOP)docs/stats
diff --git a/docs/Makefile b/docs/Makefile
index 86573aa..ae2a4f5 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -60,6 +60,11 @@ html-dir: $(PKG).texi
@printf "Generating $@\n"
@texi2pdf --clean $< > /dev/null
+.PHONY: stats
+stats:
+ @printf "Generating statistics\n"
+ @gitstats -c style=https://magit.vc/assets/stats.css -c max_authors=999 $(TOP) $(STATS_DIR)
+
DOMAIN ?= magit.vc
PUBLISH_PATH ?= /manual/
RELEASE_PATH ?= /manual/$(VERSION)/