From f7db65c8f4b855722a77f5585a85def8cb4f7bd7 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 17 Apr 2001 16:48:07 +0000 Subject: [PATCH] Use same code as bsd.port.mk --- infrastructure/mk/bsd.port.subdir.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/infrastructure/mk/bsd.port.subdir.mk b/infrastructure/mk/bsd.port.subdir.mk index ac3631dbbe5..277986d58dc 100644 --- a/infrastructure/mk/bsd.port.subdir.mk +++ b/infrastructure/mk/bsd.port.subdir.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 -# $OpenBSD: bsd.port.subdir.mk,v 1.35 2001/04/04 08:17:32 espie Exp $ +# $OpenBSD: bsd.port.subdir.mk,v 1.36 2001/04/17 16:48:07 espie Exp $ # FreeBSD Id: bsd.port.subdir.mk,v 1.20 1997/08/22 11:16:15 asami Exp # # The include file contains the default targets @@ -85,7 +85,7 @@ _SUBDIRUSE: .USE @echo "===> ${PKGPATH}${_SEP}$i skipped" . endfor @for dir in ${SUBDIR}; do \ - multi=''; flavor=''; toset=''; \ + multi=''; flavor=''; sawflavor=false; toset=''; \ case "$$dir" in \ *[,:]*) \ IFS=',:'; first=true; insert=''; for i in $$dir; do \ @@ -96,6 +96,7 @@ _SUBDIRUSE: .USE X-*) \ multi="$$i";; \ *) \ + sawflavor=true; \ flavor="$$flavor$$insert$$i"; \ insert=' ';; \ esac \ @@ -104,13 +105,13 @@ _SUBDIRUSE: .USE case X$$multi in "X");; *) \ toset="$$toset SUBPACKAGE=\"$$multi\"";; \ esac; \ - case X"$$flavor" in "X");; *) \ - toset="$$toset FLAVOR=\"$$flavor\"";; \ - esac; \ - display=" ($$flavor)";; \ - *) \ - display='';; \ esac; \ + if $$sawflavor; then \ + toset="$$toset FLAVOR=\"$$flavor\""; \ + display=" ($$flavor)"; \ + else \ + display=''; \ + fi; \ if cd ${.CURDIR}/$${dir}.${MACHINE} 2>/dev/null; then \ edir=$${dir}.${MACHINE}; \ elif cd ${.CURDIR}/$${dir} 2>/dev/null; then \