0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

Do not overwrite config.h unless it was changed. Mostly taken from FFmpeg.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24241 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2007-08-27 11:40:25 +00:00
parent 449e6746e3
commit d75d0a5171

8
configure vendored
View File

@ -1298,6 +1298,7 @@ rm -f "$TMPLOG"
TMPC="$I/mplayer-conf-$RANDOM-$$.c" TMPC="$I/mplayer-conf-$RANDOM-$$.c"
TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp" TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
TMPEXE="$I/mplayer-conf-$RANDOM-$$" TMPEXE="$I/mplayer-conf-$RANDOM-$$"
TMPH="$I/mplayer-conf-$RANDOM-$$.h"
TMPS="$I/mplayer-conf-$RANDOM-$$.S" TMPS="$I/mplayer-conf-$RANDOM-$$.S"
echo configuration: $_configuration > "$TMPLOG" echo configuration: $_configuration > "$TMPLOG"
@ -7708,7 +7709,7 @@ done
} }
echo "Creating config.h" echo "Creating config.h"
cat > config.h << EOF cat > $TMPH << EOF
/* -------- This file has been automatically generated by configure --------- /* -------- This file has been automatically generated by configure ---------
Note: Any changes in it will be lost when you run configure again. */ Note: Any changes in it will be lost when you run configure again. */
@ -8420,6 +8421,9 @@ $_def_xshape
#endif /* MPLAYER_CONFIG_H */ #endif /* MPLAYER_CONFIG_H */
EOF EOF
# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
! cmp -s "$TMPH" config.h && mv -f "$TMPH" config.h
############################################################################# #############################################################################
cat << EOF cat << EOF
@ -8512,4 +8516,4 @@ EOF
fi fi
# Last move: # Last move:
rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"