Merge pull request #532 from sammj/set_version
Export PETITBOOT_VERSION to Petitboot autoreconf step
diff --git a/openpower/package/petitboot/petitboot.mk b/openpower/package/petitboot/petitboot.mk
index efa29e1..4d94361 100644
--- a/openpower/package/petitboot/petitboot.mk
+++ b/openpower/package/petitboot/petitboot.mk
@@ -19,6 +19,8 @@
HOST_PROG_SHUTDOWN=/usr/libexec/petitboot/bb-kexec-reboot \
$(if $(BR2_PACKAGE_BUSYBOX),--with-tftp=busybox)
+PETITBOOT_AUTORECONF_ENV += PETITBOOT_VERSION=`cat $(PETITBOOT_VERSION_FILE) | cut -d '-' -f 2-`
+
ifdef PETITBOOT_DEBUG
PETITBOOT_CONF_OPTS += --enable-debug
endif
diff --git a/openpower/package/pkg-versions.mk b/openpower/package/pkg-versions.mk
index 474d455..5ad1323 100644
--- a/openpower/package/pkg-versions.mk
+++ b/openpower/package/pkg-versions.mk
@@ -114,7 +114,7 @@
# Add appropriate templates to hooks
$(2)_POST_PATCH_HOOKS += $(2)_OPENPOWER_PATCH_FILE
-$(2)_PRE_BUILD_HOOKS += $(2)_OPENPOWER_VERSION_FILE
+$(2)_PRE_CONFIGURE_HOOKS += $(2)_OPENPOWER_VERSION_FILE
# Top-level rule to print or generate a subpackage version
$(1)-version: $$(if $$(wildcard $$($(2)_VERSION_FILE)),$(1)-print-version,$(1)-build-version)