Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111615211
D27622.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27622.diff
View Options
diff --git a/include/Makefile b/include/Makefile
--- a/include/Makefile
+++ b/include/Makefile
@@ -273,26 +273,19 @@
SDESTDIR= ${SYSROOT:U${DESTDIR}}
# Take care of stale directory-level symlinks.
+# Note: The "|| true" after find is needed in case one of the directories does
+# not exist (yet).
compat:
-.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto
- if [ -L ${SDESTDIR}${INCLUDEDIR}/$i ]; then \
- rm -f ${SDESTDIR}${INCLUDEDIR}/$i; \
- fi
-.endfor
+ cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \
+ crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true
mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
-p ${SDESTDIR}${INCLUDEDIR} > /dev/null
copies: .PHONY .META
-.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \
- ${_MARCHS}
- if [ -d ${SDESTDIR}${INCLUDEDIR}/$i ]; then \
- cd ${SDESTDIR}${INCLUDEDIR}/$i; \
- for h in *.h; do \
- if [ -L $$h ]; then rm -f $$h; fi; \
- done; \
- fi
-.endfor
+ cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \
+ machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \
+ -name "*.h" -print -delete || true
.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS}
cd ${SRCTOP}/sys; \
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 1:21 AM (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17022869
Default Alt Text
D27622.diff (1 KB)
Attached To
Mode
D27622: include: Delete stale symlinks using find(1) instead of a shell loop.
Attached
Detach File
Event Timeline
Log In to Comment