From ed243cb4cbb6247bf4aeaed6c93b8167cce9b217 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 28 Nov 2016 16:25:23 -0800 Subject: Android.mk: Stop using version.sh script This isn't producing the correct results anyways, since the working directory of the script is the top level of the android tree, not external/iw like the script expects. And moving the working directory doesn't help either, since we don't have a copy the git tags that it expects. I noticed this while testing git submodules as an alternative to repo, where we suddenly have a .git directory at the top level, and the script failed. So just extract the version number itself from the script and write out our own version.c file. Test: m out/target/product/generic/gen/EXECUTABLES/iw_intermediates/version.c Test: Compare version.c before/after Change-Id: I98ff4e44b84afbcd2ce8319ccf6816d5fa57a90a --- Android.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Android.mk b/Android.mk index ad5c9e8..700d516 100644 --- a/Android.mk +++ b/Android.mk @@ -26,7 +26,9 @@ LOCAL_MODULE := iw LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_GENERATED_SOURCES := $(local-generated-sources-dir)/version.c $(LOCAL_GENERATED_SOURCES) : $(LOCAL_PATH)/version.sh + @echo "Generated: $@" @mkdir -p $(dir $@) - $(hide) $< $@ + $(hide) echo '#include "iw.h"' >$@ + $(hide) echo "const char iw_version[] = $$(grep ^VERSION $< | sed "s/VERSION=//");" >>$@ include $(BUILD_EXECUTABLE) -- cgit v1.2.3