]> git.tuebingen.mpg.de Git - dss.git/commitdiff
build: Use variables for lobsubgen and rm commands.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 28 Apr 2024 02:10:18 +0000 (04:10 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 6 May 2024 20:07:41 +0000 (22:07 +0200)
Makefile

index d0721ed9c1067f031a336b49fb93cdb7f2666ff7..3f3afd32e24d2af85b5350ea97b9b6f0501a6a03 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@ 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
 
 units := dss str file exec sig daemon df tv snap ipc dss.lsg version
 objs := $(addsuffix .o, $(units))
@@ -49,20 +51,20 @@ 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,/^<body>/d; /^<\/body>/,$$d' > $@
 
 clean:
        $(call SAY, CLEAM)
-       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