From b6258a5d452fb2c6703fb4f0c1908cb1514c55e0 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 14 Nov 2025 06:37:35 -0500 Subject: Embed version in unalf and man page. --- src/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 2c8a31d..7dac912 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,7 @@ +VERSION=0.1.0 + COPT=-O3 -CFLAGS=-Wall -Wno-unused-label -I../f65 $(COPT) +CFLAGS=-DVERSION='"$(VERSION)"' -Wall -Wno-unused-label -I../f65 $(COPT) all: unalf unalf.1 alfsum alfsum.1 @@ -24,10 +26,13 @@ extract.o: extract.c addrs.h unalf.h ../f65/f65.h ../f65/f65.o: ../f65/f65.c ../f65/f65.h -unalf.1: unalf.rst +ver.rst: + echo '.. |version| replace:: $(VERSION)' > ver.rst + +unalf.1: unalf.rst ver.rst rst2man unalf.rst > unalf.1 -alfsum.1: alfsum.rst +alfsum.1: alfsum.rst ver.rst rst2man alfsum.rst > alfsum.1 clean: -- cgit v1.2.3