diff options
author | Eugene Sandulenko | 2009-08-22 11:03:00 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-08-22 11:03:00 +0000 |
commit | ea87405ae412c7c4275cc1966750b817e44e255a (patch) | |
tree | 02ef4f8e4808db3b554f5bdd1211e3db334f0bb9 | |
parent | bed502a7c70c122a097d8f9ad7ca2330e69bdccb (diff) | |
download | scummvm-rg350-ea87405ae412c7c4275cc1966750b817e44e255a.tar.gz scummvm-rg350-ea87405ae412c7c4275cc1966750b817e44e255a.tar.bz2 scummvm-rg350-ea87405ae412c7c4275cc1966750b817e44e255a.zip |
Patch #2840212: "Quiet make process"
svn-id: r43635
-rw-r--r-- | Makefile.common | 37 | ||||
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | rules.mk | 12 | ||||
-rw-r--r-- | test/module.mk | 2 | ||||
-rw-r--r-- | tools/module.mk | 12 | ||||
-rw-r--r-- | tools/skycpt/Makefile | 6 |
6 files changed, 50 insertions, 27 deletions
diff --git a/Makefile.common b/Makefile.common index caf5ba22fa..2b00605318 100644 --- a/Makefile.common +++ b/Makefile.common @@ -62,9 +62,24 @@ DEPFILES = # the build date in gScummVMBuildDate is correct. base/version.o: $(filter-out base/libbase.a,$(OBJS)) +# Replace regular output with quiet messages +ifneq ($(findstring $(MAKEFLAGS),s),s) +ifneq ($(VERBOSE_BUILD),1) +ifneq ($(VERBOSE_BUILD),yes) +QUIET_CXX = @echo ' ' C++ ' ' $@; +QUIET_NASM = @echo ' ' NASM ' ' $@; +QUIET_AR = @echo ' ' AR ' ' $@; +QUIET_RANLIB = @echo ' ' RANLIB ' ' $@; +QUIET_PLUGIN = @echo ' ' PLUGIN ' ' $@; +QUIET_LINK = @echo ' ' LINK ' ' $@; +QUIET = @ +endif +endif +endif + # The build rule for the ScummVM executable $(EXECUTABLE): $(OBJS) - $(CXX) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@ + $(QUIET_LINK)$(CXX) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@ distclean: clean $(RM) config.h config.mk config.log @@ -83,27 +98,27 @@ ifndef HAVE_GCC3 # If you use GCC, disable the above and enable this for intelligent # dependency tracking. %.o: %.cpp - $(MKDIR) $(*D)/$(DEPDIR) - $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o - $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d - $(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d" - $(RM) "$(*D)/$(DEPDIR)/$(*F).d2" + $(QUIET)$(MKDIR) $(*D)/$(DEPDIR) + $(QUIET_CXX)$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + $(QUIET)$(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d + $(QUIET)$(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d" + $(QUIET)$(RM) "$(*D)/$(DEPDIR)/$(*F).d2" else # If you even have GCC 3.x, you can use this build rule, which is safer; the above # rule can get you into a bad state if you Ctrl-C at the wrong moment. # Also, with this GCC inserts additional dummy rules for the involved headers, # which ensures a smooth compilation even if said headers become obsolete. %.o: %.cpp - $(MKDIR) $(*D)/$(DEPDIR) - $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + $(QUIET)$(MKDIR) $(*D)/$(DEPDIR) + $(QUIET_CXX)$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o %.o: %.m - $(MKDIR) $(*D)/$(DEPDIR) - $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(OBJCFLAGS) -c $(<) -o $*.o + $(QUIET)$(MKDIR) $(*D)/$(DEPDIR) + $(QUIET_CXX)$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(OBJCFLAGS) -c $(<) -o $*.o endif ifdef HAVE_NASM %.o: %.asm - $(NASM) -O1 $(NASMFLAGS) -g -o $*.o $(<) + $(QUIET_NASM)$(NASM) -O1 $(NASMFLAGS) -g -o $*.o $(<) endif # Include the dependency tracking files. @@ -125,6 +125,7 @@ _backend=sdl _endian=unknown _need_memalign=no _have_x86=no +_verbose_build=no _dynamic_modules=no _plugins_default=static _nasm=auto @@ -660,6 +661,7 @@ for ac_option in $@; do --disable-fluidsynth) _fluidsynth=no ;; --enable-readline) _readline=yes ;; --disable-readline) _readline=no ;; + --enable-verbose-build) _verbose_build=yes ;; --enable-plugins) _dynamic_modules=yes ;; --default-dynamic) _plugins_default=dynamic ;; --enable-mt32emu) _mt32emu=yes ;; @@ -1532,6 +1534,12 @@ add_to_config_h_if_yes $_have_x86 '#define HAVE_X86' add_to_config_h_if_yes $_need_memalign '#define SCUMM_NEED_ALIGNMENT' +# +# Check whether to enable a verbose build +# +echo_n "Checking whether to have a verbose build... " +echo "$_verbose_build" +add_to_config_mk_if_yes "$_verbose_build" 'VERBOSE_BUILD = 1' # # Check whether plugin support is requested and possible @@ -23,7 +23,7 @@ ifdef TOOL_EXECUTABLE ################################################ TOOL-$(MODULE) := $(MODULE)/$(TOOL_EXECUTABLE)$(EXEEXT) $(TOOL-$(MODULE)): $(MODULE_OBJS-$(MODULE)) - $(CXX) $(LDFLAGS) $+ -o $@ + $(QUIET_CXX)$(CXX) $(LDFLAGS) $+ -o $@ # Reset TOOL_EXECUTABLE var TOOL_EXECUTABLE:= @@ -42,8 +42,8 @@ ifdef PLUGIN ################################################ PLUGIN-$(MODULE) := plugins/$(PLUGIN_PREFIX)$(notdir $(MODULE))$(PLUGIN_SUFFIX) $(PLUGIN-$(MODULE)): $(MODULE_OBJS-$(MODULE)) $(PLUGIN_EXTRA_DEPS) - $(MKDIR) plugins - $(CXX) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) $(PLUGIN_LDFLAGS) -o $@ + $(QUIET)$(MKDIR) plugins + $(QUIET_PLUGIN)$(CXX) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) $(PLUGIN_LDFLAGS) -o $@ # Reset PLUGIN var PLUGIN:= @@ -69,9 +69,9 @@ OBJS += $(MODULE_LIB-$(MODULE)) # Convenience library target $(MODULE_LIB-$(MODULE)): $(MODULE_OBJS-$(MODULE)) - -$(RM) $@ - $(AR) $@ $+ - $(RANLIB) $@ + $(QUIET)-$(RM) $@ + $(QUIET_AR)$(AR) $@ $+ + $(QUIET_RANLIB)$(RANLIB) $@ # Pseudo target for comfort, allows for "make common", "make gui" etc. $(MODULE): $(MODULE_LIB-$(MODULE)) diff --git a/test/module.mk b/test/module.mk index 64cb34c7ac..79a1a12023 100644 --- a/test/module.mk +++ b/test/module.mk @@ -22,7 +22,7 @@ TEST_LDFLAGS := test: test/runner ./test/runner test/runner: test/runner.cpp $(TEST_LIBS) - $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TEST_LDFLAGS) $(TEST_CFLAGS) -o $@ $+ + $(QUIET_LINK)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TEST_LDFLAGS) $(TEST_CFLAGS) -o $@ $+ test/runner.cpp: $(TESTS) @mkdir -p test $(srcdir)/test/cxxtest/cxxtestgen.py $(TEST_FLAGS) -o $@ $+ diff --git a/tools/module.mk b/tools/module.mk index 9ad972f477..4c1ea57da6 100644 --- a/tools/module.mk +++ b/tools/module.mk @@ -33,16 +33,16 @@ clean-tools: # tools/convbdf$(EXEEXT): $(srcdir)/tools/convbdf.c - $(MKDIR) tools/$(DEPDIR) - $(CC) $(CFLAGS) -Wall -o $@ $< + $(QUIET)$(MKDIR) tools/$(DEPDIR) + $(QUIET_LINK)$(CC) $(CFLAGS) -Wall -o $@ $< tools/md5table$(EXEEXT): $(srcdir)/tools/md5table.c - $(MKDIR) tools/$(DEPDIR) - $(CC) $(CFLAGS) -Wall -o $@ $< + $(QUIET)$(MKDIR) tools/$(DEPDIR) + $(QUIET_LINK)$(CC) $(CFLAGS) -Wall -o $@ $< tools/make-scumm-fontdata$(EXEEXT): $(srcdir)/tools/make-scumm-fontdata.c - $(MKDIR) tools/$(DEPDIR) - $(CC) $(CFLAGS) -Wall -o $@ $< + $(QUIET)$(MKDIR) tools/$(DEPDIR) + $(QUIET_LINK)$(CC) $(CFLAGS) -Wall -o $@ $< # # Rules to explicitly rebuild the credits / MD5 tables. diff --git a/tools/skycpt/Makefile b/tools/skycpt/Makefile index bfa9937519..b907e6782d 100644 --- a/tools/skycpt/Makefile +++ b/tools/skycpt/Makefile @@ -9,10 +9,10 @@ OBJS=AsciiCptCompile.o cptcompiler.o cpthelp.o idFinder.o KmpSearch.o stdafx.o T all: $(TARGET) clean: - rm -f $(TARGET) $(OBJS) + $(QUIET)$(RM) $(TARGET) $(OBJS) $(TARGET): $(OBJS) - $(CC) $(OBJS) $(LDFLAGS) -o $(TARGET) + $(QUIET_CXX)$(CXX) $(OBJS) $(LDFLAGS) -o $(TARGET) %.o: %.cpp - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
\ No newline at end of file + $(QUIET_CXX)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ |