From: Akim Demaille Date: Fri, 23 Mar 2001 16:54:42 +0000 (+0000) Subject: * automake.in (IF_PATTERN): Unobfuscate the parens. X-Git-Tag: handle-languages~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7157905d7d45415a8895135867995bb376749c2;p=thirdparty%2Fautomake.git * automake.in (IF_PATTERN): Unobfuscate the parens. (ENDIF_PATTERN): Allow a condition to be specified. (&file_contents): Use a @cond_stack. (&transform): At least for an easy transition, also transform %?FOO% and %!FOO%, as suggested by Lars. * scripts.am: First test bed for static if/endif use. --- diff --git a/ChangeLog b/ChangeLog index 3f594dfc6..e19200e09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-03-23 Akim Demaille + + * automake.in (IF_PATTERN): Unobfuscate the parens. + (ENDIF_PATTERN): Allow a condition to be specified. + (&file_contents): Use a @cond_stack. + (&transform): At least for an easy transition, also transform + %?FOO% and %!FOO%, as suggested by Lars. + * scripts.am: First test bed for static if/endif use. + 2001-03-23 Akim Demaille * automake.in (&file_contents): Use rule_define. diff --git a/automake.in b/automake.in index 4980f1921..a538b490a 100755 --- a/automake.in +++ b/automake.in @@ -59,9 +59,9 @@ my $SUFFIX_RULE_PATTERN = "^\\.([a-zA-Z0-9]+)\\.([a-zA-Z0-9]+)\$"; 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 $ENDIF_PATTERN = "^endif[ \t]*\(#.*\)?\$"; +my $IF_PATTERN = "^if[ \t]+([A-Za-z][A-Za-z0-9_]*)[ \t]*(#.*)?\$"; +my $ELSE_PATTERN = "^else[ \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. my $INCLUDE_PATTERN = "^include[ \t]+((\\\$\\\(top_srcdir\\\)/${PATH_PATTERN})|(\\\$\\\(srcdir\\\)/${PATH_PATTERN})|([^/\\\$]${PATH_PATTERN}))[ \t]*(#.*)?\$"; @@ -6739,6 +6739,7 @@ sub file_contents ($%) my $result_rules = ''; my $comment = ''; my $separator = ''; + my @cond_stack = (); foreach (split (/(?