330 define SetupLogging |
330 define SetupLogging |
331 ifeq ($$(LOG_LEVEL),trace) |
331 ifeq ($$(LOG_LEVEL),trace) |
332 # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make |
332 # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make |
333 # For each target executed, will print |
333 # For each target executed, will print |
334 # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer) |
334 # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer) |
335 # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin). |
335 # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much |
336 OLD_SHELL:=$$(SHELL) |
336 # (and causing a crash on Cygwin). |
337 WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL) |
337 # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris. |
|
338 # Only use time if it's GNU time which supports format and output file. |
|
339 WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash |
338 SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL) |
340 SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL) |
339 endif |
341 endif |
340 # Never remove warning messages; this is just for completeness |
342 # Never remove warning messages; this is just for completeness |
341 LOG_WARN= |
343 LOG_WARN= |
342 ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),) |
344 ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),) |