commit: 591dd4ebc96103e6e9b1d62b66be54ca83062076
parent b5c35a2aac5fd23f1e1a112e7eda24579b8f8bc1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 1 Nov 2023 04:12:54 +0100
Use m4 instead of soelim
Rationale: m4 is part of POSIX while soelim is absent from it and NetBSD
Hopefully the lack of special syntax for macro statements isn't going to be
a problem.
Diffstat:
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
@@ -49,14 +49,14 @@ cmd/date: cmd/date.c lib/iso_parse.c Makefile
$(CC) -std=c99 $(CFLAGS) -o $@ cmd/date.c lib/iso_parse.c $(LDFLAGS)
cmd/date.1: cmd/date.1.in lib/iso_parse.mdoc Makefile
- $(SOELIM) -r cmd/date.1.in > cmd/date.1
+ $(M4) cmd/date.1.in > cmd/date.1
cmd/touch: cmd/touch.c lib/iso_parse.c Makefile
rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
$(CC) -std=c99 $(CFLAGS) -o $@ cmd/touch.c lib/iso_parse.c $(LDFLAGS)
cmd/touch.1: cmd/touch.1.in lib/iso_parse.mdoc Makefile
- $(SOELIM) -r cmd/touch.1.in > cmd/touch.1
+ $(M4) cmd/touch.1.in > cmd/touch.1
cmd/sleep: cmd/sleep.c lib/strtodur.c Makefile
rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
diff --git a/README.md b/README.md
@@ -18,7 +18,6 @@ Tested on Linux(musl), FreeBSD, NetBSD, OpenBSD: <https://builds.sr.ht/~lanodan/
## Dependencies
- POSIX System
-- `soelim` (as present in GNU groff and mandoc)
- (optional, test) ATF: <https://github.com/jmmv/atf>
- (optional, test) Kyua: <https://github.com/jmmv/kyua>
- (optional, test) bwrap: <https://github.com/containers/bubblewrap/> For safely overlaying false files on the root filesystem
diff --git a/cmd/date.1.in b/cmd/date.1.in
@@ -19,7 +19,7 @@ is invoked without arguments it displays the current datetime
Otherwise, depending on the options specified, will print the datetime in a user-defined way.
.Bl -tag -width Ds
.It Fl d Ar datetime
-.so lib/iso_parse.mdoc
+include(lib/iso_parse.mdoc)
.It Fl u
Use UTC (coordinated universal time) instead of the local time.
.El
diff --git a/cmd/touch.1.in b/cmd/touch.1.in
@@ -32,7 +32,7 @@ Change the modification time, no changes to access time unless
.Fl a
is also given.
.It Fl d Ar datetime
-.so lib/iso_parse.mdoc
+include(lib/iso_parse.mdoc)
.It Fl r Ar ref_file
Use the corresponding times of the file at
.Ar ref_file
diff --git a/configure b/configure
@@ -19,7 +19,7 @@ Variables:
MSGFMT=BIN
CC=BIN
MAKE=BIN
- SOELIM=BIN
+ M4=BIN
MANDOC=BIN
SHELLCHECK=BIN
FLAWFINDER=BIN
@@ -97,7 +97,7 @@ MAKE="${MAKE:-make}"
GCOV="${GCOV:-gcov}"
# -DDEBUG: Otherwise assert() does nothing, fine to be removed in production
CFLAGS="${CFLAGS:--g -O2 -DDEBUG}"
-SOELIM="${SOELIM:-soelim}"
+M4="${M4:-m4}"
MANDOC="${MANDOC:-mandoc}"
SHELLCHECK="${SHELLCHECK:-shellcheck}"
FLAWFINDER="${FLAWFINDER:-flawfinder}"
@@ -146,7 +146,7 @@ rm -f config.mk && echo '#' > target_filter ; or_die
check_cmd PKGCONFIG "$PKGCONFIG" || exit 1
check_cmd CC "$CC" || exit 1
check_cmd MAKE "$MAKE" || exit 1
-check_cmd SOELIM "$SOELIM" || exit 1
+check_cmd M4 "$M4" || exit 1
if check_cmd GCOV "$GCOV"
then
@@ -227,7 +227,7 @@ MANDIR = ${MANDIR}
PKGCONFIG = ${PKGCONFIG}
CC = ${CC}
MAKE = ${MAKE}
-SOELIM = ${SOELIM}
+M4 = ${M4}
MANDOC = ${MANDOC}
SHELLCHECK = ${SHELLCHECK}
FLAWFINDER = ${FLAWFINDER}
diff --git a/lib/iso_parse.mdoc b/lib/iso_parse.mdoc
@@ -38,4 +38,4 @@ This is the only part which disagrees with RFC3339 due to the lack of timezone-o
.El
.Pp
For example:
-.Ql 2003-06-02T13:37:42.713Z
+.Ql 2003-06-02T13:37:42.713Z
+\ No newline at end of file