build: Avoid length() awk function
Some awk implementations such as old versions of mawk do not support the length() function. Use the return value of the POSIX split() function instead.
This commit is contained in:
parent
b1b44f777c
commit
332df71d34
|
@ -93,8 +93,8 @@ CLEANFILES += libg.a
|
|||
## https://sourceware.org/PR28917
|
||||
AWK_UNIQUE_OBJS = $(AWK) '{ \
|
||||
for (i = NF; i > 0; --i) { \
|
||||
split($$i, parts, "/"); \
|
||||
name = parts[length(parts)]; \
|
||||
count = split($$i, parts, "/"); \
|
||||
name = parts[count]; \
|
||||
if (!(name in seen)) { \
|
||||
objs[i] = $$i; \
|
||||
seen[name] = 1; \
|
||||
|
|
|
@ -1380,8 +1380,8 @@ toollib_LIBRARIES = libm.a \
|
|||
toollib_DATA = $(CRT0) $(CRT1)
|
||||
AWK_UNIQUE_OBJS = $(AWK) '{ \
|
||||
for (i = NF; i > 0; --i) { \
|
||||
split($$i, parts, "/"); \
|
||||
name = parts[length(parts)]; \
|
||||
count = split($$i, parts, "/"); \
|
||||
name = parts[count]; \
|
||||
if (!(name in seen)) { \
|
||||
objs[i] = $$i; \
|
||||
seen[name] = 1; \
|
||||
|
|
Loading…
Reference in New Issue