aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2002-11-20 12:11:09 +0800
committerknu <knu@FreeBSD.org>2002-11-20 12:11:09 +0800
commitb2c79b897a4742d00693e201d36c87d99916141e (patch)
tree831a6ec89b71466d137e9fc215741065396c84e7 /Mk
parent6f01ead917ec97f75e48dcd4358b3a5f01263bc9 (diff)
downloadfreebsd-ports-gnome-b2c79b897a4742d00693e201d36c87d99916141e.tar.gz
freebsd-ports-gnome-b2c79b897a4742d00693e201d36c87d99916141e.tar.zst
freebsd-ports-gnome-b2c79b897a4742d00693e201d36c87d99916141e.zip
Do not choke on an empty SUBDIR.
Submitted by: sada (slightly altered)
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: