From owner-freebsd-doc@FreeBSD.ORG Sat Apr 10 09:33:34 2004 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D493916A4CE; Sat, 10 Apr 2004 09:33:34 -0700 (PDT) Received: from wonkity.com (wonkity.com [65.173.111.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5475343D39; Sat, 10 Apr 2004 09:33:34 -0700 (PDT) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.12.11/8.12.11) with ESMTP id i3AGXVp1094367; Sat, 10 Apr 2004 10:33:31 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.12.11/8.12.11/Submit) with ESMTP id i3AGXV8A094364; Sat, 10 Apr 2004 10:33:31 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 10 Apr 2004 10:33:30 -0600 (MDT) From: Warren Block To: Roman Neuhauser In-Reply-To: <20040410150252.345D32FDA01@isis.wad.cz> Message-ID: <20040410101550.E94328@wonkity.com> References: <20040410150252.345D32FDA01@isis.wad.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-doc@freebsd.org cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: docs/65400: make.1: better wording in BUGS section X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 16:33:35 -0000 On Sat, 10 Apr 2004, Roman Neuhauser wrote: > >Description: > the make manual page says: > > For loops are expanded before tests, so a fragment such as: > > .for TMACHINE in ${SHARED_ARCHS} > .if ${TMACHINE} = ${MACHINE} > ... > .endif > .endfor > won't work, and should be rewritten the other way around. > > This formulation isn't as clear as it could be, it sounds like the > loop should be inside the condition. I know it confused me when > I was trying to learn make, and recently saw someone else's post > about the same thing on one of the lists. > X-won't work, and should be rewritten the other way around. > X+won't work, and should be rewritten with the operands swapped. It's still not very clear (arguments to the .for or the .if?). Beyond that, "won't work" is just the sort of thing that most of us hate because it doesn't provide any details. Best is to show the right way in the first place, with a note about why other ways will fail. The preceding paragraph is not good, either: "The evaluation of expression in a test is very simple-minded. Currently, the only form that works is `.if ${VAR} op something' For instance, you should write tests as `.if ${VAR} = string' not the other way around, which doesn't work." I can't tell if this applies to the .for/.if paragraph, which has ".if ${VAR} = ${VAR}". -Warren Block * Rapid City, South Dakota USA