summaryrefslogtreecommitdiff
path: root/update-makefiles.sh
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2016-08-10 08:02:31 -0700
committerIliyan Malchev <malchev@google.com>2016-08-10 14:01:11 -0700
commit7fd352e7b3f07600e31072b690978b9f5c689d4c (patch)
tree5e9cc1768044e674d3f5c4d3f918bb61722397be /update-makefiles.sh
parent81add9c495993f497ec580f4ee5034808b760392 (diff)
script to auto-generate makefiles for HALs
Change-Id: I9d21a811d8e2fc604702388ad1910476df16f43a Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'update-makefiles.sh')
-rwxr-xr-xupdate-makefiles.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/update-makefiles.sh b/update-makefiles.sh
new file mode 100755
index 0000000000..051e658534
--- /dev/null
+++ b/update-makefiles.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ ! -d hardware/interfaces ] ; then
+ echo "Where is hardware/interfaces?";
+ exit 1;
+fi
+
+packages=$(pushd hardware/interfaces > /dev/null; \
+ find -type f -name Android.mk -exec dirname {} \; | \
+ cut -c3- | \
+ awk -F'/' \
+ '{printf("android.hardware"); for(i=1;i<NF;i++){printf(".%s", $i);}; printf("@%s\n", $NF);}'; \
+ popd > /dev/null)
+
+for p in $packages; do
+ echo "Updating $p";
+ hidl-gen -Lmakefile -r android.hardware:hardware/interfaces $p;
+done