platform_hardware_interfaces/update-makefiles.sh
Dan Willemsen 242b34edd5 Convert to Android.bp
See build/soong/README.md for more information.

Bug: 31742855
Test: mma -j
Change-Id: Icb93f3b1b2caeb5e9c00f88ca35841b927ad075d
2016-09-30 10:31:54 -07:00

19 lines
603 B
Bash
Executable file

#!/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 \*.hal -exec dirname {} \; | sort -u | \
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;
hidl-gen -Landroidbp -r android.hardware:hardware/interfaces $p;
done