Rename top-level LIBCOMPAT to _LIBCOMPAT.

This avoids a conflict with LIBCOMPAT defined in bsd.libnames.mk.

Reviewed by:	bdrewery
Sponsored by:	DARPA, AFRL
This commit is contained in:
Brooks Davis 2019-10-15 21:11:22 +00:00
parent bbcf7edd98
commit ad2dd70b44
2 changed files with 17 additions and 17 deletions

View File

@ -804,10 +804,10 @@ XCFLAGS+= ${BFLAGS}
.if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "") ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "")
LIBCOMPAT= 32 _LIBCOMPAT= 32
.include "Makefile.libcompat" .include "Makefile.libcompat"
.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH:Marmv[67]*} != "" .elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH:Marmv[67]*} != ""
LIBCOMPAT= SOFT _LIBCOMPAT= SOFT
.include "Makefile.libcompat" .include "Makefile.libcompat"
.endif .endif
@ -968,7 +968,7 @@ _cleanobj_fast_depend_hack: .PHONY
echo "Removing stale dependencies for memchr"; \ echo "Removing stale dependencies for memchr"; \
rm -f ${OBJTOP}/lib/libc/.depend.${f}.*; \ rm -f ${OBJTOP}/lib/libc/.depend.${f}.*; \
fi fi
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
@if [ -e "${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.o" ] && \ @if [ -e "${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.o" ] && \
egrep -qw 'i386/string/memchr\.S' ${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.o; then \ egrep -qw 'i386/string/memchr\.S' ${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.o; then \
echo "Removing stale dependencies for memchr"; \ echo "Removing stale dependencies for memchr"; \
@ -983,7 +983,7 @@ _cleanobj_fast_depend_hack: .PHONY
egrep -qw '${f}\.[sS]' ${OBJTOP}/lib/libc/.depend.${f}.o; then \ egrep -qw '${f}\.[sS]' ${OBJTOP}/lib/libc/.depend.${f}.o; then \
echo "Removing stale dependencies for ${f} syscall wrappers"; \ echo "Removing stale dependencies for ${f} syscall wrappers"; \
rm -f ${OBJTOP}/lib/libc/.depend.${f}.* \ rm -f ${OBJTOP}/lib/libc/.depend.${f}.* \
${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \ ${_LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \
fi fi
.endfor .endfor
# 20181013 r339348 bcopy reimplemented as .c # 20181013 r339348 bcopy reimplemented as .c
@ -992,7 +992,7 @@ _cleanobj_fast_depend_hack: .PHONY
egrep -qw 'bcopy\.[sS]' ${OBJTOP}/lib/libc/.depend.${f}.o; then \ egrep -qw 'bcopy\.[sS]' ${OBJTOP}/lib/libc/.depend.${f}.o; then \
echo "Removing stale dependencies for bcopy"; \ echo "Removing stale dependencies for bcopy"; \
rm -f ${OBJTOP}/lib/libc/.depend.${f}.* \ rm -f ${OBJTOP}/lib/libc/.depend.${f}.* \
${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \ ${_LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \
fi fi
.endfor .endfor
# 20181115 r340463 bzero reimplemented as .c # 20181115 r340463 bzero reimplemented as .c
@ -1000,7 +1000,7 @@ _cleanobj_fast_depend_hack: .PHONY
egrep -qw 'bzero\.[sS]' ${OBJTOP}/lib/libc/.depend.bzero.o; then \ egrep -qw 'bzero\.[sS]' ${OBJTOP}/lib/libc/.depend.bzero.o; then \
echo "Removing stale dependencies for bzero"; \ echo "Removing stale dependencies for bzero"; \
rm -f ${OBJTOP}/lib/libc/.depend.bzero.* \ rm -f ${OBJTOP}/lib/libc/.depend.bzero.* \
${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.bzero.*}; \ ${_LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.bzero.*}; \
fi fi
# 20181009 track migration from ntp's embedded libevent to updated one # 20181009 track migration from ntp's embedded libevent to updated one
@if [ -e "${OBJTOP}/usr.sbin/ntp/libntpevent/.depend.bufferevent_openssl.o" ] && \ @if [ -e "${OBJTOP}/usr.sbin/ntp/libntpevent/.depend.bufferevent_openssl.o" ] && \
@ -1094,7 +1094,7 @@ _cleanobj:
# Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_COMPILERMK # Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_COMPILERMK
# since the restricted $PATH might not contain a valid cc binary # since the restricted $PATH might not contain a valid cc binary
${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR} ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR}
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR} ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR}
.endif .endif
.else .else
@ -1172,7 +1172,7 @@ WMAKE_TGTS+= _includes
WMAKE_TGTS+= _libraries WMAKE_TGTS+= _libraries
.endif .endif
WMAKE_TGTS+= everything WMAKE_TGTS+= everything
.if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE) .if defined(_LIBCOMPAT) && empty(SUBDIR_OVERRIDE)
WMAKE_TGTS+= build${libcompat} WMAKE_TGTS+= build${libcompat}
.endif .endif
@ -1345,7 +1345,7 @@ ITOOLS+=makewhatis
# Non-base distributions produced by the base system # Non-base distributions produced by the base system
EXTRA_DISTRIBUTIONS= EXTRA_DISTRIBUTIONS=
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
EXTRA_DISTRIBUTIONS+= lib${libcompat} EXTRA_DISTRIBUTIONS+= lib${libcompat}
.endif .endif
.if ${MK_TESTS} != "no" .if ${MK_TESTS} != "no"
@ -1398,7 +1398,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
.endif .endif
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
.if ${MK_DEBUG_FILES} != "no" .if ${MK_DEBUG_FILES} != "no"
@ -1422,7 +1422,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG} sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \ ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
.endif .endif
@ -1533,7 +1533,7 @@ restage reinstall: .MAKE .PHONY
@echo ">>> Installing everything started on `LC_ALL=C date`" @echo ">>> Installing everything started on `LC_ALL=C date`"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install${libcompat} ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install${libcompat}
.endif .endif
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
@ -1545,7 +1545,7 @@ redistribute: .MAKE .PHONY
@echo ">>> Distributing everything" @echo ">>> Distributing everything"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute${libcompat} \ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute${libcompat} \
DISTRIBUTION=lib${libcompat} DISTRIBUTION=lib${libcompat}
.endif .endif
@ -3394,7 +3394,7 @@ _xi-mtree: .PHONY
-p ${XDDESTDIR}/usr >/dev/null -p ${XDDESTDIR}/usr >/dev/null
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${XDDESTDIR}/usr/include >/dev/null -p ${XDDESTDIR}/usr/include >/dev/null
.if defined(LIBCOMPAT) .if defined(_LIBCOMPAT)
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${XDDESTDIR}/usr >/dev/null -p ${XDDESTDIR}/usr >/dev/null
.endif .endif

View File

@ -81,12 +81,12 @@ LIBSOFTWMAKEFLAGS= -DCOMPAT_SOFTFP
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Generic code for each type. # Generic code for each type.
# Set defaults based on type. # Set defaults based on type.
libcompat= ${LIBCOMPAT:tl} libcompat= ${_LIBCOMPAT:tl}
_LIBCOMPAT_MAKEVARS= _OBJTOP TMP CPUFLAGS CFLAGS CXXFLAGS WMAKEENV \ _LIBCOMPAT_MAKEVARS= _OBJTOP TMP CPUFLAGS CFLAGS CXXFLAGS WMAKEENV \
WMAKEFLAGS WMAKE WMAKEFLAGS WMAKE
.for _var in ${_LIBCOMPAT_MAKEVARS} .for _var in ${_LIBCOMPAT_MAKEVARS}
.if !empty(LIB${LIBCOMPAT}${_var}) .if !empty(LIB${_LIBCOMPAT}${_var})
LIBCOMPAT${_var}?= ${LIB${LIBCOMPAT}${_var}} LIBCOMPAT${_var}?= ${LIB${_LIBCOMPAT}${_var}}
.endif .endif
.endfor .endfor