From owner-FreeBSD-users-jp@jp.FreeBSD.org Wed Feb 12 01:52:29 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id h1BGqT062481;
	Wed, 12 Feb 2003 01:52:29 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from mail.musha.org (postfix@daemon.musha.org [210.189.104.8])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id h1BGqTJ62476
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Wed, 12 Feb 2003 01:52:29 +0900 (JST)
	(envelope-from knu@iDaemons.org)
Received: from archon.local.idaemons.org (archon.local.idaemons.org [192.168.1.32])
	by mail.musha.org (Postfix) with ESMTP id 0DCE554341
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Wed, 12 Feb 2003 01:52:24 +0900 (JST)
Message-ID: <86fzquwyie.wl%knu@iDaemons.org>
From: "Akinori MUSHA" <knu@iDaemons.org>
To: FreeBSD-users-jp@jp.FreeBSD.org
In-Reply-To: <200302111546.h1BFkq8U075988@kiri.pis>
References: <200302111546.h1BFkq8U075988@kiri.pis>
User-Agent: Wanderlust/2.11.1 (Wonderwall) EMIKO/1.14.1 (Choanoflagellata) LIMIT/1.14.7 (Fujiidera) APEL/10.4 MULE XEmacs/21.4 (patch 12) (Portable Code) (i386--freebsd)
Organization: Associated I. Daemons
X-PGP-Public-Key: finger knu@FreeBSD.org
X-PGP-Fingerprint: 081D 099C 1705 861D 4B70  B04A 920B EFC7 9FD9 E1EE
MIME-Version: 1.0 (generated by EMIKO 1.14.1 - "Choanoflagellata")
Content-Type: text/plain; charset=ISO-2022-JP
Reply-To: FreeBSD-users-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 12 Feb 2003 01:52:25 +0900
X-Sequence: FreeBSD-users-jp 73404
Subject: [FreeBSD-users-jp 73404] Re: Strange in make with eval
Errors-To: owner-FreeBSD-users-jp@jp.FreeBSD.org
Sender: owner-FreeBSD-users-jp@jp.FreeBSD.org
X-Originator: knu@iDaemons.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+030107

At Wed, 12 Feb 2003 00:46:52 +0900,
KIRIYAMA Kazuhiko wrote:
> CLASSES=	m2 m3 m4
> 
> SUBJECTS_M2=	inf
> SUBJECTS_M3=	inf
> SUBJECTS_M4=	inf infexp
> 
> test2:
> 	@echo ${SUBJECTS_M2}
> 	@echo ${SUBJECTS_M3}
> 	@echo ${SUBJECTS_M4}
> 	for class in ${CLASSES}; do \
> 		Cl=`echo $${class}|tr "[:lower:]" "[:upper:]"`; \
> 		echo $${Cl}; \
> 		eval echo \$${SUBJECTS_$${Cl}}; \
> 	done
> ====$B$3$3$^$G(B

$B!!$=$j$cL5M}$C$F$b$s$G$9!#(Bsh $B$NJQ?t$H(B make $B$NJQ?t$r:.F1$7$F$$$^$9!#(B
make $B$NJQ?t$G$d$k$J$i(B:

CLASSES=	m2 m3 m4

SUBJECTS_M2=	inf
SUBJECTS_M3=	inf
SUBJECTS_M4=	inf infexp

test2:
.for class in ${CLASSES}
	@echo ${SUBJECTS_${class:U}}
.endfor

$B$"$k$$$O(B sh $B$KEO$9$J$i(B:

CLASSES=	m2 m3 m4

SUBJECTS_M2=	inf
SUBJECTS_M3=	inf
SUBJECTS_M4=	inf infexp

.for var in CLASSES SUBJECTS_M2 SUBJECTS_M3 SUBJECTS_M4
MY_VARS+=	${var}="${${var}}";
.endfor

test2:
	@${MY_VARS} \
	for class in $${CLASSES}; do \
		Cl=`echo $${class}|tr "[:lower:]" "[:upper:]"`; \
		eval echo \$${SUBJECTS_$${Cl}}; \
	done

> $B0JA0F1$8$h$&$J$3$H$d$C$F$FLdBj$J$+$C$?$h$&$K;W$&$N$G$9$,(B...
> 
> $B!t(B bad.port.mk $B$NCf$G$bF1$8$h$&$J$3$H$d$C$F$k$N$GLdBj$J$$$H(B
> $B!t(B $B$O;W$&$N$G$9$,(B...$B!#(B

$B!!$-$C$HF1$8$h$&$G$bF1$8$G$J$+$C$?$N$G$9!#(B

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"It went right by me -- At the time it went over my head
   I was looking out the window.. I should have looked at your face instead"
