From 5a93885127c677bec55ec0fdbdbdf088d447dbd3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 27 Apr 1999 15:15:57 +0000 Subject: [PATCH] * automake.in (MACRO_PATTERN): Allow digits and `_' to start a macro name. (check_canonical_spelling): Don't insert `AM' before macro name (reverts Alexandre's 1999-04-27 patch). * automake.texi: Reverted documentation change for `AM' patch. --- ChangeLog | 6 ++++++ automake.in | 3 +-- automake.texi | 10 ---------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c600815e..0f78fcaa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-04-27 Tom Tromey + * automake.in (MACRO_PATTERN): Allow digits and `_' to start a + macro name. + (check_canonical_spelling): Don't insert `AM' before macro name + (reverts Alexandre's 1999-04-27 patch). + * automake.texi: Reverted documentation change for `AM' patch. + * automake.in (handle_lib_objects_cond): Prefer `$1' over `\1'. Minor rewrite for clarity. (check_canonical_spelling): Prefer `$1' over `\1'. diff --git a/automake.in b/automake.in index a00c493b3..f88ec3244 100755 --- a/automake.in +++ b/automake.in @@ -40,7 +40,7 @@ $WHITE_PATTERN = "^[ \t]*\$"; $COMMENT_PATTERN = "^#"; $RULE_PATTERN = "^([\$a-zA-Z_.][-.a-zA-Z0-9_(){}/\$]*) *:([^=].*|)\$"; $SUFFIX_RULE_PATTERN = "^\\.([a-zA-Z]+)\\.([a-zA-Z]+)\$"; -$MACRO_PATTERN = "^([A-Za-z][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]*\(#.*\)?\$"; @@ -1676,7 +1676,6 @@ sub check_canonical_spelling local ($xname, $xt); ($xname = $name) =~ tr/A-Za-z0-9_/_/c; - $xname =~ s/^([0-9_])/AM$1/; if ($xname ne $name) { local ($xt); diff --git a/automake.texi b/automake.texi index 768e50c77..fd1d50c0d 100644 --- a/automake.texi +++ b/automake.texi @@ -502,16 +502,6 @@ when making macro references. For example, if your program is named @code{sniff-glue}, the derived variable name would be @code{sniff_glue_SOURCES}, not @code{sniff-glue_SOURCES}. -Additionally, because some versions of make require macro names to start -with a @emph{letter}, when a name that starts with a non-letter -character is canonicalized, the characters @code{AM} are prepended to -it. Therefore, if a program is named @code{123test} or @code{_foo}, the -derived variable names would be @code{AM123test_SOURCES} or -@code{AM_foo_SOURCES}. Note that, even if such a program name would not -appear in the beginning of the name of the macro, @code{AM} is still -inserted, i.e., use @code{EXTRA_AM123test_SOURCES}, not -@code{EXTRA_123test_SOURCES}. - @node Examples, Invoking Automake, Generalities, Top @chapter Some example packages -- 2.47.2