aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc115
-rw-r--r--include/Makefile7
-rw-r--r--include/i386/Makefile7
3 files changed, 29 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 5aaa9a414473..20c537512273 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1062,6 +1062,9 @@ _bootstrap-tools:
-p ${WORLDTMP}/usr >/dev/null
${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${WORLDTMP}/usr/include >/dev/null
+.if ${TARGET_ARCH} == "amd64"
+ mkdir -p ${WORLDTMP}/usr/include/i386
+.endif
ln -sf ${.CURDIR}/sys ${WORLDTMP}
.if ${MK_DEBUG_FILES} != "no"
${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
@@ -1395,6 +1398,9 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
-p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null
+.if ${TARGET_ARCH} == "amd64"
+ -mkdir ${DESTDIR}/${DISTDIR}/usr/include/i386
+.endif
.if ${MK_DEBUG_FILES} != "no"
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
@@ -1423,6 +1429,9 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
+.if ${TARGET_ARCH} == "amd64"
+ echo "./${dist}/usr/include/i386 type=dir uname=root gname=wheel mode=0755" >> ${METALOG}
+.endif
.if defined(_LIBCOMPAT)
${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
@@ -2852,6 +2861,9 @@ native-xtools-install: .PHONY
-p ${NXBDESTDIR}/usr >/dev/null
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${NXBDESTDIR}/usr/include >/dev/null
+.if ${TARGET_ARCH} == "amd64"
+ mkdir -p ${NXBDESTDIR}/usr/include/i386
+.endif
${_+_}cd ${.CURDIR}; ${NXBMAKE} \
DESTDIR=${NXBDESTDIR} \
-DNO_ROOT \
@@ -3545,6 +3557,9 @@ _xi-mtree: .PHONY
-p ${XDDESTDIR}/usr >/dev/null
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${XDDESTDIR}/usr/include >/dev/null
+.if ${TARGET_ARCH} == "amd64"
+ mkdir -p ${XDDESTDIR}/usr/include/i386
+.endif
.if defined(_LIBCOMPAT)
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${XDDESTDIR}/usr >/dev/null
diff --git a/include/Makefile b/include/Makefile
index 42590b900442..8d847a3a8dd2 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -8,6 +8,9 @@
PACKAGE=runtime
CLEANFILES= osreldate.h version
SUBDIR= arpa protocols rpcsvc rpc xlocale
+.if ${MACHINE_CPUARCH} == "amd64"
+SUBDIR+= i386
+.endif
SUBDIR_PARALLEL=
INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
db.h \
@@ -338,6 +341,10 @@ compat:
mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
-p ${SDESTDIR}${INCLUDEDIR} > /dev/null
+.if ${MACHINE_CPUARCH} == "amd64"
+ ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${SDESTDIR}${INCLUDEDIR}/i386
+.endif
copies: .PHONY .META
cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \
diff --git a/include/i386/Makefile b/include/i386/Makefile
new file mode 100644
index 000000000000..60f70d4756b2
--- /dev/null
+++ b/include/i386/Makefile
@@ -0,0 +1,7 @@
+# i386 headers installed on amd64
+
+.PATH: ${SRCTOP}/sys/i386/include
+INCS=
+INCSDIR= ${INCLUDEDIR}/i386
+
+.include <bsd.prog.mk>