PERFORCE change 150087 for review
Warner Losh
imp at FreeBSD.org
Fri Sep 19 04:32:40 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150087
Change 150087 by imp at imp_paco-paco on 2008/09/19 04:32:04
Merge more from svn... More is likely needed.
Affected files ...
.. //depot/projects/mips2/src/Makefile.inc1#22 edit
Differences ...
==== //depot/projects/mips2/src/Makefile.inc1#22 (text+ko) ====
@@ -167,7 +167,14 @@
STRICTTMPPATH= ${BPATH}:${XPATH}
TMPPATH= ${STRICTTMPPATH}:${PATH}
+#
+# Avoid running mktemp(1) unless actually needed.
+# It may not be functional, e.g., due to new ABI
+# when in the middle of installing over this system.
+#
+.if make(distributeworld) || make(installworld)
INSTALLTMP!= /usr/bin/mktemp -d -u -t install
+.endif
#
# Building a world goes through the following stages
@@ -592,6 +599,14 @@
.endfor
#
+# Required install tools to be saved in a scratch dir for safety.
+#
+ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
+ date echo egrep find grep install-info \
+ ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
+ test true uname wc zic
+
+#
# distributeworld
#
# Distributes everything compiled by a `buildworld'.
@@ -602,19 +617,28 @@
#
distributeworld installworld: installcheck
mkdir -p ${INSTALLTMP}
- for prog in [ awk cap_mkdb cat chflags chmod chown \
- date echo egrep find grep install-info \
- ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
- test true uname wc zic; do \
+ progs=$$(for prog in ${ITOOLS}; do \
if progpath=`which $$prog`; then \
- cp $$progpath ${INSTALLTMP}; \
+ echo $$progpath; \
+ else \
+ echo "Required tool $$prog not found in PATH." >&2; \
+ exit 1; \
+ fi; \
+ done); \
+ libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \
+ while read line; do \
+ set -- $$line; \
+ if [ "$$2 $$3" != "not found" ]; then \
+ echo $$2; \
else \
- echo "Required install tool $$prog not found" >&2; \
+ echo "Required library $$1 not found." >&2; \
exit 1; \
fi; \
- done
- ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
- rm -rf ${INSTALLTMP}
+ done); \
+ cp $$libs $$progs ${INSTALLTMP}
+ cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
+ ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
+ ${IMAKEENV} rm -rf ${INSTALLTMP}
#
# reinstall
More information about the p4-projects
mailing list