.PHONY: default
###--------------------------------------------------------------------------
+### Clever silent-rules stuff.
+
+## Verbosity switch.
+V = 0
+
+## Suppressing command output.
+V_AT = $(V_AT_$V)
+V_AT_0 = @
+V_AT_1 =
+
+## Replacing them with messages.
+v_echo = $(call v_echo_$V,$1)
+v_echo_0 = @printf " %-6s %s\n" "$1" "$@";
+v_echo_1 =
+
+## Hacking.
+empty =
+space = $(empty) $(empty)
+
+## Specific commands.
+V_M4 = $(call v_echo,M4)m4 -P$(space)
+V_GEN = $(call v_echo,GEN)
+
+###--------------------------------------------------------------------------
### Local configuration.
## Should set up HOSTS and add stuff to MAIN_M4_SOURCES if necessary. Feel
.PHONY: all
%.sh: %.m4 $(M4_SOURCES)
- m4 -P base.m4 $*.m4 $(MAIN_M4_SOURCES) >$@.new
- chmod +x $@.new
- mv $@.new $@
+ $(V_M4)base.m4 $*.m4 $(MAIN_M4_SOURCES) >$@.new
+ $(V_AT)chmod +x $@.new && mv $@.new $@
clean:; rm -f $(TARGETS) *.new
.PHONY: clean