summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-03-11 23:56:33 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-03-11 23:56:33 +0000
commitdba75e9fa5a99edfc31de260aabf5d4f33a8d0e0 (patch)
tree3fe2a6efc9b3b4732a1261e5f808de30226ea57d /Makefile.inc1
parentb5fb065156f043ad4fd44d48490d9b1410a56d8c (diff)
downloadsrc-test2-dba75e9fa5a99edfc31de260aabf5d4f33a8d0e0.tar.gz
src-test2-dba75e9fa5a99edfc31de260aabf5d4f33a8d0e0.zip
Move Makefile.lib32 to Makefile.libcompat and generalize it.
This is in preparation for LIBSOFT. This file only supports *1* LIBCOMPAT value currently and must be capitalized. In Makefile.libcompat given LIBCOMPAT=FOO there can be values set for LIBFOOCFLAGS, LIBFOOCPUFLAGS, LIBFOOWMAKEENV, LIBFOOWMAKEFLAGS, LIBFOOCPUFLAGS, and LIBFOODTRACE. These will have the standard cross-build values appended onto them. This could be extended to support multiple libcompat libraries in the future once there is a need. Reviewed by: imp Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5612
Notes
Notes: svn path=/head/; revision=296709
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc158
1 files changed, 30 insertions, 28 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 36e464fcc8c1..daf33f4b746e 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -454,8 +454,10 @@ XCXXFLAGS+= ${BFLAGS}
.endif
.endif # ${XCC:M/*}
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
-.include "Makefile.lib32"
+.if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
+ ${TARGET_ARCH} == "powerpc64")
+LIBCOMPAT= 32
+.include "Makefile.libcompat"
.endif
WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP}
@@ -513,8 +515,8 @@ _worldtmp: .PHONY
@echo "--------------------------------------------------------------"
.if !defined(NO_CLEAN)
rm -rf ${WORLDTMP}
-.if defined(LIB32TMP)
- rm -rf ${LIB32TMP}
+.if defined(LIBCOMPAT)
+ rm -rf ${LIBCOMPATTMP}
.endif
.else
rm -rf ${WORLDTMP}/legacy/usr/include
@@ -544,13 +546,13 @@ _worldtmp: .PHONY
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${WORLDTMP}/usr/lib >/dev/null
.endif
-.if ${MK_LIB32} != "no"
- mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+.if defined(LIBCOMPAT)
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${WORLDTMP}/usr >/dev/null
.if ${MK_DEBUG_FILES} != "no"
- mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${WORLDTMP}/legacy/usr/lib/debug/usr >/dev/null
- mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${WORLDTMP}/usr/lib/debug/usr >/dev/null
.endif
.endif
@@ -586,8 +588,8 @@ _cleanobj:
@echo ">>> stage 2.1: cleaning up the object tree"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR}
-.if defined(LIB32TMP)
- ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR}
+.if defined(LIBCOMPAT)
+ ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} -f Makefile.inc1 ${CLEANDIR}
.endif
.endif
_obj:
@@ -653,8 +655,8 @@ WMAKE_TGTS+= _includes _libraries
WMAKE_TGTS+= _depend
.endif
WMAKE_TGTS+= everything
-.if defined(LIB32TMP) && ${MK_LIB32} != "no" && empty(SUBDIR_OVERRIDE)
-WMAKE_TGTS+= build32
+.if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE)
+WMAKE_TGTS+= build${libcompat}
.endif
buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
@@ -694,7 +696,7 @@ buildenv: .PHONY
@cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \
|| true
-TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
+TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild${libcompat}}
toolchain: ${TOOLCHAIN_TGTS}
kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
@@ -788,8 +790,8 @@ ITOOLS+=makewhatis
# Non-base distributions produced by the base system
EXTRA_DISTRIBUTIONS= doc
-.if defined(LIB32TMP) && ${MK_LIB32} != "no"
-EXTRA_DISTRIBUTIONS+= lib32
+.if defined(LIBCOMPAT)
+EXTRA_DISTRIBUTIONS+= lib${libcompat}
.endif
.if ${MK_TESTS} != "no"
EXTRA_DISTRIBUTIONS+= tests
@@ -841,11 +843,11 @@ distributeworld installworld: _installcheck_world
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
.endif
-.if ${MK_LIB32} != "no"
- mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+.if defined(LIBCOMPAT)
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
.if ${MK_DEBUG_FILES} != "no"
- mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/usr >/dev/null
.endif
.endif
@@ -865,8 +867,8 @@ distributeworld installworld: _installcheck_world
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
-.if ${MK_LIB32} != "no"
- ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.lib32.dist | \
+.if defined(LIBCOMPAT)
+ ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
.endif
.endif
@@ -951,8 +953,8 @@ reinstall: .MAKE .PHONY
@echo ">>> Installing everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
-.if defined(LIB32TMP) && ${MK_LIB32} != "no"
- ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
+.if defined(LIBCOMPAT)
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install${libcompat}
.endif
redistribute: .MAKE .PHONY
@@ -960,9 +962,9 @@ redistribute: .MAKE .PHONY
@echo ">>> Distributing everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
-.if defined(LIB32TMP) && ${MK_LIB32} != "no"
- ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \
- DISTRIBUTION=lib32
+.if defined(LIBCOMPAT)
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute${libcompat} \
+ DISTRIBUTION=lib${libcompat}
.endif
distrib-dirs distribution: .MAKE .PHONY
@@ -1025,7 +1027,7 @@ INSTALLKERNEL= ${_kernel}
.endif
.endfor
-${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY
+${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY
#
# buildkernel
@@ -2274,8 +2276,8 @@ _xi-mtree: .PHONY
-p ${XDDESTDIR}/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${XDDESTDIR}/usr/include >/dev/null
-.if ${MK_LIB32} != "no"
- mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+.if defined(LIBCOMPAT)
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${XDDESTDIR}/usr >/dev/null
.endif
.if ${MK_TESTS} != "no"