Consolidate common beforebuild logic.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery
2016-02-16 02:09:48 +00:00
parent 179a5a39a8
commit 1bd4272fb9
5 changed files with 7 additions and 9 deletions
+4
View File
@@ -15,6 +15,10 @@ __<bsd.init.mk>__:
.endif .endif
.include <bsd.own.mk> .include <bsd.own.mk>
.MAIN: all .MAIN: all
beforebuild: .PHONY .NOTMAIN
.if !defined(_SKIP_BUILD)
all: beforebuild .WAIT
.endif
.if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) .if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*)
# this tells lib.mk and prog.mk to not actually build anything # this tells lib.mk and prog.mk to not actually build anything
-5
View File
@@ -128,11 +128,6 @@ PO_FLAG=-pg
-c ${.IMPSRC} -o ${.TARGET} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD} ${CTFCONVERT_CMD}
.if !defined(_SKIP_BUILD)
all: beforebuild .WAIT
beforebuild: objwarn
.endif
_LIBDIR:=${LIBDIR} _LIBDIR:=${LIBDIR}
_SHLIBDIR:=${SHLIBDIR} _SHLIBDIR:=${SHLIBDIR}
+1
View File
@@ -89,6 +89,7 @@ objwarn:
canonical ${CANONICALOBJDIR}" canonical ${CANONICALOBJDIR}"
.endif .endif
.endif .endif
beforebuild: objwarn
.if !defined(NO_OBJ) .if !defined(NO_OBJ)
.if !target(obj) .if !target(obj)
+1 -2
View File
@@ -148,8 +148,7 @@ MAN1= ${MAN}
.if defined(_SKIP_BUILD) .if defined(_SKIP_BUILD)
all: all:
.else .else
all: beforebuild .WAIT ${PROG} ${SCRIPTS} all: ${PROG} ${SCRIPTS}
beforebuild: objwarn
.if ${MK_MAN} != "no" .if ${MK_MAN} != "no"
all: _manpages all: _manpages
.endif .endif
+1 -2
View File
@@ -249,8 +249,7 @@ _ILINKS+=x86
.endif .endif
CLEANFILES+=${_ILINKS} CLEANFILES+=${_ILINKS}
all: beforebuild .WAIT ${PROG} all: ${PROG}
beforebuild: objwarn
beforedepend: ${_ILINKS} beforedepend: ${_ILINKS}
beforebuild: ${_ILINKS} beforebuild: ${_ILINKS}