diff options
author | Måns Rullgård <mans@mansr.com> | 2010-01-19 04:40:08 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-01-19 04:40:08 +0000 |
commit | c34681df42a8ffe93491ce710ca01a6151f11004 (patch) | |
tree | 1db87fb2a263d8a5bf960393acb791e7540a9456 /configure | |
parent | 76d81909ae65f5a771e3a58d6a5d6bb58bfed995 (diff) | |
download | ffmpeg-c34681df42a8ffe93491ce710ca01a6151f11004.tar.gz |
configure: add cp_if_changed function and use for config.h
Originally committed as revision 21318 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -831,6 +831,12 @@ apply(){ "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp" } +cp_if_changed(){ + cmp -s "$1" "$2" && + echo "$2 is unchanged" || + cp -f "$1" "$2" +} + # CONFIG_LIST contains configurable options, while HAVE_LIST is for # system-dependent things. @@ -2909,9 +2915,7 @@ echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH echo "endif # FFMPEG_CONFIG_MAK" >> config.mak # Do not overwrite an unchanged config.h to avoid superfluous rebuilds. -cmp -s $TMPH config.h && - echo "config.h is unchanged" || - mv -f $TMPH config.h +cp_if_changed $TMPH config.h # build tree in object directory if source path is different from current one if enabled source_path_used; then |