summaryrefslogtreecommitdiffhomepage
path: root/m4/foot.m4
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-02-22 21:50:58 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-02-22 21:50:58 +0100
commit1fea2c7f5e576766b08502572c799270b4bea3ef (patch)
treec510c48a7cda16d4356452ac319aebb1f6b242e9 /m4/foot.m4
parent3ee8a6dbcdc3c8afaea2b83fdc2437b8868c60d1 (diff)
Add some basics, to test macro functionality
Diffstat (limited to 'm4/foot.m4')
-rw-r--r--m4/foot.m411
1 files changed, 11 insertions, 0 deletions
diff --git a/m4/foot.m4 b/m4/foot.m4
new file mode 100644
index 0000000..243a84b
--- /dev/null
+++ b/m4/foot.m4
@@ -0,0 +1,11 @@
+m4_define(FOOT, ⁨
+ m4_define(⁨__HASH⁩, m4_esyscmd(
+ git rev-list --max-count=1 ⁨HEAD⁩ m4___file__
+ ))
+ m4_define(⁨__DATE⁩, m4_esyscmd(
+ git log --max-count=1 --pretty='format:%cI' m4___file__ \
+ | xargs --no-run-if-empty -- date '+%-d %B %Y (%A) — %T %Z' --date \
+ | ifne -n echo 'No commit yet…'
+ ))
+ m4_include(foot.gsp)
+⁩)