aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2018-11-05 21:30:00 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2018-11-05 21:30:00 +0000
commitb25c717954b929e80064b59d5e0d340731bf484d (patch)
treee1da845652b56fa9ace203a1f4293e332affe7d3 /tools
parent35b4d0f125fa6e8e9184eaf5516b4992d29776df (diff)
downloadsrc-b25c717954b929e80064b59d5e0d340731bf484d.tar.gz
src-b25c717954b929e80064b59d5e0d340731bf484d.zip
Fix -DNO_CLEAN build after r340157
Approved By: jhb (mentor)
Notes
Notes: svn path=/head/; revision=340162
Diffstat (limited to 'tools')
-rw-r--r--tools/build/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 2540cf5551c7..40915c66a498 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -114,9 +114,17 @@ installdirs:
# bootstrap-tools phase. We could also overrride BINDIR when building bootstrap
# tools but adding the symlinks is easier and means all tools are also
# in the directory that they are installed to normally.
- ln -sf bin ${DESTDIR}/sbin
- ln -sf ../bin ${DESTDIR}/usr/bin
- ln -sf ../bin ${DESTDIR}/usr/sbin
+
+.for _dir in sbin usr/sbin usr/bin
+# delete existing directories from before r340157
+ @if [ ! -L ${DESTDIR}/${_dir} ]; then \
+ echo "removing old non-symlink ${DESTDIR}/${_dir}"; \
+ rm -rf "${DESTDIR}/${_dir}"; \
+ fi
+.endfor
+ ln -sfn bin ${DESTDIR}/sbin
+ ln -sfn ../bin ${DESTDIR}/usr/bin
+ ln -sfn ../bin ${DESTDIR}/usr/sbin
.for _group in ${INCSGROUPS:NINCS}
mkdir -p "${DESTDIR}/${${_group}DIR}"
.endfor