automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [revised patch 1/1] support AC_SUBST'able automake rules


From: Lars J. Aas
Subject: Re: [revised patch 1/1] support AC_SUBST'able automake rules
Date: Wed, 31 Jan 2001 17:02:06 +0100
User-agent: Mutt/1.2.5i

I've revised the patch to include the latest changes from CVS Autoconf,
which made the complate patch somewhat simpler than before.  I even corrected
the changelog date :)

2001-01-31  Lars J. Aas  <address@hidden>

        * automake.in ($CANONICALS): New variable containing the character
        ranges allowed in canonical names, using it where appropriate.
        ($MACRO_PATTERN, $CANONICALS): Allow '@'s in automake macro names.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.843
diff -u -r1.843 automake.in
--- automake.in 2001/01/31 14:36:21     1.843
+++ automake.in 2001/01/31 15:55:57
@@ -46,7 +46,7 @@
 # Only recognize leading spaces, not leading tabs.  If we recognize
 # leading tabs here then we need to make the reader smarter, because
 # otherwise it will think rules like `foo=bar; \' are errors.
-$MACRO_PATTERN = "^ *([A-Za-z0-9_]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
+$MACRO_PATTERN = "^ *(address@hidden)[ \t]*([:+]?)=[ \t]*(.*)\$";
 $BOGUS_MACRO_PATTERN = "^ *([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$";
 $GNITS_VERSION_PATTERN = "[0-9]+\\.[0-9]+([a-z]|\\.[0-9]+)?";
 $IF_PATTERN = "^if[ \t]+\([A-Za-z][A-Za-z0-9_]*\)[ \t]*\(#.*\)?\$";
@@ -55,6 +55,7 @@
 $PATH_PATTERN='(\\w|[/.-])+';
 # This will pass through anything not of the prescribed form.
 $INCLUDE_PATTERN = "^include[ 
\t]+((\\\$\\\(top_srcdir\\\)/${PATH_PATTERN})|(\\\$\\\(srcdir\\\)/${PATH_PATTERN})|([^/\\\$]${PATH_PATTERN}))[
 \t]*(#.*)?\$";
+$CANONICALS = "A-Za-z0-9_\@";
 
 # Some regular expressions.  One reason to put them here is that it
 # makes indentation work better in Emacs.
@@ -1717,7 +1718,7 @@
     local ($name, @suffixes) = @_;
     local ($xname, $xt);
 
-    ($xname = $name) =~ tr/A-Za-z0-9_/_/c;
+    ($xname = $name) =~ s/[^$CANONICALS]/_/og;
     if ($xname ne $name)
     {
        local ($xt);
@@ -1849,7 +1850,7 @@
        foreach $one_file (@proglist)
        {
            # Canonicalize names.
-           ($xname = $one_file) =~ tr/A-Za-z0-9_/_/c;
+           ($xname = $one_file) =~ s/[^$CANONICALS]/_/og;
 
            if (&variable_defined ($xname . '_LDADD'))
            {
@@ -1953,7 +1954,7 @@
        foreach $onelib (@liblist)
        {
            # Canonicalize names.
-           ($xlib = $onelib) =~ tr/A-Za-z0-9_/_/c;
+           ($xlib = $onelib) =~ s/[^$CANONICALS]/_/og;
            if (&variable_defined ($xlib . '_LIBADD'))
            {
                &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
@@ -2114,7 +2115,7 @@
        foreach $onelib (@liblist)
        {
            # Canonicalize names.
-           ($xlib = $onelib) =~ tr/A-Za-z0-9_/_/c;
+           ($xlib = $onelib) =~ s/[^$CANONICALS]/_/og;
            if (&variable_defined ($xlib . '_LIBADD'))
            {
                &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
@@ -2318,7 +2319,7 @@
        push (@texi_deps, '$(srcdir)/' . $vtexi) if $vtexi;
 
        # Canonicalize name first.
-       ($canonical = $infobase) =~ tr/A-Za-z0-9_/_/c;
+       ($canonical = $infobase) =~ s/[^$CANONICALS]/_/og;
        if (&variable_defined ($canonical . "_TEXINFOS"))
        {
            push (@texi_deps, '$(' . $canonical . '_TEXINFOS)');



reply via email to

[Prev in Thread] Current Thread [Next in Thread]