Commit 091c9860 authored by Clément Bœsch's avatar Clément Bœsch

Merge commit '78489822'

* commit '78489822':
  configure: Place all temporary files in one separate directory
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents e78dc578 78489822
......@@ -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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment