summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'update-makefiles.sh')
-rwxr-xr-xupdate-makefiles.sh33
1 files changed, 22 insertions, 11 deletions
diff --git a/update-makefiles.sh b/update-makefiles.sh
index 939a9c71..8b820138 100755
--- a/update-makefiles.sh
+++ b/update-makefiles.sh
@@ -18,17 +18,28 @@ for p in $packages; do
18 hidl-gen -Landroidbp -r android.hardware:hardware/interfaces $p; 18 hidl-gen -Landroidbp -r android.hardware:hardware/interfaces $p;
19done 19done
20 20
21bp="hardware/interfaces/Android.bp" 21# subdirectories of hardware/interfaces which contain an Android.bp file
22androidbps=$(find hardware/interfaces/*/ \ 22android_dirs=$(find hardware/interfaces/*/ \
23 -name "Android.bp" \ 23 -name "Android.bp" \
24 -exec dirname {} \; \ 24 -printf "%h\n" \
25 | sort) 25 | cut -d "/" -f1-3 \
26 | sort | uniq)
26 27
27echo "Updating $bp" 28echo "Updating Android.bp files."
28 29
29echo "// This is an autogenerated file, do not edit." > $bp; 30for bp_dir in $android_dirs; do
30echo "subdirs = [" >> $bp; 31 bp="$bp_dir/Android.bp"
31for a in $androidbps; do 32 # locations of Android.bp files in specific subdirectory of hardware/interfaces
32 echo " \"${a#*hardware/interfaces/}\"," >> $bp; 33 android_bps=$(find $bp_dir \
34 -name "Android.bp" \
35 ! -path $bp_dir/Android.bp \
36 -printf "%h\n" \
37 | sort)
38
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";
43 done
44 echo "]" >> "$bp";
33done 45done
34echo "]" >> $bp; \ No newline at end of file