From: Andre Noll Date: Sun, 28 Apr 2024 02:10:18 +0000 (+0200) Subject: build: Use variables for lobsubgen, groff and rm commands. X-Git-Tag: v1.0.2~23 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=aa32681b4f7ef8c02afda4ca28ca46d16b6feed2;p=dss.git build: Use variables for lobsubgen, groff and rm commands. --- 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