From owner-freebsd-doc@FreeBSD.ORG Tue Mar 29 12:13:11 2005 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 A543516A4CE; Tue, 29 Mar 2005 12:13:11 +0000 (GMT) Received: from mailbox4.ucsd.edu (mailbox4.ucsd.edu [132.239.1.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4819643D1D; Tue, 29 Mar 2005 12:13:11 +0000 (GMT) (envelope-from okumoto@ucsd.edu) Received: from smtp.ucsd.edu (smtp-a.ucsd.edu [132.239.1.49]) by mailbox4.ucsd.edu (8.13.1/8.13.1) with ESMTP id j2TCD53r047715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Mar 2005 04:13:06 -0800 (PST) Received: from ucsd.edu (adsl-63-199-247-178.dsl.sndg02.pacbell.net [63.199.247.178]) by smtp.ucsd.edu (8.12.10/8.9.3) with ESMTP id j2TCD4Tg011799; Tue, 29 Mar 2005 04:13:04 -0800 (PST) Message-ID: <42494650.7040304@ucsd.edu> Date: Tue, 29 Mar 2005 04:13:04 -0800 From: Max Okumoto User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <424565A9.1050500@dlr.de> <20050326220758.GA95760@gothmog.gr> <20050328091231.GA1556@orion.daedalusnetworks.priv> In-Reply-To: Content-Type: multipart/mixed; boundary="------------000308050601060306030401" X-Greylisting: NO DELAY (Trusted relay host); processed by UCSD_GL-v1.2 on mailbox4.ucsd.edu; Tue, 29 March 2005 04:13:06 -0800 (PST) X-MailScanner: PASSED (v1.2.8 44414 j2TCD53r047715 mailbox4.ucsd.edu) cc: Giorgos Keramidas cc: freebsd-doc@FreeBSD.org cc: Harti Brandt Subject: Re: [Fwd: docs breaking my make release] 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: Tue, 29 Mar 2005 12:13:11 -0000 This is a multi-part message in MIME format. --------------000308050601060306030401 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ok here is a patch that fixes make. The mistake was that ParseModifier() consumes characters so it can not be moved below the following tests. Can people test this? If it is ok, I will ask harti to check it in when he gets back. Max Okumoto Max Okumoto wrote: > Ok I found the commit when I broke make. It's is on > Date: 2005/03/21 12:17:44 > > Will see how I broke it. :-P > > Max > > Giorgos Keramidas writes: > > >>At work, where I am right now, I have an older version of make (with >>revision 1.122 of var.c). I'll update my workstation to the latest >>CURRENT and try to reproduce this with something minimal and out of the >>/doc tree. >> >> % cat -n Makefile >> >>On 2005-03-27 12:46, Max Okumoto wrote: >> >>>Hmmm.. Do you do have a small test case? I haven't built >>>the doc tree before. Can you point me at the directory and >>>the command to build it? My current test cases do not >>>find this problem. >>> >>>Giorgos Keramidas writes: >>> >>>>I'm using a make with revision 1.142 of var.c here. >>>>It's the last one committed, AFAICT. >>>> >>>>On 2005-03-26 14:01, Max Okumoto wrote: >>>> >>>>>John, what version of usr.bin/make/var.c is being compiled? >>>>> >>>>>Hartmut Brandt writes: >>>>> >>>>>>Hi Max, >>>>>> >>>>>>could you please look at this? I'm back on wednesday. >>>>>> >>>>>>harti >>>>>>From: John Baldwin >>>>>>Subject: docs breaking my make release >>>>>>To: doc@FreeBSD.org >>>>>>Cc: harti@FreeBSD.org >>>>>>Date: Fri, 25 Mar 2005 14:09:59 -0500 >>>>>> >>>>>>I'm trying to build a release with docs for some more ISO layout tweaks, but >>>>>>the doc build keeps failing. Any ideas? >>>>>> >>>>>>===> en_US.ISO8859-1/articles/checkpoint (all) >>>>>>Unclosed substitution for @ (/ missing) >>>>>>*** Error code 2 > > _______________________________________________ > freebsd-doc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-doc > To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org" > --------------000308050601060306030401 Content-Type: text/plain; name="patch-7.170" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-7.170" --- var.c 2005/03/22 12:38:55 1.142 +++ var.c 2005/03/29 11:58:50 @@ -1304,8 +1304,20 @@ } if ((vp->ctxt == VAR_CMD) || (vp->ctxt == VAR_GLOBAL)) { - size_t consumed = vp->ptr - vp->input + 1; + size_t consumed; + /* + * Still need to get to the end of the variable + * specification, so kludge up a Var structure for the + * modifications + */ + v = VarCreate(vname, NULL, VAR_JUNK); + value = ParseModifier(vp, startc, v, freeResult); + if (*freeResult) { + free(value); + } + VarDestroy(v, TRUE); + consumed = vp->ptr - vp->input + 1; /* * If substituting a local variable in a non-local context, * assume it's for dynamic source stuff. We have to handle @@ -1341,6 +1353,9 @@ return (value); } } + + *freeResult = FALSE; + return (vp->err ? var_Error : varNoError); } else { /* * Check for D and F forms of local variables since we're in @@ -1360,22 +1375,22 @@ return (value); } } - } - /* - * Still need to get to the end of the variable - * specification, so kludge up a Var structure for the - * modifications - */ - v = VarCreate(vname, NULL, VAR_JUNK); - value = ParseModifier(vp, startc, v, freeResult); - if (*freeResult) { - free(value); - } - VarDestroy(v, TRUE); + /* + * Still need to get to the end of the variable + * specification, so kludge up a Var structure for the + * modifications + */ + v = VarCreate(vname, NULL, VAR_JUNK); + value = ParseModifier(vp, startc, v, freeResult); + if (*freeResult) { + free(value); + } + VarDestroy(v, TRUE); - *freeResult = FALSE; - return (vp->err ? var_Error : varNoError); + *freeResult = FALSE; + return (vp->err ? var_Error : varNoError); + } } static char * --------------000308050601060306030401--