Apache OpenOffice (AOO) Bugzilla – Issue 50053
dmake 4.4 fails to read recipe to its end
Last modified: 2013-08-07 15:34:52 UTC
Found with cws dmake43p01 when building moz: ============= Building project moz ============= /cygdrive/d/w1/SRC680_m106/moz mkout -- version: 1.4 dmake: extractfiles.mk: line 233: Error: -- Expecting macro or rule defn, found neither
This makefile triggers the problem: --- snip --- .NOTABS !:= yes aaa : echo bbb --- snap --- Just do: $ dmake/dmake -r -f mymakefile.mk And if you replace the <tab> in front of "echo bbb" with some spaces it also triggers without the ".NOTABS !:= yes".
Created attachment 26721 [details] Patch to correctly parse empty lines
Committed to cws dmake43p01
Please verify.
I managed to miss an important negation. - if( *Buffer || *DmStrSpn( Buffer, " \t\r\n" ) == '\0' ) break; + if( !*Buffer || *DmStrSpn( Buffer, " \t\r\n" ) == '\0' ) break; This way it silently discarded everything after an empty line. Surprisingly enough OOo build to the end with this bug! Fixed in cws.
And another one. +++ dmake/parse.c 1 Jun 2005 02:10:27 -0000 @@ -107,8 +107,9 @@ } else if( *p == ']' ) Fatal( "Found unmatched ']'" ); - else if( (*pTmpBuf && *p) || (Notabs && !*pTmpBuf && !*p)) + else if( *pTmpBuf ) /* Something that was no recipe. */ State = NORMAL_SCAN; + /* The only thing that was not handled was an empty line. */ } if( State == RULE_SCAN ) break; /* ie. keep going */ *pTmpBuf was never "" for the old dmake, therefore the Notabs == true case never triggered before. This check was completely bogus. Committed to the cws. The simple makefile now works as expected.
.