This patch makes it possible to have AC_SUBST keywords in for instance library names, allowing for much greater flexibility. It depends on patch 1/2, of course. 2001-02-01 Lars J. Aas <[EMAIL PROTECTED]> * automake.in ($quote_ats): New. ($MACRO_PATTERN, $CANONICALS): Allow '@'s in automake macro names. (&am_install_var): Use "e_ats to escape '@'s in transform rules given to &file_contents_with_transform. --- automake.in Mon Jan 29 21:17:31 2001 +++ automake.in Wed Jan 31 03:51:41 2001 @@ -45,7 +45,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 = "^ *([A-Za-z0-9_\@]+)[ \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]*\(#.*\)?\$"; @@ -54,7 +54,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_"; +$CANONICALS = "A-Za-z0-9_\@"; # Some regular expressions. One reason to put them here is that it # makes indentation work better in Emacs. @@ -5626,6 +5627,15 @@ return $val; } +# Quote 'at' (@) instances with backslash escapes so they don't evaluate as +# arrays. +sub quote_ats +{ + local ($val) = @_; + $val =~ s/\@/\\\@/og; + return $val; +} + # Return the set of conditions for which a variable is defined. # If the variable is not defined conditionally, and is not defined in @@ -7435,11 +7445,11 @@ } $output_rules .= - &file_contents_with_transform ('s/\@DIR\@/' . $X . '/g;' - . 's/\@NDIR\@/' . $nodir_name . '/go;' - . $ltxform . $cygxform - . $subdir_xform, - $file); + &file_contents_with_transform ( + "e_ats ('s/@DIR@/' . $X . '/g;' + . 's/@NDIR@/' . $nodir_name . '/go;' + . $ltxform . $cygxform . $subdir_xform), + $file); push (@uninstall, 'uninstall-' . $X . $primary); push (@phony, 'uninstall-' . $X . $primary);