From owner-freebsd-hackers Sun Sep 15 15:20:09 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA18285 for hackers-outgoing; Sun, 15 Sep 1996 15:20:09 -0700 (PDT) Received: from fly.HiWAAY.net (root@fly.HiWAAY.net [204.214.4.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA18265; Sun, 15 Sep 1996 15:20:06 -0700 (PDT) Received: from bonsai.hiwaay.net by fly.HiWAAY.net; (8.7.5/1.1.8.2/21Sep95-1003PM) id RAA16764; Sun, 15 Sep 1996 17:19:58 -0500 (CDT) Message-ID: <323C80C0.59E2B600@hiwaay.net> Date: Sun, 15 Sep 1996 17:18:40 -0500 From: Steve Price X-Mailer: Mozilla 2.02 (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: archie@whistle.com CC: hackers@freebsd.org, FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/1230: make ``.for'' loops iterate backwards Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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++)