Skip to content

Commit

Permalink
Make more silent when -s on GNU make
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 29, 2020
1 parent d57c5a7 commit 2f42243
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ TESTRUN_SCRIPT = $(srcdir)/test.rb
COMPILE_PRELUDE = $(tooldir)/generic_erb.rb $(srcdir)/template/prelude.c.tmpl \
$(tooldir)/ruby_vm/helpers/c_escape.rb

SHOWFLAGS = showflags
SHOWFLAGS = $(no_silence:no=showflags)

MAKE_LINK = $(MINIRUBY) -rfileutils -e "include FileUtils::Verbose" \
-e "src, dest = ARGV" \
Expand Down
1 change: 1 addition & 0 deletions template/GNUmakefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
gnumake = yes

include Makefile
override silence := $(if $(findstring s,$(firstword $(MFLAGS))),yes,no)

ifeq ($(HAVE_BASERUBY),yes)
override REVISION_FORCE := PHONY
Expand Down
7 changes: 5 additions & 2 deletions template/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

SHELL = /bin/sh
NULLCMD = @NULLCMD@
silence = no # yes/no
yes_silence = $(silence:no=)
no_silence = $(silence:yes=)
n=$(NULLCMD)
ECHO1 = $(V:1=$n)
RUNCMD = $(SHELL)
Expand Down Expand Up @@ -356,8 +359,8 @@ uncommon.mk: $(srcdir)/common.mk
sed 's/{\$$([^(){}]*)[^{}]*}//g' $< > $@

.PHONY: reconfig
reconfig-args = $(srcdir)/$(CONFIGURE) $(configure_args)
config.status-args = ./config.status --recheck
reconfig-args = $(srcdir)/$(CONFIGURE) $(yes_silence:yes=-s) $(configure_args)
config.status-args = ./config.status $(yes_silence:yes=-s) --recheck
reconfig-exec-0 = test -t 1 && { : $${CONFIGURE_TTY=yes}; export CONFIGURE_TTY; }; exec 3>&1; exit `exec 4>&1; { "$$@" 3>&- 4>&-; echo $$? 1>&4; } | fgrep -v '(cached)' 1>&3 3>&- 4>&-`
reconfig-exec-1 = set -x; "$$@"

Expand Down

0 comments on commit 2f42243

Please sign in to comment.