diff options
author | Steven Moreland <smoreland@google.com> | 2019-01-14 17:40:45 -0800 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2023-06-02 23:01:54 +0000 |
commit | d783cabd4d9bddb4b83f2dd38300b7598bb58b24 (patch) | |
tree | e617c7513aeccb0afad28247165fe24f684ab543 /update-includes.sh | |
parent | c0a81b9dc69af81dff4b2c4b338c1a477c1d412d (diff) | |
download | libhardware-d783cabd4d9bddb4b83f2dd38300b7598bb58b24.tar.gz |
Split up headers.
This splits headers into three locations:
include - for backwards compatibility, the global include
include_all - for things system/vendor both use
include_vendor - for things that only vendors use
The goal is to gradually have system things stop referencing
(at least most) of these headers.
Bug: 37280010
Test: build (CL on top adds back in symlinks)
Change-Id: Ibf194276b7faa857e1e7605d7719f4e7d873ecba
Diffstat (limited to 'update-includes.sh')
-rwxr-xr-x | update-includes.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/update-includes.sh b/update-includes.sh new file mode 100755 index 00000000..92aafc9c --- /dev/null +++ b/update-includes.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set +ex + +if [ ! "$ANDROID_BUILD_TOP" ]; then + echo "lunch?" + exit 1 +fi + +function update-includes() { + find -L "$ANDROID_BUILD_TOP/hardware/libhardware/include/hardware" -maxdepth 1 -xtype l -exec rm {} \; + + for f in $ANDROID_BUILD_TOP/hardware/libhardware/include_all/hardware/*; do + local bn="$(basename $f)" + ln -s "../../include_all/hardware/$bn" "$ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/$bn" + done +} + +update-includes |