Author: bdrewery
Date: Thu Nov  9 22:08:07 2017
New Revision: 325619
URL: https://svnweb.freebsd.org/changeset/base/325619

Log:
  Mark targets .PHONY.
  
  This avoids the obvious of not running the target when expected, but
  also avoids META_MODE from showing 'Building'.  This is mostly only
  a problem when directly including bsd.obj.mk as many of these targets
  were already .PHONY via bsd.sys.mk.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/bsd.obj.mk

Modified: head/share/mk/bsd.obj.mk
==============================================================================
--- head/share/mk/bsd.obj.mk    Thu Nov  9 19:52:56 2017        (r325618)
+++ head/share/mk/bsd.obj.mk    Thu Nov  9 22:08:07 2017        (r325619)
@@ -44,8 +44,8 @@ __<bsd.obj.mk>__:
 
 .if ${MK_AUTO_OBJ} == "yes"
 # it is done by now
-objwarn:
-obj:
+objwarn: .PHONY
+obj: .PHONY
 CANONICALOBJDIR= ${.OBJDIR}
 # This is also done in bsd.init.mk
 .if defined(NO_OBJ)
@@ -145,7 +145,7 @@ obj: .PHONY
 .endif
 
 .if !target(objlink)
-objlink:
+objlink: .PHONY
        @if test -d ${CANONICALOBJDIR}/; then \
                rm -f ${.CURDIR}/obj; \
                ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
@@ -159,17 +159,17 @@ objlink:
 # where would that obj directory be?
 #
 .if !target(whereobj)
-whereobj:
+whereobj: .PHONY
        @echo ${.OBJDIR}
 .endif
 
 # Same check in bsd.progs.mk
 .if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/) && \
     (${MK_AUTO_OBJ} == "no" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} == "")
-cleanobj:
+cleanobj: .PHONY
        -rm -rf ${CANONICALOBJDIR}
 .else
-cleanobj: clean cleandepend
+cleanobj: .PHONY clean cleandepend
 .endif
        @if [ -L ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi
 
@@ -180,7 +180,7 @@ NOPATH_FILES+=      ${CLEANFILES}
 .endif
 
 .if !target(clean)
-clean:
+clean: .PHONY
 .if defined(CLEANFILES) && !empty(CLEANFILES)
        rm -f ${CLEANFILES}
 .endif
@@ -196,7 +196,7 @@ clean:
 
 .include <bsd.subdir.mk>
 
-cleandir: .WAIT cleanobj
+cleandir: .PHONY .WAIT cleanobj
 
 .if make(destroy*) && defined(OBJROOT)
 # this (rm -rf objdir) is much faster and more reliable than cleaning.
@@ -206,18 +206,18 @@ _OBJDIR?= ${.OBJDIR}
 _CURDIR?= ${.CURDIR}
 
 # destroy almost everything
-destroy: destroy-all
-destroy-all:
+destroy: .PHONY destroy-all
+destroy-all: .PHONY
 
 # just remove our objdir
-destroy-arch: .NOMETA
+destroy-arch: .PHONY .NOMETA
 .if ${_OBJDIR} != ${_CURDIR}
        cd ${_CURDIR} && rm -rf ${_OBJDIR}
 .endif
 
 .if defined(HOST_OBJTOP)
 destroy-host: destroy.host
-destroy.host: .NOMETA
+destroy.host: .PHONY .NOMETA
        cd ${_CURDIR} && rm -rf ${HOST_OBJTOP}/${RELDIR:N.}
 .endif
 
@@ -226,7 +226,7 @@ destroy-all: destroy-stage
 .endif
 
 # remove the stage tree
-destroy-stage: .NOMETA
+destroy-stage: .PHONY .NOMETA
 .if defined(STAGE_ROOT)
        cd ${_CURDIR} && rm -rf ${STAGE_ROOT}
 .endif
@@ -236,7 +236,7 @@ _destroy_machine_list = common host ${ALL_MACHINE_LIST
 .for m in ${_destroy_machine_list:O:u}
 destroy-all: destroy.$m
 .if !target(destroy.$m)
-destroy.$m: .NOMETA
+destroy.$m: .PHONY .NOMETA
 .if ${_OBJDIR} != ${_CURDIR}
        cd ${_CURDIR} && rm -rf ${OBJROOT}$m*/${RELDIR:N.}
 .endif
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to