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
This commit is contained in:
Pasi Kallinen
2017-10-14 15:51:45 +03:00
parent 1caa212bd9
commit 1ff4dfee85
3 changed files with 35 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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