Project

General

Profile

« Previous | Next » 

Revision 9063

lib/sh/util.sh to_file, make.sh check_target_exists: use new require_exists to print message if file skipped because it already exists. this is useful for troubleshooting why certain make commands don't run.

View differences:

lib/sh/make.sh
14 14
alias remaking='test "$remake"'
15 15

  
16 16
# usage: set_make_vars; check_target_exists
17
alias check_target_exists='remaking || test ! -e "$target" || return 0'
17
alias check_target_exists='remaking || require_exists "$target" || return 0'
18 18
alias check_fake_target_exists='remaking || declare if_not_exists=1'
19 19
	# defer check until to_file
20 20

  
lib/sh/util.sh
284 284
{
285 285
	echo_func
286 286
	: "${stdout?}"; echo_vars stdout
287
	test ! "$if_not_exists" || test ! -e "$stdout" || return 0
287
	test ! "$if_not_exists" || require_exists "$stdout" || return 0
288 288
	"$@" >"$stdout" || { save_e; log_e; rm "$stdout"; rethrow; }
289 289
}
290 290
alias to_file='to_file ' # last space alias-expands next word

Also available in: Unified diff