Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: native_client_sdk/src/tools/common.mk

Issue 12209097: [NaCl SDK] make example Makefiles quiet by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/tools/common.mk
diff --git a/native_client_sdk/src/tools/common.mk b/native_client_sdk/src/tools/common.mk
index 25a6e084412267c9ce772e12b7421f85f8913001..302cbdd65ff8c18d5d603062a4127a61b76e87af 100644
--- a/native_client_sdk/src/tools/common.mk
+++ b/native_client_sdk/src/tools/common.mk
@@ -65,12 +65,19 @@ export CYGWIN
#
# Alias for standard POSIX file system commands
#
-CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp
-MKDIR:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir
-MV:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mv
-RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm
-WHICH:=python $(NACL_SDK_ROOT)/tools/oshelpers.py which
-
+OSHELPERS=python $(NACL_SDK_ROOT)/tools/oshelpers.py
+WHICH:=$(OSHELPERS) which
+ifdef V
+RM:=$(OSHELPERS) rm
+CP:=$(OSHELPERS) cp
+MKDIR:=$(OSHELPERS) mkdir
+MV:=$(OSHELPERS) mv
+else
+RM:=@$(OSHELPERS) rm
+CP:=@$(OSHELPERS) cp
+MKDIR:=@$(OSHELPERS) mkdir
+MV:=@$(OSHELPERS) mv
+endif
#
# Compute path to requested NaCl Toolchain
@@ -123,7 +130,7 @@ all_versions: $(TOOLCHAIN_LIST)
#
.PHONY: clean
clean:
- $(RM) $(TARGET).nmf
+ $(RM) -f $(TARGET).nmf
$(RM) -fr $(TOOLCHAIN)
@@ -137,7 +144,7 @@ clean:
#
%dir.stamp :
$(MKDIR) -p $(dir $@)
- echo "Directory Stamp" > $@
+ @echo "Directory Stamp" > $@
OUTDIR:=$(TOOLCHAIN)/$(CONFIG)
STAMPDIR?=$(OUTDIR)
@@ -191,6 +198,7 @@ endif
NACL_CFLAGS?=-Wno-long-long -Werror
NACL_CXXFLAGS?=-Wno-long-long -Werror
+NACL_LDFLAGS?=-Wl,-as-needed
#
# Default Paths
@@ -203,6 +211,27 @@ endif
LIB_PATHS?=$(NACL_SDK_ROOT)/lib $(EXTRA_LIB_PATHS)
+#
+# Define a LOG macro that allow a command to be run in quiet mode where
+# the command echoed is not the same as the actual command executed.
+# The primary use case for this is to avoid echoing the full compiler
+# and linker command in the default case. Defining V=1 will restore
+# the verbose behavior
+#
+# $1 = The name of the tool being run
+# $2 = The target file being built
+# $3 = The full command to run
+#
+ifdef V
+define LOG
+$(3)
+endef
+else
+define LOG
+@echo " $(1) $(2)" && $(3)
+endef
+endif
+
#
# If the requested toolchain is a NaCl or PNaCl toolchain, the use the
« PRESUBMIT.py ('K') | « PRESUBMIT.py ('k') | native_client_sdk/src/tools/host_gcc.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698