Revision 9353
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/sh/make.sh | ||
---|---|---|
28 | 28 |
make() { echo_func; cmd_log_fd=1 self "$@"; } |
29 | 29 |
|
30 | 30 |
if false; then ## usage: |
31 |
inline_make 10<<'EOF'
|
|
31 |
inline_make <<'EOF' |
|
32 | 32 |
target: |
33 | 33 |
$(self_dir)/cmd >$@ |
34 | 34 |
EOF |
... | ... | |
41 | 41 |
local_export self_dir="$(dirname "$self")"; echo_vars self_dir |
42 | 42 |
|
43 | 43 |
make --makefile=<(( |
44 |
cat /dev/fd/10
|
|
44 |
cat # script stdin from caller-provided stdin
|
|
45 | 45 |
echo -n " |
46 | 46 |
.SUFFIXES: # turn off built-in suffix rules |
47 | 47 |
.SECONDARY: # don't automatically delete intermediate files |
48 | 48 |
.DELETE_ON_ERROR: # delete target if recipe fails |
49 | 49 |
" |
50 |
)|echo_stdin) "$@" |
|
50 |
)|echo_stdin) "$@" <&20 # make's stdin from global stdin
|
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
fi |
Also available in: Unified diff
lib/sh/make.sh: inline_make(): take the script stdin from caller-provided stdin and get make's stdin from global stdin, so that the caller can just use <<'EOF' rather than having to include a specific fd before the <<