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
This commit is contained in:
parent
40c5c1f8a1
commit
5091e3df70
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user