]> granicus.if.org Git - nethack/commitdiff
Reduce *nix Makefile verbosity
authorPasi Kallinen <paxed@alt.org>
Sat, 14 Oct 2017 12:51:45 +0000 (15:51 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 14 Oct 2017 12:56:03 +0000 (15:56 +0300)
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
sys/unix/Makefile.src
sys/unix/Makefile.utl

index c037bade61eb0db4be170a421dad4e5ccd921c0a..2032a283b3d87b6f1d431ec0c396168de5364449 100644 (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
index 8c27b612cd61eac4f43000f702916c22a010b7e1..3696ce5c05b17fbc98a8a4066c430450dbc58874 100644 (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
index 3cd34906e5407b91fed229ac27f4d38383064909..dc56d4fdfd28bc55ac19570b97fe36b9e6a4dcfa 100644 (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