]> git.proxmox.com Git - pve-kernel.git/commitdiff
build: add abiupdate target
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 21 Mar 2018 10:26:33 +0000 (11:26 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Mar 2018 13:45:36 +0000 (14:45 +0100)
to automatically extract and commit the ABI data from a built
pve-headers binary package.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Makefile

index 6f97d7ec4467459850393af7c7262e70313f63aa..fad37e074fd539f5cf2cd9ab0fca28a614fca20d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -170,6 +170,24 @@ submodule:
        test -f "${ZFSONLINUX_SUBMODULE}/Makefile" || git submodule update --init ${ZFSONLINUX_SUBMODULE}
        (test -f "${ZFSSRC}/debian/changelog" && test -f "${SPLZRC}/debian/changelog") || (cd ${ZFSONLINUX_SUBMODULE}; git submodule update --init)
 
+# call after ABI bump with header deb in working directory
+.PHONY: abiupdate
+abiupdate: abi-prev-${KVNAME}
+abi-prev-${KVNAME}: abi-tmp-${KVNAME}
+ifneq ($(strip $(shell git status --untracked-files=no --porcelain -z)),)
+       @echo "working directory unclean, aborting!"
+       @false
+else
+       git rm "abi-prev-*"
+       mv $< $@
+       git add $@
+       git commit -s -m "update ABI file for ${KVNAME}" -m "(generated with debian/scripts/abi-generate)"
+       @echo "update abi-prev-${KVNAME} committed!"
+endif
+
+abi-tmp-${KVNAME}:
+       @ test -e ${HDR_DEB} || (echo "need ${HDR_DEB} to extract ABI data!" && false)
+       debian/scripts/abi-generate ${HDR_DEB} $@ ${KVNAME} 1
 
 .PHONY: clean
 clean: