summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.subdir.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/bsd.subdir.mk')
-rw-r--r--share/mk/bsd.subdir.mk18
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>
OpenPOWER on IntegriCloud