提交 091c9860 编写于 作者: C Clément Bœsch

Merge commit '78489822'

* commit '78489822':
  configure: Place all temporary files in one separate directory
Merged-by: NClément Bœsch <u@pkh.me>
......@@ -3771,19 +3771,23 @@ elif ! check_cmd mktemp -u XXXXXX; then
# simple replacement for missing mktemp
# NOT SAFE FOR GENERAL USE
mktemp(){
echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$"
tmpname="${2%%XXX*}.${HOSTNAME}.${UID}.$$"
echo "$tmpname"
mkdir "$tmpname"
}
fi
FFTMPDIR=$(mktemp -d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev/null) ||
die "Unable to create temporary directory in $TMPDIR."
tmpfile(){
tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
(set -C; exec > $tmp) 2>/dev/null ||
die "Unable to create temporary file in $TMPDIR."
append TMPFILES $tmp
tmp="${FFTMPDIR}/test"$2
(set -C; exec > $tmp) 2> /dev/null ||
die "Unable to create temporary file in $FFTMPDIR."
eval $1=$tmp
}
trap 'rm -f -- $TMPFILES' EXIT
trap 'rm -rf -- "$FFTMPDIR"' EXIT
tmpfile TMPASM .asm
tmpfile TMPC .c
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册