aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-11-28 16:25:23 -0800
committerDan Willemsen <dwillemsen@google.com>2016-11-28 16:29:38 -0800
commited243cb4cbb6247bf4aeaed6c93b8167cce9b217 (patch)
tree867fad8d591a87647ad8886a22634fd348b6126a
parent2750da337290a5407e3ee123cc664d4e5cc1820c (diff)
downloadplatform_external_iw-ed243cb4cbb6247bf4aeaed6c93b8167cce9b217.tar.gz
platform_external_iw-ed243cb4cbb6247bf4aeaed6c93b8167cce9b217.tar.bz2
platform_external_iw-ed243cb4cbb6247bf4aeaed6c93b8167cce9b217.zip
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
-rw-r--r--Android.mk4
1 files changed, 3 insertions, 1 deletions
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)