diff options
author | Steven Moreland <smoreland@google.com> | 2016-10-25 15:45:19 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2016-10-26 12:05:29 +0200 |
commit | 7a4f118c48e08fd3db62c82e3d56c1a8a300a171 (patch) | |
tree | b645eff302c62b27abe27389050ce1e1bd4d7f2f /update-makefiles.sh | |
parent | 54813ed7c631ee5bfa499e87da65cacbf10efc9b (diff) | |
download | android_hardware_interfaces-7a4f118c48e08fd3db62c82e3d56c1a8a300a171.tar.gz android_hardware_interfaces-7a4f118c48e08fd3db62c82e3d56c1a8a300a171.tar.bz2 android_hardware_interfaces-7a4f118c48e08fd3db62c82e3d56c1a8a300a171.zip |
Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
Diffstat (limited to 'update-makefiles.sh')
-rwxr-xr-x | update-makefiles.sh | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/update-makefiles.sh b/update-makefiles.sh index 939a9c712..8b8201381 100755 --- a/update-makefiles.sh +++ b/update-makefiles.sh @@ -18,17 +18,28 @@ for p in $packages; do hidl-gen -Landroidbp -r android.hardware:hardware/interfaces $p; done -bp="hardware/interfaces/Android.bp" -androidbps=$(find hardware/interfaces/*/ \ - -name "Android.bp" \ - -exec dirname {} \; \ - | sort) +# subdirectories of hardware/interfaces which contain an Android.bp file +android_dirs=$(find hardware/interfaces/*/ \ + -name "Android.bp" \ + -printf "%h\n" \ + | cut -d "/" -f1-3 \ + | sort | uniq) -echo "Updating $bp" +echo "Updating Android.bp files." -echo "// This is an autogenerated file, do not edit." > $bp; -echo "subdirs = [" >> $bp; -for a in $androidbps; do - echo " \"${a#*hardware/interfaces/}\"," >> $bp; +for bp_dir in $android_dirs; do + bp="$bp_dir/Android.bp" + # locations of Android.bp files in specific subdirectory of hardware/interfaces + android_bps=$(find $bp_dir \ + -name "Android.bp" \ + ! -path $bp_dir/Android.bp \ + -printf "%h\n" \ + | sort) + + echo "// This is an autogenerated file, do not edit." > "$bp"; + echo "subdirs = [" >> "$bp"; + for a in $android_bps; do + echo " \"${a#$bp_dir/}\"," >> "$bp"; + done + echo "]" >> "$bp"; done -echo "]" >> $bp;
\ No newline at end of file |