From 29a1905c7d8d8174c25d2c5de4c33bb5c2b55c61 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 22 Oct 2015 14:56:37 +0000 Subject: [PATCH] common.mk: showflags only once * common.mk (showflags): do not show flags from recursive make. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- common.mk | 14 ++++++++------ defs/gmake.mk | 2 +- ext/extmk.rb | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/common.mk b/common.mk index d854264b37..a5e897e578 100644 --- a/common.mk +++ b/common.mk @@ -156,13 +156,15 @@ TESTRUN_SCRIPT = $(srcdir)/test.rb COMPILE_PRELUDE = $(srcdir)/tool/generic_erb.rb $(srcdir)/template/prelude.c.tmpl -all: showflags main docs +SHOWFLAGS = showflags -main: showflags $(ENCSTATIC:static=lib)encs exts +all: $(SHOWFLAGS) main docs + +main: $(SHOWFLAGS) $(ENCSTATIC:static=lib)encs exts @$(NULLCMD) .PHONY: showflags -exts enc trans: showflags +exts enc trans: $(SHOWFLAGS) showflags: $(MESSAGE_BEGIN) \ " CC = $(CC)" \ @@ -219,8 +221,8 @@ Doxyfile: $(srcdir)/template/Doxyfile.tmpl $(PREP) $(srcdir)/tool/generic_erb.rb $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ $(srcdir)/template/Doxyfile.tmpl \ --srcdir="$(srcdir)" --miniruby="$(MINIRUBY)" -program: showflags $(PROGRAM) -wprogram: showflags $(WPROGRAM) +program: $(SHOWFLAGS) $(PROGRAM) +wprogram: $(SHOWFLAGS) $(WPROGRAM) mini: PHONY miniruby$(EXEEXT) $(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP) @@ -631,7 +633,7 @@ yes-runnable: PHONY encs: enc trans libencs: libenc libtrans -encs enc trans libencs libenc libtrans: showflags $(ENC_MK) $(LIBRUBY) $(PREP) PHONY +encs enc trans libencs libenc libtrans: $(SHOWFLAGS) $(ENC_MK) $(LIBRUBY) $(PREP) PHONY $(ECHO) making $@ $(Q) $(MAKE) -f $(ENC_MK) V="$(V)" \ RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" \ diff --git a/defs/gmake.mk b/defs/gmake.mk index 50b1ac5312..439ca9b6f0 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -18,7 +18,7 @@ ifeq ($(if $(filter all main exts enc trans libencs libenc libtrans \ wprogram rubyw rubyw$(EXEEXT) \ miniruby$(EXEEXT) mini,\ $(MAKECMDGOALS)),,$(MAKECMDGOALS)),) --include showflags +-include $(SHOWFLAGS) endif ifneq ($(filter universal-%,$(arch)),) diff --git a/ext/extmk.rb b/ext/extmk.rb index ad01ff4d2b..38b25e2a27 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -703,6 +703,7 @@ if $configure_only and $command_output end submakeopts << 'EXTLDFLAGS="$(EXTLDFLAGS)"' submakeopts << 'UPDATE_LIBRARIES="$(UPDATE_LIBRARIES)"' + submakeopts << 'SHOWFLAGS=' mf.macro "SUBMAKEOPTS", submakeopts mf.puts targets = %w[all install static install-so install-rb clean distclean realclean]