From b2c79b897a4742d00693e201d36c87d99916141e Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 20 Nov 2002 04:11:09 +0000 Subject: Do not choke on an empty SUBDIR. Submitted by: sada (slightly altered) --- Mk/bsd.port.subdir.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Mk') 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: -- cgit