Re: gnome-build 1 line patch - fix crash when parsing complex macros
- From: John Palmieri <johnp martianrock com>
- To: John Palmieri <johnp martianrock com>
- Cc: Jeroen Zwartepoorte <jeroen xs4all nl>, Gustavo Giráldez <gustavo giraldez gmx net>, gnome-devtools gnome org
- Subject: Re: gnome-build 1 line patch - fix crash when parsing complex macros
- Date: 03 Nov 2002 22:01:48 -0500
Woops,
There was a typo when creating the patch file. Here is the correct one.
On Sun, 2002-11-03 at 21:54, John Palmieri wrote:
> This ia a patch that needs to be applied directly to AmFiles.pm.
> Actualy it might be easier to just edit the file by hand. It changes
> the regex that deals with complex macros. I was trying to load metacity
> into Anjuta2 and it would always crash. Turns out the src/Makefile.am
> was causing it because it included two complex macro replacements on the
> same line:
>
> desktopfiles_DATA = $(desktopfiles_in_files:.desktop.in=.desktop)
> schema_DATA = $(schema_in_files:.schemas.in=.schemas)
> EXTRA_DIST=$(desktopfiles_DATA) $(IMAGES) $(schema_DATA) ...
>
> What would happen is when the parser got to the EXTRA_DIST line the
> regex was set up to look for the '$(' read any characters until it
> reached the LAST ')' -- (.*)\) I simply changed the regex to read any
> character except the ')' -- (.*!\))\)
>
> This seems to work as I don't crash anymore but I have not idea if the
> output is correct (though everything seems to be in order).
>
> The patch is attached.
>
> --
> J5
> ----
>
--- AmFiles.pm Sun Nov 3 21:58:12 2002
+++ AmFiles.pm.new Sun Nov 3 21:58:40 2002
@@ -934,7 +934,7 @@
}
# Expand substitution macros $(macro:search=replace)
- while ($source =~ /\$\((\w*):(.+)=(.*)\)/) {
+ while ($source =~ /\$\((\w*):(.+)=(.*!\))\)/) {
$var_name = $1;
my ($search, $replace) = ($2, $3);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]