[MPlayer-cvslog] r24241 - trunk/configure
diego
subversion at mplayerhq.hu
Mon Aug 27 13:40:25 CEST 2007
Author: diego
Date: Mon Aug 27 13:40:25 2007
New Revision: 24241
Log:
Do not overwrite config.h unless it was changed. Mostly taken from FFmpeg.
Modified:
trunk/configure
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Mon Aug 27 13:40:25 2007
@@ -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"
More information about the MPlayer-cvslog
mailing list