From 1ff4dfee854be09b14c434d49c1f5bf680554e7d Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 14 Oct 2017 15:51:45 +0300 Subject: [PATCH] Reduce *nix Makefile verbosity Instead of showing all the CFLAGS and whatnot, just show "[CC] allmain.c" or whatever. The verbose output can be switched back on with VERBOSEMAKE=1 --- doc/fixes36.1 | 1 + sys/unix/Makefile.src | 19 ++++++++++++++++++- sys/unix/Makefile.utl | 20 ++++++++++++++++---- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index c037bade6..2032a283b 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -709,6 +709,7 @@ X11: status display split into three columns to accomodate Stone/Deaf/Lev/&c; X11: more terminal-like default resources win32gui: save and load map colors from registry X11: add new character selection dialog, and obey player_selection:dialog +unix: reduce makefile verbosity by default NetHack Community Patches (or Variation) Included diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 8c27b612c..3696ce5c0 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -332,6 +332,9 @@ RANDOBJ = # used by `make depend' to reconstruct this Makefile; you shouldn't need this AWK = nawk + +#VERBOSEMAKE = 1 + # ---------------------------------------- # # Nothing below this line should have to be changed. @@ -339,6 +342,20 @@ AWK = nawk # Other things that have to be reconfigured are in config.h, # {unixconf.h, pcconf.h, tosconf.h}, and possibly system.h +# Verbosity +ACTUAL_CC := $(CC) +CC_V0 = @echo "[CC] $<"; $(ACTUAL_CC) +CC_V = $(CC_V0) +CC_V1 = $(ACTUAL_CC) +CC = $(CC_V$(VERBOSEMAKE)) + +ACTUAL_CXX := $(CXX) +CXX_V0 = @echo "[CXX] $<"; $(ACTUAL_CXX) +CXX_V = $(CXX_V0) +CXX_V1 = $(ACTUAL_CXX) +CXX = $(CXX_V$(VERBOSEMAKE)) + + MAKEDEFS = ../util/makedefs # timestamp files to reduce `make' overhead and shorten .o dependency lists @@ -438,7 +455,7 @@ $(GAME): $(SYSTEM) Sysunix: $(HOBJ) Makefile @echo "Loading ..." - $(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS) + @$(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS) @touch Sysunix Sys3B2: $(HOBJ) Makefile diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index 3cd34906e..dc56d4fdf 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -130,6 +130,20 @@ LEXYYC = lex.yy.c # # Nothing below this line should have to be changed. +# Verbosity +ACTUAL_CC := $(CC) +CC_V0 = @echo "[CC] $<"; $(ACTUAL_CC) +CC_V = $(CC_V0) +CC_V1 = $(ACTUAL_CC) +CC = $(CC_V$(VERBOSEMAKE)) + +ACTUAL_CXX := $(CXX) +CXX_V0 = @echo "[CXX] $<"; $(ACTUAL_CXX) +CXX_V = $(CXX_V0) +CXX_V1 = $(ACTUAL_CXX) +CXX = $(CXX_V$(VERBOSEMAKE)) + + # timestamps for primary header files, matching src/Makefile CONFIG_H = ../src/config.h-t HACK_H = ../src/hack.h-t @@ -232,8 +246,7 @@ lev_main.o: lev_main.c $(HACK_H) ../include/sp_lev.h ../include/tcap.h \ # egrep will return failure if it doesn't find anything, but we know there # is one "_cplusplus" inside a comment lev_lex.o: lev_lex.c $(HACK_H) ../include/lev_comp.h ../include/sp_lev.h - @echo $(CC) -c $(CFLAGS) lev_lex.c - @$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c + $(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c # '$(YACC) -d' generates both $(YTABC) and $(YTABH) in one run ../include/lev_comp.h: lev_yacc.c @@ -270,8 +283,7 @@ dgn_main.o: dgn_main.c $(CONFIG_H) ../include/dlb.h # see dgn_comp.l for WEIRD_LEX discussion dgn_lex.o: dgn_lex.c $(CONFIG_H) ../include/dgn_comp.h ../include/dgn_file.h - @echo $(CC) -c $(CFLAGS) dgn_lex.c - @$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c + $(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c # '$(YACC) -d' generates both $(YTABC) and $(YTABH) in one run ../include/dgn_comp.h: dgn_yacc.c -- 2.40.0