NetBSD Problem Report #10264
Received: (qmail 14486 invoked from network); 2 Jun 2000 11:26:58 -0000
Message-Id: <200006021126.VAA00596@zen.quick.com.au>
Date: Fri, 2 Jun 2000 21:26:44 +1000 (EST)
From: "Simon J. Gerraty" <sjg@quick.com.au>
Reply-To: sjg@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: make(1) .for does not handle vars in modifiers of iterators
X-Send-Pr-Version: 3.95
>Number: 10264
>Category: toolchain
>Synopsis: make(1) .for does not handle vars in modifiers of iterators
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: toolchain-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 02 11:28:01 +0000 2000
>Closed-Date: Wed Dec 24 06:34:53 +0000 2003
>Last-Modified: Wed Dec 24 06:34:53 +0000 2003
>Originator: Simon J. Gerraty
>Release: NetBSD 2000-06-02
>Organization:
Zen Programming...
>Environment:
System: NetBSD zen.quick.com.au 1.4.2 NetBSD 1.4.2 (ZEN) #2: Wed Mar 22 01:07:26 EST 2000 root@zen.quick.com.au:/u3/NetBSD/1.4.X/src/sys/arch/i386/compile/ZEN i386
>Description:
The recent change to the implementation of .for - using a separate context
which is only searched for iterator variables so that normal code paths
through Var_Parse etc can be used, breaks makefiles which use a variable
to modify an iterator as in the example below.
GLOBAL=.gz
.for f in foo.txt foo.ps
${f:S/$/${GLOBAL}/}: ${f}
@echo "$f -> ${.TARGET}"
.endfor
$ touch foo.ps
$ make foo.ps.gz
make: don't know how to make foo.ps.gz. Stop
instead of:
$ make foo.ps.gz
foo.ps -> foo.ps.gz
More complex Makefiles bomb with a "graph cycles through ..." error.
>How-To-Repeat:
Use make(1) with for.c v1.9 and var.c v1.4[67]
>Fix:
Don't have one. It might be possible to be a bit more clever with Var_Find
when expanding variables from VAR_FOR, but I can't say. The new code looks
cleaner, so if it can be made to work great.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: bin-bug-people->toolchain-manager
Responsible-Changed-By: gnats
Responsible-Changed-When: Tue Feb 12 00:54:26 PST 2002
Responsible-Changed-Why:
There is now a "toolchain-manager" which is the proper default role
account for handling problem reports in the toolchain category.
State-Changed-From-To: open->closed
State-Changed-By: jmc
State-Changed-When: Wed Dec 24 06:34:26 UTC 2003
State-Changed-Why:
Works fine when tested now and appears to have been fixed in for.c(1.11)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.