From ee6f84f43292f5365852e83d76ba4a66da5257ba Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 29 Aug 2018 16:16:05 -0700 Subject: [PATCH] Expose the platform tools version as a C header This had been getting parsed by system/core/platform_tools_tool_version.mk and inserted as a version into fastboot. Now that fastboot is converting to Soong, switch this over to a genrule in order to extract the version number. Test: fastboot --version Test: inspect generated header Test: change plat_tools_source.prop_template, rebuild fastboot Test: change plat_tools_source.prop_template to use ${PLATFORM_SDK_VERSION} Change-Id: Id807539ce057add50b7d10a234670820a8772351 --- sdk/Android.bp | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sdk/Android.bp diff --git a/sdk/Android.bp b/sdk/Android.bp new file mode 100644 index 000000000..0b1a31865 --- /dev/null +++ b/sdk/Android.bp @@ -0,0 +1,6 @@ +genrule { + name: "platform_tools_version", + cmd: "sed 's/$${PLATFORM_SDK_VERSION}/0/ ; s/^Pkg.Revision=\\(.*\\)/#define PLATFORM_TOOLS_VERSION \"\\1\"/p ; d' $(in) > $(out)", + srcs: ["plat_tools_source.prop_template"], + out: ["platform_tools_version.h"], +}