summaryrefslogtreecommitdiff
path: root/update-makefiles.sh
diff options
context:
space:
mode:
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