Project

General

Profile

« Previous | Next » 

Revision 9666

lib/sh/make.sh: moved remaking section before set_make_vars so that it can be used in set_make_vars

View differences:

lib/sh/make.sh
3 3

  
4 4
if self_not_included; then
5 5

  
6
if isset rm; then : "${remake:=$rm}"; fi #mnemonic: files are rm'd (overwritten)
7

  
8
# usage: remaking || check if exists
9
# cmd line usage: [remake=1] func
10
alias remaking='test "$remake"'
11

  
6 12
# usage: target_filename/command() { echo_func; set_make_vars; use $target...; }
7 13
alias set_make_vars="$(cat <<'EOF'
8 14
local command="${FUNCNAME##*/}"; echo_vars command
......
12 18
EOF
13 19
)"
14 20

  
15
if isset rm; then : "${remake:=$rm}"; fi #mnemonic: files are rm'd (overwritten)
16

  
17
# usage: remaking || check if exists
18
# cmd line usage: [remake=1] func
19
alias remaking='test "$remake"'
20

  
21 21
# usage: set_make_vars; check_target_exists
22 22
alias check_target_exists='remaking || require_not_exists "$target" || return 0'
23 23
alias check_fake_target_exists='remaking || declare if_not_exists=1'

Also available in: Unified diff