mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Avoid updating zfs_gitrev.h when rev is unchanged
Build process would always re-compile spa_history.c due to touching zfs_gitrev.h - avoid if no change in gitrev. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chris Dunlop <chris@onthe.net.au> Reviewed-by: Allan Jude <allanjude@freebsd.org> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #8860
This commit is contained in:
parent
fd7a657bff
commit
876d76be34
@ -39,3 +39,7 @@ trap cleanup EXIT
|
|||||||
git rev-parse --git-dir > /dev/null 2>&1
|
git rev-parse --git-dir > /dev/null 2>&1
|
||||||
# Get the git current git revision
|
# Get the git current git revision
|
||||||
ZFS_GIT_REV=$(git describe --always --long --dirty 2>/dev/null)
|
ZFS_GIT_REV=$(git describe --always --long --dirty 2>/dev/null)
|
||||||
|
# Check if header file already contain the exact string
|
||||||
|
grep -sq "\"${ZFS_GIT_REV}\"" "$(dirname "$0")"/../include/zfs_gitrev.h &&
|
||||||
|
trap - EXIT
|
||||||
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user