Mercurial > mplayer.hg
comparison configure @ 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 | a9f217f74e07 |
children | f802a737f847 |
comparison
equal
deleted
inserted
replaced
24220:f89b260e17e6 | 24221:06dd2d1033ef |
---|---|
1296 TMPLOG="configure.log" | 1296 TMPLOG="configure.log" |
1297 rm -f "$TMPLOG" | 1297 rm -f "$TMPLOG" |
1298 TMPC="$I/mplayer-conf-$RANDOM-$$.c" | 1298 TMPC="$I/mplayer-conf-$RANDOM-$$.c" |
1299 TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp" | 1299 TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp" |
1300 TMPEXE="$I/mplayer-conf-$RANDOM-$$" | 1300 TMPEXE="$I/mplayer-conf-$RANDOM-$$" |
1301 TMPH="$I/mplayer-conf-$RANDOM-$$.h" | |
1301 TMPS="$I/mplayer-conf-$RANDOM-$$.S" | 1302 TMPS="$I/mplayer-conf-$RANDOM-$$.S" |
1302 | 1303 |
1303 echo configuration: $_configuration > "$TMPLOG" | 1304 echo configuration: $_configuration > "$TMPLOG" |
1304 echo >> "$TMPLOG" | 1305 echo >> "$TMPLOG" |
1305 | 1306 |
7706 fi | 7707 fi |
7707 done | 7708 done |
7708 } | 7709 } |
7709 | 7710 |
7710 echo "Creating config.h" | 7711 echo "Creating config.h" |
7711 cat > config.h << EOF | 7712 cat > $TMPH << EOF |
7712 /* -------- This file has been automatically generated by configure --------- | 7713 /* -------- This file has been automatically generated by configure --------- |
7713 Note: Any changes in it will be lost when you run configure again. */ | 7714 Note: Any changes in it will be lost when you run configure again. */ |
7714 | 7715 |
7715 /* Protect against multiple inclusion */ | 7716 /* Protect against multiple inclusion */ |
7716 #ifndef MPLAYER_CONFIG_H | 7717 #ifndef MPLAYER_CONFIG_H |
8418 #endif | 8419 #endif |
8419 | 8420 |
8420 #endif /* MPLAYER_CONFIG_H */ | 8421 #endif /* MPLAYER_CONFIG_H */ |
8421 EOF | 8422 EOF |
8422 | 8423 |
8424 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds. | |
8425 ! cmp -s "$TMPH" config.h && mv -f "$TMPH" config.h | |
8426 | |
8423 ############################################################################# | 8427 ############################################################################# |
8424 | 8428 |
8425 cat << EOF | 8429 cat << EOF |
8426 | 8430 |
8427 Config files successfully generated by ./configure $_configuration ! | 8431 Config files successfully generated by ./configure $_configuration ! |
8510 | 8514 |
8511 EOF | 8515 EOF |
8512 fi | 8516 fi |
8513 | 8517 |
8514 # Last move: | 8518 # Last move: |
8515 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" | 8519 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH" |