]> granicus.if.org Git - icu/commitdiff
ICU-9611 silent compile for linux
authorSteven R. Loomis <srl@icu-project.org>
Thu, 27 Sep 2012 19:04:34 +0000 (19:04 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Thu, 27 Sep 2012 19:04:34 +0000 (19:04 +0000)
X-SVN-Rev: 32441

icu4c/readme.html
icu4c/source/config/mh-linux
icu4c/source/icudefs.mk.in

index 47b9f16255678d8c9c8f081a8819a3d369b7ff5c..4da7b434890fcd8a40ecac76f959debdbf3796a8 100644 (file)
       <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
       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
       checks for ICU's functionality integrity (See <a href=
index 6a8299f11ebad5b8ac181724c20b0797fc714aa9..366f0cc7446f265a8a5cc25017ff12fcc6f68222 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-makefile-*-
 ## 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.
 
 ## Commands to generate dependency files
@@ -39,25 +39,25 @@ STATIC_O = ao
 
 ## Compilation rules
 %.$(STATIC_O): $(srcdir)/%.c
-       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
+       $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -o $@ $<)
 %.o: $(srcdir)/%.c
-       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
+       $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS)) -o $@ $<)
 
 %.$(STATIC_O): $(srcdir)/%.cpp
-       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
+       $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -o $@ $<)
 %.o: $(srcdir)/%.cpp
-       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
+       $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS)) -o $@ $<)
 
 
 ## Dependency rules
 %.d: $(srcdir)/%.c
-       @echo "generating dependency information for $<"
+       $(call ICU_MSG,(deps)) $<
        @$(SHELL) -ec '$(GEN_DEPS.c) $< \
                | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
                [ -s $@ ] || rm -f $@'
 
 %.d: $(srcdir)/%.cpp
-       @echo "generating dependency information for $<"
+       $(call ICU_MSG,(deps)) $<
        @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
                | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
                [ -s $@ ] || rm -f $@'
index b66852c46f74f375cff97543ba1a9e310183c2de..54a62931dbd329bb470fc8188d12e08253e33cea 100644 (file)
@@ -172,6 +172,9 @@ LINK.cc=      $(CXX) $(CXXFLAGS) $(LDFLAGS)
 SHLIB.c=      $(CC) $(CFLAGS) $(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.
 # To use:
 # change
@@ -179,7 +182,7 @@ SHLIB.cc=     $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS)
 # to
 #    $(call SILENT_COMPILE,$(CC) -o foo)
 ifndef VERBOSE
-    SILENT_COMPILE=@echo "     $(notdir $(firstword $(1)))     ... " $< && $(1) || \
+    SILENT_COMPILE=$(call ICU_MSG,$(notdir $(firstword $(1)))) "... " $< && $(1) || \
                        ( echo "*** Failed compilation command follows: ----------------------------------------------------------" ; \
                          echo "$(1)" ; \
                          echo "--- ( rebuild with \"$(MAKE) VERBOSE=1 $(MAKECMDGOALS)\" to show all parameters ) --------" ; \