]> git.proxmox.com Git - mirror_qemu.git/commit
Makefile: avoid leaving the temporary QEMU_PKGVERSION header file
authorLin Ma <lma@suse.com>
Wed, 15 Feb 2017 02:40:30 +0000 (10:40 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 16 Feb 2017 14:30:49 +0000 (15:30 +0100)
commitd9e73d32a891a4d9d9b14dcdd27490ec2d13026a
treea5b8513eb1814a629cd9ce5a39c85be3e7a8fb63
parent3741c2503bc06c7e3c5bd46a9d4e79a11bd7e7ed
Makefile: avoid leaving the temporary QEMU_PKGVERSION header file

By commit 67a1de0d, When we perform 'git pull && make && sudo make install',
In 'make' stage a qemu-version.h.tmp will be generated. If the content of
qemu-version.h.tmp and qemu-version.h aren't consistent, The qemu-version.h.tmp
will be renamed to qemu-version.h. Because of the target FORCE, The same action
will be do again in 'make install' stage.

In 'make install' stage, If there is no qemu-version.h.tmp exists and we run
'make install' with sudo, The owner and group of new qemu-version.h.tmp will be
privileged user/group. When we run 'make' next time, qemu-version.h.tmp can't
be overwritten because of permission issue.

This patch removed qemu-version.h.tmp after build to fix this issue.

Signed-off-by: Lin Ma <lma@suse.com>
Message-Id: <20170215024030.23895-1-lma@suse.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile