CPUTYPE is now a required define for calling Makefile.inc1 diretly, so

make sure we define it for the xdev stuff.

Move xdev stuff to be last again in this file.

# xdev-build works now, but xdev-install appears to be broken though.
This commit is contained in:
Warner Losh 2011-02-11 02:37:47 +00:00
parent 6998f84670
commit f263e792e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218533

View File

@ -1389,11 +1389,54 @@ check-old: check-old-files check-old-libs check-old-dirs
showconfig:
@${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort
.if !empty(KRNLOBJDIR) && !empty(KERNCONF)
DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/
.if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE)
.if exists(${KERNCONFDIR}/${KERNCONF})
FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \
${KERNCONFDIR}/${KERNCONF}
.endif
.endif
.endif
.if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH})
DTBOUTPUTPATH= ${.CURDIR}
.endif
#
# Build 'standalone' Device Tree Blob
#
builddtb:
@if [ "${FDT_DTS_FILE}" = "" ]; then \
echo "ERROR: FDT_DTS_FILE must be specified!"; \
exit 1; \
fi; \
if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \
echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \
exist!"; \
exit 1; \
fi; \
if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \
echo "WARNING: DTB will be placed in the current working \
directory"; \
fi
@PATH=${TMPPATH} \
dtc -O dtb -o \
${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \
-p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE}
###############
.if defined(XDEV) && defined(XDEV_ARCH)
.if ${XDEV} == ${MACHINE} && ${XDEV_ARCH} == ${MACHINE_ARCH}
XDEV_CPUTYPE?=${CPUTYPE}
.else
XDEV_CPUTYPE?=${TARGET_CPUTYPE}
.endif
NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
-DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \
-DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS
@ -1401,7 +1444,8 @@ NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
XDDIR=${XDEV}-freebsd
XDTP=/usr/${XDDIR}
CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH}
TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \
CPUTYPE=${XDEV_CPUTYPE}
CDENV= ${CDBENV} \
_SHLIBDIRPREFIX=${XDTP} \
TOOLS_PREFIX=${XDTP}
@ -1477,41 +1521,3 @@ _xi-links:
../../../../usr/bin/${XDDIR}${OSREL}-$$i; \
done
.endif
.if !empty(KRNLOBJDIR) && !empty(KERNCONF)
DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/
.if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE)
.if exists(${KERNCONFDIR}/${KERNCONF})
FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \
${KERNCONFDIR}/${KERNCONF}
.endif
.endif
.endif
.if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH})
DTBOUTPUTPATH= ${.CURDIR}
.endif
#
# Build 'standalone' Device Tree Blob
#
builddtb:
@if [ "${FDT_DTS_FILE}" = "" ]; then \
echo "ERROR: FDT_DTS_FILE must be specified!"; \
exit 1; \
fi; \
if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \
echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \
exist!"; \
exit 1; \
fi; \
if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \
echo "WARNING: DTB will be placed in the current working \
directory"; \
fi
@PATH=${TMPPATH} \
dtc -O dtb -o \
${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \
-p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE}