Welcome to little lamb

Code » comain » commit f864068

configure: Fix symlinks handling

author Olivier Brunel
2023-07-06 20:37:02 UTC
committer Olivier Brunel
2023-07-07 17:07:37 UTC
parent d53b77a48bd45fd49e188164536d790dfb110380

configure: Fix symlinks handling

We allow "special" symlinks to use object files built from another binary
or library. Can be useful at times, but limit this to *.o symlinks, so
other symlinks can still work fine. (E.g. to include source file from
another place, such as a component's src directory.)

configure +2 -2

diff --git a/configure b/configure
index 243f95f..d9843c0 100755
--- a/configure
+++ b/configure
@@ -868,9 +868,9 @@ setupobjs()
                 )"$'\n'"$BLD_DOCS"
             continue
         fi
-        objs="$(find "$d" -type f -name '*.[cS]' | sed -e s/^src/build/g \
+        objs="$(find "$d" -name '*.[cS]' | sed -e s/^src/build/g \
             -e s/\\.c$/.o/g -e s/\\.S/.o/g $excl | tr '\n' ' ')"
-        objs="$objs $(find "$d" -type l -printf "build/%l ")"
+        objs="$objs $(find "$d" -type l -name '*.o' -printf "build/%l ")"
 
         local cppflags=
         local cflags=