Mercurial > mplayer.hg
changeset 24221:06dd2d1033ef
Do not overwrite config.h unless it was changed. Mostly taken from FFmpeg.
author | diego |
---|---|
date | Mon, 27 Aug 2007 11:40:25 +0000 |
parents | f89b260e17e6 |
children | 3ef118371df9 |
files | configure |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Mon Aug 27 11:12:12 2007 +0000 +++ b/configure Mon Aug 27 11:40:25 2007 +0000 @@ -1298,6 +1298,7 @@ TMPC="$I/mplayer-conf-$RANDOM-$$.c" TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp" TMPEXE="$I/mplayer-conf-$RANDOM-$$" +TMPH="$I/mplayer-conf-$RANDOM-$$.h" TMPS="$I/mplayer-conf-$RANDOM-$$.S" echo configuration: $_configuration > "$TMPLOG" @@ -7708,7 +7709,7 @@ } echo "Creating config.h" -cat > config.h << EOF +cat > $TMPH << EOF /* -------- This file has been automatically generated by configure --------- Note: Any changes in it will be lost when you run configure again. */ @@ -8420,6 +8421,9 @@ #endif /* MPLAYER_CONFIG_H */ EOF +# Do not overwrite an unchanged config.h to avoid superfluous rebuilds. +! cmp -s "$TMPH" config.h && mv -f "$TMPH" config.h + ############################################################################# cat << EOF @@ -8512,4 +8516,4 @@ fi # Last move: -rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" +rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"