Skip to content

Commit

Permalink
Merge from head
Browse files Browse the repository at this point in the history
  • Loading branch information
sgerraty committed Sep 5, 2013
2 parents 12d4083 + b6f49c2 commit d1d0158
Show file tree
Hide file tree
Showing 11,559 changed files with 2,449,888 additions and 607,234 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 5 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ MAC Framework rwatson Pre-commit review requested.
MAC Modules rwatson Pre-commit review requested.
contrib/openbsm rwatson Pre-commit review requested.
sys/security/audit rwatson Pre-commit review requested.
ath(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org
ahc(4) gibbs Pre-commit review requested.
ahd(4) gibbs Pre-commit review requested.
PC Card imp Pre-commit review requested.
Expand Down Expand Up @@ -63,8 +64,7 @@ procfs des Pre-commit review requested.
linprocfs des Pre-commit review requested.
lpr gad Pre-commit review requested, particularly for
lpd/recvjob.c and lpd/printjob.c.
newsyslog(8) gad Heads-up appreciated. I'm going thru the PR's for it.
cvs peter Heads-up appreciated, try not to break it.
net80211 adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org
nvi peter Try not to break it.
libz peter Try not to break it.
groff ru Recommends pre-commit review.
Expand Down Expand Up @@ -128,3 +128,6 @@ sysdoc trhodes Pre-commit review preferred.
sh(1) jilles Pre-commit review requested. This also applies
to kill(1), printf(1) and test(1) which are
compiled in as builtins.
nvme(4) jimharris Pre-commit review requested.
nvd(4) jimharris Pre-commit review requested.
nvmecontrol(8) jimharris Pre-commit review requested.
98 changes: 69 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
# targets - Print a list of supported TARGET/TARGET_ARCH pairs
# for world and kernel targets.
# toolchains - Build a toolchain for all world and kernel targets.
#
# "quick" way to test all kernel builds:
# _jflag=`sysctl -n hw.ncpu`
# _jflag=$(($_jflag * 2))
# [ $_jflag -gt 12 ] && _jflag=12
# make universe -DMAKE_JUST_KERNELS JFLAG=-j${_jflag}
#
# This makefile is simple by design. The FreeBSD make automatically reads
# the /usr/share/mk/sys.mk unless the -m argument is specified on the
Expand Down Expand Up @@ -65,8 +71,8 @@
# 5. `reboot' (in single user mode: boot -s from the loader prompt).
# 6. `mergemaster -p'
# 7. `make installworld'
# 8. `make delete-old'
# 9. `mergemaster' (you may wish to use -i, along with -U or -F).
# 8. `mergemaster' (you may wish to use -i, along with -U or -F).
# 9. `make delete-old'
# 10. `reboot'
# 11. `make delete-old-libs' (in case no 3rd party program uses them anymore)
#
Expand Down Expand Up @@ -124,11 +130,34 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
(in make.conf(5)) or command-line variable.
.endif
MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}
BINMAKE= \
`if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \

# We often need to use the tree's version of make to build it.
# Choices add to complexity though.
# We cannot blindly use a make which may not be the one we want
# so be exlicit - until all choice is removed.
.if !defined(WITHOUT_BMAKE)
WANT_MAKE= bmake
.else
WANT_MAKE= fmake
.endif
MYMAKE= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}/${WANT_MAKE}
.if defined(.PARSEDIR)
HAVE_MAKE= bmake
.else
HAVE_MAKE= fmake
.endif
.if exists(${MYMAKE})
SUB_MAKE:= ${MYMAKE} -m ${.CURDIR}/share/mk
.elif ${WANT_MAKE} != ${HAVE_MAKE} || ${WANT_MAKE} != "bmake"
# It may not exist yet but we may cause it to.
# In the case of fmake, upgrade_checks may cause a newer version to be built.
SUB_MAKE= `test -x ${MYMAKE} && echo ${MYMAKE} || echo ${MAKE}` \
-m ${.CURDIR}/share/mk
_MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH}
.else
SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk
.endif

_MAKE= PATH=${PATH} ${SUB_MAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH}

# Guess machine architecture from machine type, and vice versa.
.if !defined(TARGET_ARCH) && defined(TARGET)
Expand Down Expand Up @@ -209,6 +238,13 @@ cleanworld:
# Handle the user-driven targets, using the source relative mk files.
#

.if empty(.MAKEFLAGS:M-n)
# skip this for -n to avoid changing previous behavior of
# 'make -n buildworld' etc.
${TGTS}: .MAKE
tinderbox toolchains kernel-toolchains: .MAKE
.endif

${TGTS}:
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}

Expand Down Expand Up @@ -279,26 +315,27 @@ kernel: buildkernel installkernel
# Perform a few tests to determine if the installed tools are adequate
# for building the world.
#
# Note: if we ever need to care about the version of bmake, simply testing
# MAKE_VERSION against a required version should suffice.
#
upgrade_checks:
.if !defined(.PARSEDIR)
.if defined(WITH_BMAKE)
(cd ${.CURDIR} && ${MAKE} bmake)
.else
.if ${HAVE_MAKE} != ${WANT_MAKE}
@(cd ${.CURDIR} && ${MAKE} ${WANT_MAKE:S,^f,,})
.elif ${WANT_MAKE} == "fmake"
@if ! (cd ${.CURDIR}/tools/build/make_check && \
PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \
PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \
then \
(cd ${.CURDIR} && ${MAKE} make); \
fi
.endif
.endif

#
# Upgrade make(1) to the current version using the installed
# headers, libraries and tools. Also, allow the location of
# the system bsdmake-like utility to be overridden.
#
MMAKEENV= MAKEOBJDIRPREFIX=${MAKEPATH} \
MMAKEENV= MAKEOBJDIRPREFIX=${MYMAKE:H} \
DESTDIR= \
INSTALL="sh ${.CURDIR}/tools/install.sh"
MMAKE= ${MMAKEENV} ${MAKE} \
Expand All @@ -312,19 +349,21 @@ make bmake: .PHONY
@echo ">>> Building an up-to-date make(1)"
@echo "--------------------------------------------------------------"
${_+_}@cd ${.CURDIR}/usr.bin/${.TARGET}; \
${MMAKE} obj && \
${MMAKE} depend && \
${MMAKE} all && \
${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
${MMAKE} obj DESTDIR= && \
${MMAKE} depend DESTDIR= && \
${MMAKE} all DESTDIR= && \
${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= PROGNAME=${MYMAKE:T}

tinderbox toolchains kernel-toolchains: upgrade_checks

tinderbox:
@cd ${.CURDIR} && ${MAKE} DOING_TINDERBOX=YES universe
@cd ${.CURDIR} && ${SUB_MAKE} DOING_TINDERBOX=YES universe

toolchains:
@cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe
@cd ${.CURDIR} && ${SUB_MAKE} UNIVERSE_TARGET=toolchain universe

kernel-toolchains:
@cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=kernel-toolchain universe
@cd ${.CURDIR} && ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe

#
# universe
Expand Down Expand Up @@ -365,7 +404,8 @@ MAKEFAIL=tee -a ${FAILFILE}
MAKEFAIL=cat
.endif

universe: universe_prologue upgrade_checks
universe_prologue: upgrade_checks
universe: universe_prologue
universe_prologue:
@echo "--------------------------------------------------------------"
@echo ">>> make universe started on ${STARTTIME}"
Expand All @@ -375,17 +415,17 @@ universe_prologue:
.endif
.for target in ${TARGETS}
universe: universe_${target}
.ORDER: universe_prologue upgrade_checks universe_${target}_prologue universe_${target} universe_epilogue
universe_epilogue: universe_${target}
universe_${target}: universe_${target}_prologue
universe_${target}_prologue:
universe_${target}_prologue: universe_prologue
@echo ">> ${target} started on `LC_ALL=C date`"
.if !defined(MAKE_JUST_KERNELS)
.for target_arch in ${TARGET_ARCHES_${target}}
universe_${target}: universe_${target}_${target_arch}
universe_${target}_${target_arch}: universe_${target}_prologue
universe_${target}_${target_arch}: universe_${target}_prologue .MAKE
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`"
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
${MAKE} ${JFLAG} ${UNIVERSE_TARGET} \
${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \
TARGET=${target} \
TARGET_ARCH=${target_arch} \
> _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
Expand All @@ -403,14 +443,14 @@ universe_${target}_kernels: universe_${target}_${target_arch}
.endfor
.endif
universe_${target}: universe_${target}_kernels
universe_${target}_kernels: universe_${target}_prologue
universe_${target}_kernels: universe_${target}_prologue .MAKE
.if exists(${KERNSRCDIR}/${target}/conf/NOTES)
@(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
${SUB_MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
(echo "${target} 'make LINT' failed," \
"check _.${target}.makeLINT for details"| ${MAKEFAIL}))
.endif
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \
@cd ${.CURDIR} && ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \
universe_kernels
.endif
@echo ">> ${target} completed on `LC_ALL=C date`"
Expand All @@ -431,9 +471,9 @@ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \
.error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old."
.endif
universe_kernconfs: universe_kernconf_${TARGET}_${kernel}
universe_kernconf_${TARGET}_${kernel}:
universe_kernconf_${TARGET}_${kernel}: .MAKE
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
${MAKE} ${JFLAG} buildkernel \
${SUB_MAKE} ${JFLAG} buildkernel \
TARGET=${TARGET} \
TARGET_ARCH=${TARGET_ARCH_${kernel}} \
KERNCONF=${kernel} \
Expand Down
Loading

0 comments on commit d1d0158

Please sign in to comment.