diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2017-01-03 23:06:39 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2017-01-03 23:06:39 +0000 |
commit | c7bf15175dbaf1dbb0ee7f709aff0655f1e0f8b4 (patch) | |
tree | 50006af07e1463e5798a9a62913d3560610bc525 /share/mk/bsd.subdir.mk | |
parent | f156cf7f474381c09fef820497b789e15c2cc86d (diff) | |
download | FreeBSD-src-c7bf15175dbaf1dbb0ee7f709aff0655f1e0f8b4.zip FreeBSD-src-c7bf15175dbaf1dbb0ee7f709aff0655f1e0f8b4.tar.gz |
MFC r305147:
Add a 'make print-dir' that simply traverses all directories and prints them.
Diffstat (limited to 'share/mk/bsd.subdir.mk')
-rw-r--r-- | share/mk/bsd.subdir.mk | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 504ef3f..7a64203 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -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 <bsd.init.mk> +.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 <meta.subdir.mk> |