patchupdate.py: When using --force-autoconf, only update files if required.

This commit is contained in:
Sebastian Lackner 2015-05-06 20:36:56 +02:00
parent 1bb34e22a6
commit aa817e83cf
2 changed files with 48 additions and 26 deletions

View File

@ -315,22 +315,33 @@ elif test "$backend" = "git" -o "$backend" = "git-am"; then
abort "Failed to apply patch, aborting!"
fi
if test "$enable_autoconf" -gt 1; then
if ! update_configure; then
abort "'autoreconf -f' failed."
fi
if ! update_protocol; then
abort "'./tools/make_requests' failed."
do_commit=0
# Run 'autoreconf -f' if required
if git show --pretty=format: --name-only | grep -q "^\(configure.ac\|aclocal.m4\)$"; then
if ! update_configure; then
abort "'autoreconf -f' failed."
fi
git add ./configure
git add ./include/config.h.in
do_commit=1
fi
# Add changed files, ignore failures if files are not present (shouldn't happen)
git add ./configure
git add ./include/config.h.in
git add ./include/wine/server_protocol.h
git add ./server/trace.c
git add ./server/request.h
# Run './tools/make_requests' if required
if git show --pretty=format: --name-only | grep -q "^server/"; then
if ! update_protocol; then
abort "'./tools/make_requests' failed."
fi
git add ./include/wine/server_protocol.h
git add ./server/trace.c
git add ./server/request.h
do_commit=1
fi
if ! git commit --amend --reuse-message HEAD; then
abort "Failed to include autogenerated changes in commit."
if test "$do_commit" -ne 0; then
if ! git commit --amend --reuse-message HEAD; then
abort "Failed to include autogenerated changes in commit."
fi
fi
fi
}}

View File

@ -1113,22 +1113,33 @@ elif test "$backend" = "git" -o "$backend" = "git-am"; then
abort "Failed to apply patch, aborting!"
fi
if test "$enable_autoconf" -gt 1; then
if ! update_configure; then
abort "'autoreconf -f' failed."
fi
if ! update_protocol; then
abort "'./tools/make_requests' failed."
do_commit=0
# Run 'autoreconf -f' if required
if git show --pretty=format: --name-only | grep -q "^\(configure.ac\|aclocal.m4\)$"; then
if ! update_configure; then
abort "'autoreconf -f' failed."
fi
git add ./configure
git add ./include/config.h.in
do_commit=1
fi
# Add changed files, ignore failures if files are not present (shouldn't happen)
git add ./configure
git add ./include/config.h.in
git add ./include/wine/server_protocol.h
git add ./server/trace.c
git add ./server/request.h
# Run './tools/make_requests' if required
if git show --pretty=format: --name-only | grep -q "^server/"; then
if ! update_protocol; then
abort "'./tools/make_requests' failed."
fi
git add ./include/wine/server_protocol.h
git add ./server/trace.c
git add ./server/request.h
do_commit=1
fi
if ! git commit --amend --reuse-message HEAD; then
abort "Failed to include autogenerated changes in commit."
if test "$do_commit" -ne 0; then
if ! git commit --amend --reuse-message HEAD; then
abort "Failed to include autogenerated changes in commit."
fi
fi
fi
}