diff options
author | gad <gad@FreeBSD.org> | 2003-12-09 00:42:44 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2003-12-09 00:42:44 +0000 |
commit | b23168a4ae0a4f075c2d613ded671113256bba5e (patch) | |
tree | 2c21aab3a1d9cacbce050872709756178efa6348 | |
parent | f9c332bd6adec0361d112a86754f619197f5d380 (diff) | |
download | FreeBSD-src-b23168a4ae0a4f075c2d613ded671113256bba5e.zip FreeBSD-src-b23168a4ae0a4f075c2d613ded671113256bba5e.tar.gz |
Fix a problem where 'make installworld' will fail and leave the
system in a messy state *if* the user is upgrading from a system
which has no /libexec to a system which builds a DYNAMICROOT, and
if that user has set DISTDIR (as documented for ports, but it turns
out that the same variable name is used for a completely unrelated
purpose in 'make release').
There are other possible fixes for this issue, and ru@ may later
decide to commit one of those fixes. I just wanted some fix in
ASAP, and this is the fix that I have tested.
Reviewed by: bde, imp, and ru
-rw-r--r-- | Makefile.inc1 | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 3e79035..786dc6a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -46,19 +46,16 @@ SUBDIR+= share/info .if exists(${.CURDIR}/include) SUBDIR+= include .endif + +# We must do lib and libexec before bin, because if installworld +# installs a new /bin/sh, the 'make' command will *immediately* +# use that new version. And the new (dynamically-linked) /bin/sh +# will expect to find appropriate libraries in /lib and /libexec. .if exists(${.CURDIR}/lib) SUBDIR+= lib .endif - -# When upgrading to a dynamically linked root, install the runtime -# linker early into its new location before make(1) has a chance -# to run the dynamically linked /bin/sh. -.if !defined(NO_DYNAMICROOT) && !defined(NOPIC) && \ - (!defined(TARGET_ARCH) || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ - !defined(DISTDIR) && \ - (!defined(DESTDIR) || empty(DESTDIR) || ${DESTDIR} == "/") && \ - !exists(/libexec/ld-elf.so.1) -SUBDIR+= libexec/rtld-elf +.if exists(${.CURDIR}/libexec) +SUBDIR+= libexec .endif .if exists(${.CURDIR}/bin) @@ -74,9 +71,6 @@ SUBDIR+= gnu !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_KERBEROS) SUBDIR+= kerberos5 .endif -.if exists(${.CURDIR}/libexec) -SUBDIR+= libexec -.endif .if exists(${.CURDIR}/rescue) && !defined(NO_RESCUE) SUBDIR+= rescue .endif |