summaryrefslogtreecommitdiff
path: root/Mk/bsd.port.subdir.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/bsd.port.subdir.mk')
-rw-r--r--Mk/bsd.port.subdir.mk16
1 files changed, 8 insertions, 8 deletions
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 7c27c594f5d1..6164c6f3b5c0 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -99,7 +99,7 @@ TARGETS+= tags
.for __target in ${TARGETS}
.if !target(${__target})
.if defined(SUBDIR) && !empty(SUBDIR)
-${__target}: ${SUBDIR:S/$/.${__target}/}
+${__target}: ${SUBDIR:S/^/_/:S/$/.${__target}/}
.else
${__target}:
.endif
@@ -109,18 +109,18 @@ ${__target}:
.if defined(SUBDIR) && !empty(SUBDIR)
.for __target in ${TARGETS} checksubdirs readmes
-${SUBDIR:S/$/.${__target}/}: _SUBDIRUSE
+${SUBDIR:S/^/_/:S/$/.${__target}/}: _SUBDIRUSE
.endfor
_SUBDIRUSE: .USE
- @OK=""; sub=${.TARGET:R}; \
+ @OK=""; sub=${.TARGET:S/^_//:R}; \
for dud in $$DUDS; do \
if [ $${dud} = $$sub ]; then \
OK="false"; \
${ECHO_MSG} "===> ${DIRPRFX}$$sub skipped"; \
fi; \
done; \
- if test -d ${.CURDIR}/${.TARGET:R}.${MACHINE_ARCH}; then \
+ if test -d ${.CURDIR}/$${sub}.${MACHINE_ARCH}; then \
edir=$${sub}.${MACHINE_ARCH}; \
elif test -d ${.CURDIR}/$${sub}; then \
edir=$${sub}; \
@@ -135,7 +135,7 @@ _SUBDIRUSE: .USE
DIRPRFX=${DIRPRFX}$$edir/; \
fi
-.for _subdir in ${SUBDIR}
+.for _subdir in ${SUBDIR:S/^/_/}
${_subdir}:: ${_subdir:S/$/.all/}
.endfor
@@ -150,14 +150,14 @@ afterinstall:
.endif
install: afterinstall
afterinstall: realinstall
-realinstall: beforeinstall ${SUBDIR:S/$/.realinstall/}
+realinstall: beforeinstall ${SUBDIR:S/^/_/:S/$/.realinstall/}
.endif
IGNOREDIR= CVS Mk Templates Tools distfiles packages pkg
.if !target(checksubdirs)
.if defined(PORTSTOP)
-checksubdirs: checksubdir ${SUBDIR:S/$/.checksubdirs/}
+checksubdirs: checksubdir ${SUBDIR:S/^/_/:S/$/.checksubdirs/}
.else
checksubdirs: checksubdir
.endif
@@ -187,7 +187,7 @@ checksubdir:
.endif
.if !target(readmes)
-readmes: readme ${SUBDIR:S/$/.readmes/}
+readmes: readme ${SUBDIR:S/^/_/:S/$/.readmes/}
.endif
.if !target(readme)