Project

General

Profile

« Previous | Next » 

Revision 14763

lib/sh/make.sh: make(): added support for $output_data mode which uses --silent

View differences:

trunk/lib/sh/make.sh
56 56
# usage: begin_target; to_target cmd...
57 57
alias to_target='stdout="$target" to_file ' # last space alias-expands next word
58 58

  
59
make() # usage: make target...
59
make() # usage: [output_data=1] make target...
60 60
{
61 61
	echo_func
62
	local silent="$(test "$output_data" || ! can_log; exit2bool)"
62 63
	(
63 64
		# at verbosity < 4, hide messages about making included Makefiles
64 65
		# this can reduce # lines of output to 1/3 as much
......
69 70
-e "\%^$cmd ([^-][^[:space:]]*)?Makefile%,/^make\[[[:digit:]]+\]: .*Makefile/d" \
70 71
-e                                       '/^make\[[[:digit:]]+\]: .*Makefile/d'
71 72
		fi
72
		time cmd_log_fd=1 self_sys $(if ! can_log; then echo '--silent ';fi)"$@"
73
		local cmd_log_fd="$(if test "$output_data"; then echo 2;else echo 1;fi)"
74
		time self_sys ${silent:+--silent }"$@"
73 75
	)
74 76
}
75 77

  

Also available in: Unified diff