diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/__base.m4 | 7 | ||||
-rw-r--r-- | m4/foot.m4 | 11 | ||||
-rw-r--r-- | m4/head.m4 | 1 | ||||
-rw-r--r-- | m4/include.m4 | 3 |
4 files changed, 22 insertions, 0 deletions
diff --git a/m4/__base.m4 b/m4/__base.m4 new file mode 100644 index 0000000..611a256 --- /dev/null +++ b/m4/__base.m4 @@ -0,0 +1,7 @@ +m4_dnl To avoid annoying conflicts with quote characters, use +m4_dnl U+2068 FIRST STRONG ISOLATE and U+2069 POP DIRECTIONAL ISOLATE +m4_changequote(,) + +m4_dnl We also need to avoid the comment character ever doing absolutely +m4_dnl anything, so set it to U+FFFD REPLACEMENT CHARACTER +m4_changecom(�) 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) +) diff --git a/m4/head.m4 b/m4/head.m4 new file mode 100644 index 0000000..9161929 --- /dev/null +++ b/m4/head.m4 @@ -0,0 +1 @@ +m4_define(HEAD, m4_include(head.gsp)) diff --git a/m4/include.m4 b/m4/include.m4 new file mode 100644 index 0000000..ef22bf1 --- /dev/null +++ b/m4/include.m4 @@ -0,0 +1,3 @@ +m4_dnl Exactly the same as m4_include, but following the same naming conventions +m4_dnl as the other macros I create. +m4_define(INCLUDE, m4_include($1)) |