mirror of
https://github.com/mpv-player/mpv
synced 2024-12-19 13:21:13 +00:00
old-configure: minor improvements
Use a trap to remove the temp dir on exit. Write config.log to old_build instead of the top-level dir.
This commit is contained in:
parent
8fd954ac8e
commit
17d031f88c
@ -333,8 +333,11 @@ test -z "$_confdir" && _confdir="$_prefix/etc/mpv"
|
|||||||
|
|
||||||
mplayer_tmpdir=$(mktemp -d --tmpdir mpv-configure-XXXX)
|
mplayer_tmpdir=$(mktemp -d --tmpdir mpv-configure-XXXX)
|
||||||
test -n "$mplayer_tmpdir" || die "Unable to create tmpdir."
|
test -n "$mplayer_tmpdir" || die "Unable to create tmpdir."
|
||||||
|
trap 'rm -rf "$mplayer_tmpdir"' EXIT
|
||||||
|
|
||||||
TMPLOG="config.log"
|
mkdir old_build 2> /dev/null
|
||||||
|
|
||||||
|
TMPLOG="old_build/config.log"
|
||||||
|
|
||||||
rm -f "$TMPLOG"
|
rm -f "$TMPLOG"
|
||||||
echo Parameters configure was run with: > "$TMPLOG"
|
echo Parameters configure was run with: > "$TMPLOG"
|
||||||
@ -897,7 +900,6 @@ CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
|||||||
if test ! -f Makefile ; then
|
if test ! -f Makefile ; then
|
||||||
ln -s old-makefile Makefile
|
ln -s old-makefile Makefile
|
||||||
fi
|
fi
|
||||||
mkdir old_build 2> /dev/null
|
|
||||||
|
|
||||||
cat > old_build/config.mak << EOF
|
cat > old_build/config.mak << EOF
|
||||||
# -------- Generated by configure -----------
|
# -------- Generated by configure -----------
|
||||||
@ -996,6 +998,3 @@ README for instructions on how to build mpv with the new build system.
|
|||||||
This will not work correctly on MinGW, Cygwin, OSX, and other systems.
|
This will not work correctly on MinGW, Cygwin, OSX, and other systems.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Last move:
|
|
||||||
rm -rf "$mplayer_tmpdir"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user