ICU-9611 silent compile for linux

X-SVN-Rev: 32441
This commit is contained in:
Steven R. Loomis 2012-09-27 19:04:34 +00:00
parent 6eef7bff7b
commit 12b8931555
3 changed files with 17 additions and 9 deletions

View File

@ -1011,7 +1011,12 @@
<li>Type <tt>"gmake"</tt> (or "make" if GNU make is the default make on <li>Type <tt>"gmake"</tt> (or "make" if GNU make is the default make on
your platform) to compile the libraries and all the data files. The proper your platform) to compile the libraries and all the data files. The proper
name of the GNU make command is printed at the end of the configuration name of the GNU make command is printed at the end of the configuration
run, as in "You must use gmake to compile ICU".</li> run, as in "You must use gmake to compile ICU".
<br/>
Note that the compilation command output may be simplified on your platform. If this is the case, you will see just:
<blockquote><tt style='background-color: #ddd; font-size: small'>gcc ... stubdata.c</tt></blockquote> rather than <blockquote><tt style='background-color: #ddd; font-size: small'>gcc -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -D_REENTRANT -I../common -DU_ATTRIBUTE_DEPRECATED= -O2 -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -c -DPIC -fPIC -o stubdata.o stubdata.c</tt></blockquote>. <br/>
If you need to see the whole compilation line, use <tt>"gmake VERBOSE=1"</tt>. The full compilation line will print if an error occurs.<p>
</li>
<li>Optionally, type <tt>"gmake check"</tt> to run the test suite, which <li>Optionally, type <tt>"gmake check"</tt> to run the test suite, which
checks for ICU's functionality integrity (See <a href= checks for ICU's functionality integrity (See <a href=

View File

@ -1,6 +1,6 @@
## -*-makefile-*- ## -*-makefile-*-
## Linux-specific setup ## Linux-specific setup
## Copyright (c) 1999-2010, International Business Machines Corporation and ## Copyright (c) 1999-2012, International Business Machines Corporation and
## others. All Rights Reserved. ## others. All Rights Reserved.
## Commands to generate dependency files ## Commands to generate dependency files
@ -39,25 +39,25 @@ STATIC_O = ao
## Compilation rules ## Compilation rules
%.$(STATIC_O): $(srcdir)/%.c %.$(STATIC_O): $(srcdir)/%.c
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -o $@ $<)
%.o: $(srcdir)/%.c %.o: $(srcdir)/%.c
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS)) -o $@ $<)
%.$(STATIC_O): $(srcdir)/%.cpp %.$(STATIC_O): $(srcdir)/%.cpp
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -o $@ $<)
%.o: $(srcdir)/%.cpp %.o: $(srcdir)/%.cpp
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS)) -o $@ $<)
## Dependency rules ## Dependency rules
%.d: $(srcdir)/%.c %.d: $(srcdir)/%.c
@echo "generating dependency information for $<" $(call ICU_MSG,(deps)) $<
@$(SHELL) -ec '$(GEN_DEPS.c) $< \ @$(SHELL) -ec '$(GEN_DEPS.c) $< \
| sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
[ -s $@ ] || rm -f $@' [ -s $@ ] || rm -f $@'
%.d: $(srcdir)/%.cpp %.d: $(srcdir)/%.cpp
@echo "generating dependency information for $<" $(call ICU_MSG,(deps)) $<
@$(SHELL) -ec '$(GEN_DEPS.cc) $< \ @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
| sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
[ -s $@ ] || rm -f $@' [ -s $@ ] || rm -f $@'

View File

@ -172,6 +172,9 @@ LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS)
SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS)
# ICU_MSG
ICU_MSG=@echo " $(1) "
# Do not show the large compiling arguments by default. # Do not show the large compiling arguments by default.
# To use: # To use:
# change # change
@ -179,7 +182,7 @@ SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS)
# to # to
# $(call SILENT_COMPILE,$(CC) -o foo) # $(call SILENT_COMPILE,$(CC) -o foo)
ifndef VERBOSE ifndef VERBOSE
SILENT_COMPILE=@echo " $(notdir $(firstword $(1))) ... " $< && $(1) || \ SILENT_COMPILE=$(call ICU_MSG,$(notdir $(firstword $(1)))) "... " $< && $(1) || \
( echo "*** Failed compilation command follows: ----------------------------------------------------------" ; \ ( echo "*** Failed compilation command follows: ----------------------------------------------------------" ; \
echo "$(1)" ; \ echo "$(1)" ; \
echo "--- ( rebuild with \"$(MAKE) VERBOSE=1 $(MAKECMDGOALS)\" to show all parameters ) --------" ; \ echo "--- ( rebuild with \"$(MAKE) VERBOSE=1 $(MAKECMDGOALS)\" to show all parameters ) --------" ; \