From owner-freebsd-bugs Sun Sep 15 15:30:05 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA18944 for bugs-outgoing; Sun, 15 Sep 1996 15:30:05 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA18935; Sun, 15 Sep 1996 15:30:03 -0700 (PDT) Date: Sun, 15 Sep 1996 15:30:03 -0700 (PDT) Message-Id: <199609152230.PAA18935@freefall.freebsd.org> To: freebsd-bugs Cc: From: Steve Price Subject: Re: bin/1230: make ``.for'' loops iterate backwards Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Reply-To: Steve Price The following reply was made to PR bin/1230; it has been noted by GNATS. From: Steve Price To: archie@whistle.com Cc: hackers@freebsd.org, FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/1230: make ``.for'' loops iterate backwards Date: Sun, 15 Sep 1996 17:18:40 -0500 Attached is patch that fixes the problem pointed out in bin/1230. steve[~]$ cat Makefile ORIG= a b c .for VAR in a b c LIST+= ${VAR} .endfor default: @echo ${LIST} ^D steve[~]$ make a b c steve[~]$ Regards, Steve Index: for.c =================================================================== RCS file: /u/FreeBSD/cvs/src/usr.bin/make/for.c,v retrieving revision 1.3 diff -u -r1.3 for.c --- for.c 1995/05/30 06:31:52 1.3 +++ for.c 1996/09/14 00:26:03 @@ -174,7 +174,7 @@ #define ADDWORD() \ Buf_AddBytes(buf, ptr - wrd, (Byte *) wrd), \ Buf_AddByte(buf, (Byte) '\0'), \ - Lst_AtEnd(forLst, (ClientData) Buf_GetAll(buf, &varlen)), \ + Lst_AtFront(forLst, (ClientData) Buf_GetAll(buf, &varlen)), \ Buf_Destroy(buf, FALSE) for (ptr = sub; *ptr && isspace((unsigned char) *ptr); ptr++)