Index: build/linux/sysroot_ld_path.sh |
diff --git a/build/linux/sysroot_ld_path.sh b/build/linux/sysroot_ld_path.sh |
index fd0bb928a625e00a29a5da5fcafa61c18657514f..74553c93638729265423a74e023956608afcca69 100755 |
--- a/build/linux/sysroot_ld_path.sh |
+++ b/build/linux/sysroot_ld_path.sh |
@@ -46,14 +46,16 @@ process_ld_so_conf() { |
echo "$ENTRY" | grep -qs ^include |
if [ $? -eq 0 ]; then |
local included_files=$(echo "$ENTRY" | sed 's/^include //') |
- for inc_file in $included_files; do |
- echo $inc_file | grep -qs ^/ |
- if [ $? -eq 0 ]; then |
- process_ld_so_conf "$root" "$root$inc_file" |
- else |
- process_ld_so_conf "$root" "$(pwd)/$inc_file" |
- fi |
- done |
+ if ls $included_files >/dev/null 2>&1 ; then |
+ for inc_file in $included_files; do |
+ echo $inc_file | grep -qs ^/ |
+ if [ $? -eq 0 ]; then |
+ process_ld_so_conf "$root" "$root$inc_file" |
+ else |
+ process_ld_so_conf "$root" "$(pwd)/$inc_file" |
+ fi |
+ done |
+ fi |
continue |
fi |