PERFORCE change 104879 for review
Warner Losh
imp at FreeBSD.org
Thu Aug 24 00:53:49 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104879
Change 104879 by imp at imp_bugs on 2006/08/24 00:53:32
Try to make it possible to create a /usr/${MACHINE_ARCH} that
contains the tools necessary for cross building. This has a lot
of rough edges and will likely undergo a lot of refinement
between now and when it is committed.
# Not sure I should do this in this tree, but there's no reason
# not to, since there's no harm unless you use it.
Affected files ...
.. //depot/projects/arm/src/Makefile#2 edit
.. //depot/projects/arm/src/Makefile.inc1#3 edit
Differences ...
==== //depot/projects/arm/src/Makefile#2 (text+ko) ====
@@ -79,7 +79,7 @@
obj objlink regress rerelease showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend \
- build32 distribute32 install32
+ build32 distribute32 install32 cross-devel cross-devel-install
TGTS+= ${SUBDIR_TARGETS}
BITGTS= files includes
@@ -156,7 +156,7 @@
#
${TGTS}:
- ${_+_}@cd ${.CURDIR}; \
+ ${_+_}cd ${.CURDIR}; \
${_MAKE} ${.TARGET}
# Set a reasonable default
==== //depot/projects/arm/src/Makefile.inc1#3 (text+ko) ====
@@ -1038,6 +1038,7 @@
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (depend,all,install)"; \
cd ${.CURDIR}/${_lib}; \
+ ${MAKE} DIRPRFX=${_lib}/ obj; \
${MAKE} DIRPRFX=${_lib}/ depend; \
${MAKE} DIRPRFX=${_lib}/ all; \
${MAKE} DIRPRFX=${_lib}/ install
@@ -1050,6 +1051,7 @@
lib/libpam__L: .PHONY
${_+_}@${ECHODIR} "===> lib/libpam (depend,all,install)"; \
cd ${.CURDIR}/lib/libpam; \
+ ${MAKE} DIRPRFX=lib/libpam/ obj; \
${MAKE} DIRPRFX=lib/libpam/ depend; \
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
@@ -1202,3 +1204,49 @@
#
showconfig:
@${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort
+
+
+###############
+
+NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
+ -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE
+
+CDENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDEV_ARCH} \
+ TOOLS_PREFIX=/usr/${XDEV_ARCH} TARGET_ARCH=${XDEV_ARCH} \
+ MACHINE_ARCH=${XDEV_ARCH}
+
+CDMAKE=${CDENV} ${MAKE} ${NOFUN}
+CD2MAKE=${CDENV} PATH=/usr/${XDEV_ARCH}/usr/bin:${PATH} ${MAKE} ${NOFUN}
+
+
+cross-devel:
+.for _tool in \
+ gnu/usr.bin/binutils \
+ gnu/usr.bin/cc
+ ${_+_}@${ECHODIR} "===> xdev.${XDEV_ARCH} ${_tool} (obj,depend,all)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${CDMAKE} DIRPRFX=${_tool}/ obj; \
+ ${CDMAKE} DIRPRFX=${_tool}/ depend; \
+ ${CDMAKE} DIRPRFX=${_tool}/ all
+.endfor
+
+_cdi-mtree:
+ ${_+_}@${ECHODIR} "mtree populating /usr/${XDEV_ARCH}"
+ mkdir -p /usr/${XDEV_ARCH}
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
+ -p /usr/${XDEV_ARCH} >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+ -p /usr/${XDEV_ARCH}/usr >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+ -p /usr/${XDEV_ARCH}/usr/include >/dev/null
+
+cross-devel-install: _cdi-mtree
+.for _tool in \
+ gnu/usr.bin/binutils \
+ gnu/usr.bin/cc
+ ${_+_}@${ECHODIR} "===> xdev.${XDEV_ARCH} ${_tool} (install)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${DESTDIR}/usr/${XDEV_ARCH}
+.endfor
+ ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes DESTDIR=${DESTDIR}/usr/${XDEV_ARCH}
+ ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries DESTDIR=${DESTDIR}/usr/${XDEV_ARCH}
More information about the p4-projects
mailing list