aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.subdir.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index e677ea728e05..e7523af8a6b9 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -96,10 +96,16 @@ TARGETS+= tags
.for __target in ${TARGETS}
.if !target(${__target})
+.if defined(SUBDIR) && !empty(SUBDIR)
${__target}: ${SUBDIR:S/$/.${__target}/}
+.else
+${__target}:
+.endif
.endif
.endfor
+.if defined(SUBDIR) && !empty(SUBDIR)
+
.for __target in ${TARGETS} checksubdirs readmes
${SUBDIR:S/$/.${__target}/}: _SUBDIRUSE
.endfor
@@ -129,6 +135,8 @@ _SUBDIRUSE: .USE
${SUBDIR}:: ${SUBDIR:S/$/.all/}
+.endif
+
.if !target(install)
.if !target(beforeinstall)
beforeinstall: