aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-05-02 20:51:09 +0000
committerWarner Losh <imp@FreeBSD.org>2024-01-15 02:23:45 +0000
commit3d939d967ad49f747b8b9db4fdec8086a7067582 (patch)
tree5fb5a67fb2ab26bc0f3f6cc27d5ef90a2b28a37a /Makefile.inc1
parent53df7e58cca7e6726b44f447f10ddc3451cfa851 (diff)
downloadsrc-3d939d967ad49f747b8b9db4fdec8086a7067582.tar.gz
src-3d939d967ad49f747b8b9db4fdec8086a7067582.zip
build: Use ls -i | cut rather than stat -f %i to extract inode
ls -i dates back to 5th edition Unix and is more portable than the stat command, though %% is a newer shellism, it works on any shell that FreeBSD builds with. Sponsored by: Netflix
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc14
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 34b49ee319ec..8a0073547ed0 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1059,8 +1059,8 @@ _cleanworldtmp: .PHONY
.if ${USING_SYSTEM_COMPILER} == "yes"
.for cc in cc c++
if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \
- inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \
- find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \
+ inum=$$(ls -i ${WORLDTMP}/usr/bin/${cc}); \
+ find ${WORLDTMP}/usr/bin -inum $${inum%% *} -delete; \
fi
.endfor
.endif # ${USING_SYSTEM_COMPILER} == "yes"