From: Andre Noll Date: Sun, 28 Apr 2024 01:25:28 +0000 (+0200) Subject: Make the build quiet by default. X-Git-Tag: v1.0.2~24 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=7a4cb5a8ca0464725a49b7f113f3a269eeaf325c;p=dss.git Make the build quiet by default. This teaches make(1) to give all lines of the recipe to a single shell invocation, speeding up the build and facilitating the simple SAY function to quieten the build. The old verbose output can still be obtained by running make V=1. --- diff --git a/Makefile b/Makefile index d1c1866..40f40e4 100644 --- a/Makefile +++ b/Makefile @@ -30,24 +30,37 @@ DSS_CFLAGS += -Wunused-parameter DSS_CFLAGS += -Wbad-function-cast DSS_CFLAGS += -Wshadow +.ONESHELL: +.SHELLFLAGS := -ec +ifeq ("$(origin V)", "command line") + SAY = +else + SAY = @printf '%s\n' '$(strip $(1))' +endif version.c: + $(call SAY, VG $@) ./version-gen.sh dss version.c > /dev/null dss: $(objs) + $(call SAY, LD $@) $(CC) -o $@ $(objs) $(LDFLAGS) -llopsub %.o: %.c + $(call SAY, CC $<) $(CC) -c -o $@ $(DSS_CPPFLAGS) $(CPPFLAGS) $(DSS_CFLAGS) $(CFLAGS) \ -MMD -MF $(*F).d -MT $@ $< %.lsg.h: %.suite + $(call SAY, LSGH $<) lopsubgen --gen-h=$@ < $< %.lsg.c: %.suite + $(call SAY, LSGC $<) lopsubgen --gen-c=$@ < $< %.1: %.suite + $(call SAY, LSGM $<) lopsubgen --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' > $@ - clean: + $(call SAY, CLEAN) rm -f *.[od] dss dss.1 *.html dss.lsg.[ch] version.c ifneq ($(findstring strip, $(MAKECMDGOALS)),)