From 063ece9d5b3bcb2f3dccc2a4c2d3373ca262aa07 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 8 Feb 2019 11:01:31 +0100 Subject: [PATCH] "silent" build with make V=0 (default) verbose build is enabled by $ make V=1 --- src/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index bb5779cb..afcace93 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,6 +22,9 @@ # You should have received a copy of the GNU General Public License # along with Grafx2; if not, see +# make V=1 to enable verbose building +V ?= 0 + # Overridable defaults PREFIX ?= /usr/local exec_prefix = $(PREFIX) @@ -782,6 +785,12 @@ FONT_FILES = $(addprefix ../share/grafx2/fonts/,$(FONTS)) DOC_FILES = $(wildcard ../doc/*.txt) DOC_FILESRTF = ../doc/quickstart.rtf +# for silent/verbose building +ACTUAL_CC := $(CC) +CC_0 = @echo "$(if $(findstring .o,$@),Compiling $<,Linking $@)" ; $(ACTUAL_CC) +CC_1 = $(ACTUAL_CC) +CC = $(CC_$(V)) + ifeq ($(PLATFORM),Darwin) all : $(MACAPPEXE) @@ -1050,6 +1059,6 @@ htmldoc: $(GENERATEDOCBIN) $(GENERATEDOCBIN) ../doc/html print-%: - @echo $* = $($*) + @echo "$* = $($*)" -include Makefile.dep