summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIliyan Malchev2016-08-10 10:02:31 -0500
committerIliyan Malchev2016-08-10 16:01:11 -0500
commit7fd352e7b3f07600e31072b690978b9f5c689d4c (patch)
tree5e9cc1768044e674d3f5c4d3f918bb61722397be /update-makefiles.sh
parent81add9c495993f497ec580f4ee5034808b760392 (diff)
downloadplatform-hardware-interfaces-7fd352e7b3f07600e31072b690978b9f5c689d4c.tar.gz
platform-hardware-interfaces-7fd352e7b3f07600e31072b690978b9f5c689d4c.tar.xz
platform-hardware-interfaces-7fd352e7b3f07600e31072b690978b9f5c689d4c.zip
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 00000000..051e6585
--- /dev/null
+++ b/update-makefiles.sh
@@ -0,0 +1,18 @@
1#!/bin/bash
2
3if [ ! -d hardware/interfaces ] ; then
4 echo "Where is hardware/interfaces?";
5 exit 1;
6fi
7
8packages=$(pushd hardware/interfaces > /dev/null; \
9 find -type f -name Android.mk -exec dirname {} \; | \
10 cut -c3- | \
11 awk -F'/' \
12 '{printf("android.hardware"); for(i=1;i<NF;i++){printf(".%s", $i);}; printf("@%s\n", $NF);}'; \
13 popd > /dev/null)
14
15for p in $packages; do
16 echo "Updating $p";
17 hidl-gen -Lmakefile -r android.hardware:hardware/interfaces $p;
18done