]> sourceware.org Git - automake.git/commitdiff
* automake.in (&transform): Fix an incredible bug which was
authorAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 10:07:16 +0000 (10:07 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 10:07:16 +0000 (10:07 +0000)
breaking the if/endif system.
($ELSE_PATTERN): Admit an optional argument.

ChangeLog
automake.in

index b17dfc5e855c1c39ac79c454f078beae3a814612..3b588677bd8eb52d73f7ac0f46dd176ea6250cd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-09  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&transform): Fix an incredible bug which was
+       breaking the if/endif system.
+       ($ELSE_PATTERN): Admit an optional argument.
+
 2001-04-09  Akim Demaille  <akim@epita.fr>
 
        * comp-vars.am: Remove, merged into...
index 89a3fcb98c91d57658e901d63bc65670fa2f584f..12b502bc43254e605f93c2455fa6ed27a1b5d1a9 100755 (executable)
@@ -60,7 +60,7 @@ my $MACRO_PATTERN = "^ *([A-Za-z0-9_\@]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
 my $BOGUS_MACRO_PATTERN = "^ *([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$";
 my $GNITS_VERSION_PATTERN = "[0-9]+\\.[0-9]+([a-z]|\\.[0-9]+)?";
 my $IF_PATTERN = "^if[ \t]+([A-Za-z][A-Za-z0-9_]*)[ \t]*(#.*)?\$";
-my $ELSE_PATTERN = "^else[ \t]*(#.*)?\$";
+my $ELSE_PATTERN =   "^else(?:[ \t]+([A-Za-z][A-Za-z0-9_]*))?[ \t]*(#.*)?\$";
 my $ENDIF_PATTERN = "^endif(?:[ \t]+([A-Za-z][A-Za-z0-9_]*))?[ \t]*(#.*)?\$";
 my $PATH_PATTERN='(\\w|[/.-])+';
 # This will pass through anything not of the prescribed form.
@@ -6949,12 +6949,12 @@ sub transform (%)
        if ($val)
        {
            $result .= "s/\Q?$token?\E//gm;s/^.*\Q?!$token?\E.*\\n//gm;";
-           $result .= "s/\Q%?$token%\E/TRUE/gm;s/^.*\Q%!$token%\E.*\\n/FALSE/gm;";
+           $result .= "s/\Q%?$token%\E/TRUE/gm;s/\Q%!$token%\E/FALSE/gm;";
        }
        else
        {
            $result .= "s/\Q?!$token?\E//gm;s/^.*\Q?$token?\E.*\\n//gm;";
-           $result .= "s/\Q%?$token%\E/FALSE/gm;s/^.*\Q%!$token%\E.*\\n/TRUE/gm;";
+           $result .= "s/\Q%?$token%\E/FALSE/gm;s/\Q%!$token%\E/TRUE/gm;";
        }
     }
 
This page took 0.049366 seconds and 5 git commands to generate.