summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-27 11:40:25 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-27 11:40:25 +0000
commitd75d0a5171eb53db2bfae0fd18d431bc0cf32375 (patch)
tree3ddb4c97c6c399e6cff109b4d3435769fa388d80 /configure
parent449e6746e3a9cf9c786cd4022cad4452f4b2cb5c (diff)
downloadmpv-d75d0a5171eb53db2bfae0fd18d431bc0cf32375.tar.bz2
mpv-d75d0a5171eb53db2bfae0fd18d431bc0cf32375.tar.xz
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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index 3976b9680c..ef154d4254 100755
--- a/configure
+++ b/configure
@@ -1298,6 +1298,7 @@ rm -f "$TMPLOG"
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 @@ done
}
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 @@ $_def_xshape
#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 @@ EOF
fi
# Last move:
-rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
+rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"