platform_hardware_libhardware/update-includes.sh
Steven Moreland d783cabd4d 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
2023-06-02 23:01:54 +00:00

19 lines
480 B
Bash
Executable file

#!/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