Revision 8276
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/util.run | ||
---|---|---|
46 | 46 |
|
47 | 47 |
make () { echo_cmd env make --directory="$top_dir" "$@"; } |
48 | 48 |
|
49 |
if false; then ## usage: |
|
50 |
inline_make <<'EOF' |
|
51 |
target: |
|
52 |
$(self_dir)/cmd >$@ |
|
53 |
EOF |
|
54 |
# target will be run automatically because it's first in the makefile |
|
55 |
fi ## |
|
56 |
inline_make () |
|
57 |
{ |
|
58 |
(cat |
|
59 |
cat <<EOF |
|
60 |
|
|
61 |
.SUFFIXES: # turn off built-in suffix rules |
|
62 |
.SECONDARY: # don't automatically delete intermediate files |
|
63 |
.DELETE_ON_ERROR: # delete target if recipe fails |
|
64 |
EOF |
|
65 |
)|echo_stdin|make --makefile=/dev/stdin \ |
|
66 |
self_dir="$(dirname "$(readlink -f "${BASH_SOURCE[1]}")")" "$@" |
|
67 |
} |
|
68 |
|
|
49 | 69 |
run_cmd "$@" |
Also available in: Unified diff
lib/util.run: Added inline_make()