3 if [ ! -d hardware/interfaces ] ; then
4 echo "Where is hardware/interfaces?";
8 packages=$(pushd hardware/interfaces > /dev/null; \
9 find . -type f -name \*.hal -exec dirname {} \; | sort -u | \
12 '{printf("android.hardware"); for(i=1;i<NF;i++){printf(".%s", $i);}; printf("@%s\n", $NF);}'; \
15 for p in $packages; do
17 hidl-gen -Lmakefile -r android.hardware:hardware/interfaces $p;
18 hidl-gen -Landroidbp -r android.hardware:hardware/interfaces $p;
21 # subdirectories of hardware/interfaces which contain an Android.bp file
22 android_dirs=$(find hardware/interfaces/*/ \
28 echo "Updating Android.bp files."
30 for bp_dir in $android_dirs; do
31 bp="$bp_dir/Android.bp"
32 # locations of Android.bp files in specific subdirectory of hardware/interfaces
33 android_bps=$(find $bp_dir \
35 ! -path $bp_dir/Android.bp \
39 echo "// This is an autogenerated file, do not edit." > "$bp";
40 echo "subdirs = [" >> "$bp";
41 for a in $android_bps; do
42 echo " \"${a#$bp_dir/}\"," >> "$bp";