The development process, we specify the path android ndk toolchain environment variables inside the makefile
However, each person's path is not the same, it is necessary to write something to do automatically find the location and configuration
The principle is the root android ndk of which has a source.properties file
It is easy to find such a find command string in accordance with this filename
/tolchain/android-ndk-r21/source.properties
However, how to remove source.properties based on a string inside a little trouble
linux there are several powerful tools, grep, awk, sed, tr
Find a moment, can be done with sed command is as follows
find / -name source.properties 2> /dev/null | sed 's/source.properties//g'