svn commit: r252073 - in stable/8: . share/mk
Simon J. Gerraty
sjg at FreeBSD.org
Fri Jun 21 22:45:05 UTC 2013
Author: sjg
Date: Fri Jun 21 22:45:03 2013
New Revision: 252073
URL: http://svnweb.freebsd.org/changeset/base/252073
Log:
share/mk: merge: r241298,243393,249057,251506 from head for bmake support.
merge: r252048 from stable/9
Makefile: merge: r252048 from stable/9 for bmake support.
Reviewed by: obrien
Modified:
stable/8/Makefile
stable/8/share/mk/bsd.dep.mk
stable/8/share/mk/bsd.obj.mk
stable/8/share/mk/bsd.own.mk
stable/8/share/mk/bsd.subdir.mk
stable/8/share/mk/bsd.sys.mk
stable/8/share/mk/sys.mk
Directory Properties:
stable/8/ (props changed)
stable/8/share/ (props changed)
stable/8/share/mk/ (props changed)
Modified: stable/8/Makefile
==============================================================================
--- stable/8/Makefile Fri Jun 21 22:26:18 2013 (r252072)
+++ stable/8/Makefile Fri Jun 21 22:45:03 2013 (r252073)
@@ -117,7 +117,13 @@ MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/
BINMAKE= \
`if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \
-m ${.CURDIR}/share/mk
+
+.if defined(.PARSEDIR)
+# don't pass -J to fmake
+_MAKE= PATH=${PATH} MAKEFLAGS="${MAKEFLAGS:N-J:N1*,1*}" ${BINMAKE} -f Makefile.inc1
+.else
_MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1
+.endif
#
# Make sure we have an up-to-date make(1). Only world and buildworld
@@ -175,7 +181,7 @@ ${TGTS}:
.MAIN: all
STARTTIME!= LC_ALL=C date
-CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s
+CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s; echo
.if !empty(CHECK_TIME)
.error check your date/time: ${STARTTIME}
.endif
Modified: stable/8/share/mk/bsd.dep.mk
==============================================================================
--- stable/8/share/mk/bsd.dep.mk Fri Jun 21 22:26:18 2013 (r252072)
+++ stable/8/share/mk/bsd.dep.mk Fri Jun 21 22:45:03 2013 (r252073)
@@ -123,6 +123,9 @@ ${_YC:R}.o: ${_YC}
.if defined(SRCS)
depend: beforedepend ${DEPENDFILE} afterdepend
+# Tell bmake not to look for generated files via .PATH
+.NOPATH: ${DEPENDFILE}
+
# Different types of sources are compiled with slightly different flags.
# Split up the sources, and filter out headers and non-applicable flags.
.if ${CC} == "icc"
Modified: stable/8/share/mk/bsd.obj.mk
==============================================================================
--- stable/8/share/mk/bsd.obj.mk Fri Jun 21 22:26:18 2013 (r252072)
+++ stable/8/share/mk/bsd.obj.mk Fri Jun 21 22:45:03 2013 (r252073)
@@ -44,6 +44,8 @@ __<bsd.obj.mk>__:
.if defined(MAKEOBJDIRPREFIX)
CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
+.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != ""
+CANONICALOBJDIR:=${MAKEOBJDIR}
.else
CANONICALOBJDIR:=/usr/obj${.CURDIR}
.endif
@@ -116,6 +118,11 @@ cleanobj: clean cleandepend
.endif
@if [ -L ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi
+# Tell bmake not to look for generated files via .PATH
+.if !empty(CLEANFILES)
+.NOPATH: ${CLEANFILES}
+.endif
+
.if !target(clean)
clean:
.if defined(CLEANFILES) && !empty(CLEANFILES)
Modified: stable/8/share/mk/bsd.own.mk
==============================================================================
--- stable/8/share/mk/bsd.own.mk Fri Jun 21 22:26:18 2013 (r252072)
+++ stable/8/share/mk/bsd.own.mk Fri Jun 21 22:45:03 2013 (r252073)
@@ -573,6 +573,8 @@ MK_${vv:H}:= ${MK_${vv:T}}
.if ${MK_CTF} != "no"
CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+.elif defined(.PARSEDIR) || ${MAKE_VERSION} >= 9201210220
+CTFCONVERT_CMD=
.else
CTFCONVERT_CMD= @:
.endif
Modified: stable/8/share/mk/bsd.subdir.mk
==============================================================================
--- stable/8/share/mk/bsd.subdir.mk Fri Jun 21 22:26:18 2013 (r252072)
+++ stable/8/share/mk/bsd.subdir.mk Fri Jun 21 22:45:03 2013 (r252073)
@@ -42,7 +42,7 @@ distribute:
_SUBDIR: .USE
.if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR)
- @${_+_}for entry in ${SUBDIR}; do \
+ @${_+_}set -e; for entry in ${SUBDIR}; do \
if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \
${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \
edir=$${entry}.${MACHINE_ARCH}; \
@@ -80,7 +80,7 @@ ${__stage}${__target}: _SUBDIR
.endif
.endfor
${__target}:
- ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target}
+ ${_+_}set -e; cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target}
.endfor
.if !target(install)
Modified: stable/8/share/mk/bsd.sys.mk
==============================================================================
--- stable/8/share/mk/bsd.sys.mk Fri Jun 21 22:26:18 2013 (r252072)
+++ stable/8/share/mk/bsd.sys.mk Fri Jun 21 22:45:03 2013 (r252073)
@@ -87,3 +87,18 @@ CFLAGS += ${SSP_CFLAGS}
# Allow user-specified additional warning flags
CFLAGS += ${CWARNFLAGS}
+
+
+# Tell bmake not to mistake standard targets for things to be searched for
+# or expect to ever be up-to-date.
+PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
+ beforelinking build build-tools buildfiles buildincludes \
+ checkdpadd clean cleandepend cleandir cleanobj configure \
+ depend dependall distclean distribute exe extract fetch \
+ html includes install installfiles installincludes lint \
+ obj objlink objs objwarn patch realall realdepend \
+ realinstall regress subdir-all subdir-depend subdir-install \
+ tags whereobj
+
+.PHONY: ${PHONY_NOTMAIN}
+.NOTMAIN: ${PHONY_NOTMAIN}
Modified: stable/8/share/mk/sys.mk
==============================================================================
--- stable/8/share/mk/sys.mk Fri Jun 21 22:26:18 2013 (r252072)
+++ stable/8/share/mk/sys.mk Fri Jun 21 22:45:03 2013 (r252073)
@@ -4,6 +4,10 @@
unix ?= We run FreeBSD, not UNIX.
.FreeBSD ?= true
+# Set any local definitions first. Place this early, but it needs
+# MACHINE_CPUARCH to be defined.
+.sinclude <local.sys.mk>
+
# If the special target .POSIX appears (without prerequisites or
# commands) before the first noncomment line in the makefile, make shall
# process the makefile as specified by the Posix 1003.2 specification.
@@ -304,8 +308,22 @@ SHELL= ${__MAKE_SHELL}
# XXX hint for bsd.port.mk
OBJFORMAT?= elf
+# Tell bmake to expand -V VAR by default
+.MAKE.EXPAND_VARIABLES= yes
+
+# Tell bmake the makefile preference
+.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile
+
+.if !defined(.PARSEDIR)
+# We are not bmake, which is more aggressive about searching .PATH
+# It is sometime necessary to curb its enthusiasm with .NOPATH
+# The following allows us to quietly ignore .NOPATH when not using bmake.
+.NOTMAIN: .NOPATH
+.NOPATH:
+
# Toggle on warnings
.WARN: dirsyntax
+.endif
.endif
More information about the svn-src-stable-8
mailing list