From owner-svn-src-all@freebsd.org Tue Jan 3 23:06:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DD8EC9EF3C; Tue, 3 Jan 2017 23:06:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3825F1567; Tue, 3 Jan 2017 23:06:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03N6e9d047520; Tue, 3 Jan 2017 23:06:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03N6dCA047514; Tue, 3 Jan 2017 23:06:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201701032306.v03N6dCA047514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 3 Jan 2017 23:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r311192 - in stable/11: . share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 23:06:41 -0000 Author: bdrewery Date: Tue Jan 3 23:06:39 2017 New Revision: 311192 URL: https://svnweb.freebsd.org/changeset/base/311192 Log: MFC r305147: Add a 'make print-dir' that simply traverses all directories and prints them. Modified: stable/11/Makefile stable/11/share/mk/bsd.dep.mk stable/11/share/mk/bsd.init.mk stable/11/share/mk/bsd.subdir.mk stable/11/share/mk/local.meta.sys.mk stable/11/share/mk/sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile ============================================================================== --- stable/11/Makefile Tue Jan 3 23:04:51 2017 (r311191) +++ stable/11/Makefile Tue Jan 3 23:06:39 2017 (r311192) @@ -109,7 +109,8 @@ # Note: we use this awkward construct to be compatible with FreeBSD's # old make used in 10.0 and 9.2 and earlier. -.if defined(MK_DIRDEPS_BUILD) && ${MK_DIRDEPS_BUILD} == "yes" && !make(showconfig) +.if defined(MK_DIRDEPS_BUILD) && ${MK_DIRDEPS_BUILD} == "yes" && \ + !make(showconfig) && !make(print-dir) # targets/Makefile plays the role of top-level .include "targets/Makefile" .else @@ -132,7 +133,7 @@ TGTS= all all-man buildenv buildenvvars xdev-links native-xtools stageworld stagekernel stage-packages \ create-world-packages create-kernel-packages create-packages \ packages installconfig real-packages sign-packages package-pkg \ - test-system-compiler + print-dir test-system-compiler # XXX: r156740: This can't work since bsd.subdir.mk is not included ever. # It will only work for SUBDIR_TARGETS in make.conf. @@ -257,6 +258,10 @@ _TARGET_ARCH= ${XDEV_ARCH} _TARGET?= ${MACHINE} _TARGET_ARCH?= ${MACHINE_ARCH} +.if make(print-dir) +.SILENT: +.endif + # # Make sure we have an up-to-date make(1). Only world and buildworld # should do this as those are the initial targets used for upgrades. Modified: stable/11/share/mk/bsd.dep.mk ============================================================================== --- stable/11/share/mk/bsd.dep.mk Tue Jan 3 23:04:51 2017 (r311191) +++ stable/11/share/mk/bsd.dep.mk Tue Jan 3 23:06:39 2017 (r311192) @@ -82,9 +82,9 @@ _meta_filemon= 1 # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(analyze) || defined(_meta_filemon) + make(analyze) || defined(_meta_filemon) || make(print-dir) _SKIP_READ_DEPEND= 1 -.if ${MK_DIRDEPS_BUILD} == "no" +.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) .MAKE.DEPENDFILE= /dev/null .endif .endif @@ -198,7 +198,7 @@ CFLAGS+= ${DEPEND_CFLAGS} .endif # !defined(_meta_filemon) .endif # defined(SRCS) -.if ${MK_DIRDEPS_BUILD} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" && !make(analyze) && !make(print-dir) # Prevent meta.autodep.mk from tracking "local dependencies". .depend: .include Modified: stable/11/share/mk/bsd.init.mk ============================================================================== --- stable/11/share/mk/bsd.init.mk Tue Jan 3 23:04:51 2017 (r311191) +++ stable/11/share/mk/bsd.init.mk Tue Jan 3 23:06:39 2017 (r311192) @@ -32,7 +32,7 @@ all: beforebuild .WAIT .if ${MK_META_MODE} == "yes" .if !exists(/dev/filemon) && \ ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ - !make(showconfig) && ${.MAKEFLAGS:M-V} == "" + !make(showconfig) && !make(print-dir) && ${.MAKEFLAGS:M-V} == "" .warning The filemon module (/dev/filemon) is not loaded. .warning META_MODE is less useful for incremental builds without filemon. .warning 'kldload filemon' or pass -DNO_FILEMON to suppress this warning. Modified: stable/11/share/mk/bsd.subdir.mk ============================================================================== --- stable/11/share/mk/bsd.subdir.mk Tue Jan 3 23:04:51 2017 (r311191) +++ stable/11/share/mk/bsd.subdir.mk Tue Jan 3 23:06:39 2017 (r311192) @@ -42,15 +42,15 @@ SUBDIR_TARGETS+= \ all all-man analyze buildconfig buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanilinks \ cleanobj depend distribute files includes installconfig \ - installfiles installincludes realinstall lint maninstall \ - manlint obj objlink tags \ + installfiles installincludes print-dir realinstall lint \ + maninstall manlint obj objlink tags \ # Described above. STANDALONE_SUBDIR_TARGETS+= \ all-man buildconfig buildfiles buildincludes check checkdpadd \ clean cleandepend cleandir cleanilinks cleanobj files includes \ - installconfig installincludes installfiles maninstall manlint \ - obj objlink \ + installconfig installincludes installfiles print-dir \ + maninstall manlint obj objlink # It is safe to install in parallel when staging. .if defined(NO_ROOT) @@ -59,6 +59,16 @@ STANDALONE_SUBDIR_TARGETS+= realinstall .include +.if make(print-dir) +NEED_SUBDIR= 1 +ECHODIR= : +.SILENT: +.if ${RELDIR:U.} != "." +print-dir: .PHONY + @echo ${RELDIR} +.endif +.endif + .if !defined(NEED_SUBDIR) .if ${.MAKE.LEVEL} == 0 && ${MK_DIRDEPS_BUILD} == "yes" && !empty(SUBDIR) && !(make(clean*) || make(destroy*)) .include Modified: stable/11/share/mk/local.meta.sys.mk ============================================================================== --- stable/11/share/mk/local.meta.sys.mk Tue Jan 3 23:04:51 2017 (r311191) +++ stable/11/share/mk/local.meta.sys.mk Tue Jan 3 23:06:39 2017 (r311192) @@ -214,7 +214,8 @@ CSU_DIR := ${CSU_DIR.${MACHINE_ARCH}} .if !empty(TIME_STAMP) TRACER= ${TIME_STAMP} ${:U} .endif -.if !defined(_RECURSING_PROGS) && !defined(_RECURSING_CRUNCH) +.if !defined(_RECURSING_PROGS) && !defined(_RECURSING_CRUNCH) && \ + !make(print-dir) WITH_META_STATS= t .endif Modified: stable/11/share/mk/sys.mk ============================================================================== --- stable/11/share/mk/sys.mk Tue Jan 3 23:04:51 2017 (r311191) +++ stable/11/share/mk/sys.mk Tue Jan 3 23:06:39 2017 (r311192) @@ -97,7 +97,7 @@ META_MODE?= normal # This needs to be done early - before .PATH is computed # Don't do this for 'make showconfig' as it enables all options where meta mode # is not expected. -.if !make(showconfig) +.if !make(showconfig) && !make(print-dir) .sinclude .endif .endif