From aa32681b4f7ef8c02afda4ca28ca46d16b6feed2 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 28 Apr 2024 04:10:18 +0200 Subject: [PATCH] build: Use variables for lobsubgen, groff and rm commands. --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 40f40e4..c03e95a 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ INSTALL_PROGRAM ?= $(INSTALL) INSTALL_DATA ?= $(INSTALL) -m 644 MKDIR_P := mkdir -p VERSION := $(shell ./version-gen.sh dss version.c) +RM := rm -f +LSG := lopsubgen +GROFF := groff -m man -Thtml -P -l -P -r units := dss str file exec sig daemon df tv snap ipc dss.lsg version objs := $(addsuffix .o, $(units)) @@ -49,19 +52,19 @@ dss: $(objs) -MMD -MF $(*F).d -MT $@ $< %.lsg.h: %.suite $(call SAY, LSGH $<) - lopsubgen --gen-h=$@ < $< + $(LSG) --gen-h=$@ < $< %.lsg.c: %.suite $(call SAY, LSGC $<) - lopsubgen --gen-c=$@ < $< + $(LSG) --gen-c=$@ < $< %.1: %.suite $(call SAY, LSGM $<) - lopsubgen --gen-man=$@ --version-string=$(VERSION) < $< + $(LSG) --gen-man=$@ --version-string=$(VERSION) < $< %.1.html: %.1 $(call SAY, GROFF $<) - groff -m man -Thtml -P -l -P -r $< | sed -e '1,/^/d; /^<\/body>/,$$d' > $@ + $(GROFF) $< | sed -e '1,/^/d; /^<\/body>/,$$d' > $@ clean: $(call SAY, CLEAN) - rm -f *.[od] dss dss.1 *.html dss.lsg.[ch] version.c + $(RM) *.[od] dss dss.1 *.html dss.lsg.[ch] version.c ifneq ($(findstring strip, $(MAKECMDGOALS)),) strip_option := -s -- 2.39.5