Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Mar 2005 04:13:04 -0800
From:      Max Okumoto <okumoto@ucsd.edu>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Harti Brandt <harti@FreeBSD.org>
Subject:   Re: [Fwd: docs breaking my make release]
Message-ID:  <42494650.7040304@ucsd.edu>
In-Reply-To: <hfr7hy3o9w.fsf@multivac.sdsc.edu>
References:  <424565A9.1050500@dlr.de> <hfis3e3w4d.fsf@multivac.sdsc.edu> <20050326220758.GA95760@gothmog.gr> <hf8y484y1e.fsf@multivac.sdsc.edu> <20050328091231.GA1556@orion.daedalusnetworks.priv> <hfr7hy3o9w.fsf@multivac.sdsc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <keramida@ceid.upatras.gr> 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 <okumoto@ucsd.edu> 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 <keramida@ceid.upatras.gr> 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 <okumoto@ucsd.edu> wrote:
>>>>
>>>>>John, what version of usr.bin/make/var.c is being compiled?
>>>>>
>>>>>Hartmut Brandt <hartmut.brandt@dlr.de> writes:
>>>>>
>>>>>>Hi  Max,
>>>>>>
>>>>>>could you please look at this? I'm back on wednesday.
>>>>>>
>>>>>>harti
>>>>>>From: John Baldwin <jhb@FreeBSD.org>
>>>>>>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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42494650.7040304>