[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Again error with graphics.h
From: |
David Bateman |
Subject: |
Re: Again error with graphics.h |
Date: |
Tue, 27 May 2008 13:37:34 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080306) |
David Bateman wrote:
> Andrea Spadaccini wrote:
>
>> 2008/5/27 Jaroslav Hajek <address@hidden>:
>>
>>
>>>> $ cd src
>>>> $ make graphics.h
>>>>
>>>>
>>> is graphics.h created after this command?
>>> Building graphics.h requires awk. Do you have awk installed? Is it set
>>> properly in the Makeconf file?
>>>
>> You are right, it is not created! I thought that I had read that it
>> was correctly created.
>> I've got AWK.
>>
>> Here's the error:
>> address@hidden:~/octave-hg/octave/src$ make graphics.h
>> making defaults.h from defaults.h.in
>> defaults.h is unchanged
>> making graphics.h
>> mawk: ./genprops.awk: line 413: syntax error at or near ,
>> mawk: ./genprops.awk: line 439: syntax error at or near ,
>>
>> Thanks,
>>
>>
>
>
> Lines 413 and 439 correspond to the only lines in genprops.awk that call
> the gensub function. gensub is a gawk extension to awk and so in fact
> you don't just need awk but rather gawk.. Perhaps we should either test
> for this in teh configure or remove the use of gensub from genprops.awk
>
> D.
>
>
>
In fact the change is fairly easy, just replace
dval = gensub (/^.*\{(.*)\}.*$/, "\"\\1\"", "g", dval);
with
gsub (^.*\{(.*)\}.*$/, "\"\\1\"", dval);
at line 413 and
class_name = gensub (/^.*BEGIN_PROPERTIES\((.*)\)/, "\\1", "g");
with
class_name = $0;
gsub (/^.*BEGIN_PROPERTIES\((.*)\)/, "\\1", class_name);
at line 439. I believe gsub is compatible with awk.
D.