From: Akim Demaille Date: Mon, 29 Jan 2001 09:27:18 +0000 (+0000) Subject: * automake.in (handle_tags): Use &transform. X-Git-Tag: Release-1-4d~80 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=45a7e04f79b8ad0d6c2792093d3b335fef7067e0;p=automake.git * automake.in (handle_tags): Use &transform. (am_error, am_line_error, am_conf_error, read_am_file): Use directly arrays in strings, no need for &join. Require Perl 5. * Makefile.am (maintainer-check): Use grep -w when looking for words. --- diff --git a/ChangeLog b/ChangeLog index b7131b7c..fe160d09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-01-29 Akim Demaille + + * automake.in (handle_tags): Use &transform. + (am_error, am_line_error, am_conf_error, read_am_file): Use + directly arrays in strings, no need for &join. + Require Perl 5. + * Makefile.am (maintainer-check): Use grep -w when looking for + words. + 2001-01-29 Akim Demaille * automake.in (prog_error): New. @@ -13,26 +22,22 @@ * automake.in (define_standard_variables): Use &transform instead of build_rx. - 2001-01-29 Akim Demaille * automake.in (handle_texinfo): Use the new $texinfodir instead of the removed $texinfo_tex. - 2001-01-29 Akim Demaille * automake.in (handle_libraries, handle_ltlibraries): Use &transform. - 2001-01-29 Akim Demaille * automake.in (handle_programs) : Remove, replaced by `exeext'. Use it, and &transform. - 2001-01-29 Akim Demaille * automake.in (get_object_extension) <$default_includes>: New. diff --git a/Makefile.am b/Makefile.am index f3d2544b..15e84672 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,7 +96,7 @@ maintainer-check: automake aclocal perl4.036 -c -w aclocal; \ else :; fi ## We never want to use "undef", only "delete". - @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \ + @if grep -w undef $(srcdir)/automake.in > /dev/null 2>&1; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ exit 1; \ fi diff --git a/Makefile.in b/Makefile.in index a4cf295d..9b110d30 100644 --- a/Makefile.in +++ b/Makefile.in @@ -664,7 +664,7 @@ maintainer-check: automake aclocal perl4.036 -c -w automake; \ perl4.036 -c -w aclocal; \ else :; fi - @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \ + @if grep -w undef $(srcdir)/automake.in > /dev/null 2>&1; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ exit 1; \ fi diff --git a/automake.in b/automake.in index b3c66260..df041cac 100755 --- a/automake.in +++ b/automake.in @@ -27,6 +27,7 @@ eval 'exec @PERL@ -S $0 ${1+"$@"}' # Originally written by David Mackenzie . # Perl reimplementation by Tom Tromey . +require 5; # Parameters set by configure. Not to be changed. NOTE: assign # VERSION as string so that eg version 0.30 will print correctly. @@ -2569,21 +2570,19 @@ sub handle_tags || &variable_defined ('ETAGS_ARGS') || @tag_deps) { - local ($xform) = ''; + local ($config) = ''; local ($one_hdr); foreach $one_hdr (@config_headers) { if ($relative_dir eq &dirname ($one_hdr)) { # The config header is in this directory. So require it. - local ($var); - ($var = &basename ($one_hdr)) =~ s/(\W)/\\$1/g; - $xform .= ' ' if $xform; - $xform .= $var; + $config .= ' ' if $config; + $config .= &basename ($one_hdr); } } - $xform = ('s/\@CONFIG\@/' . $xform . '/;' - . 's/\@DIRS\@/' . join (' ', @tag_deps) . '/;'); + local $xform = &transform ('CONFIG' => $xform, + 'DIRS' => join (' ', @tag_deps)); if (&variable_defined ('SUBDIRS')) { @@ -6523,7 +6522,7 @@ sub read_am_file { if (@conditional_stack) { - &am_error ("unterminated conditionals: " . join (' ', @conditional_stack)); + &am_error ("unterminated conditionals: @conditional_stack"); } else { @@ -7831,7 +7830,7 @@ sub my_glob # Print an error message and set exit status. sub am_error { - warn "automake: ${am_file}.am: ", join (' ', @_), "\n"; + warn "automake: ${am_file}.am: @_\n"; $exit_status = 1; } @@ -7864,7 +7863,7 @@ sub am_line_error { # Couldn't find the line number. } - warn $file, ": ", join (' ', @args), "\n"; + warn $file, ": @args\n"; $exit_status = 1; } else @@ -7877,7 +7876,7 @@ sub am_line_error sub am_conf_error { # FIXME: can run in subdirs. - warn "automake: $configure_ac: ", join (' ', @_), "\n"; + warn "automake: $configure_ac: @_\n"; $exit_status = 1; } @@ -7888,7 +7887,7 @@ sub am_conf_line_error if ($line) { - warn "$file: $line: ", join (' ', @args), "\n"; + warn "$file: $line: @args\n"; $exit_status = 1; } else diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index f3d2544b..15e84672 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -96,7 +96,7 @@ maintainer-check: automake aclocal perl4.036 -c -w aclocal; \ else :; fi ## We never want to use "undef", only "delete". - @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \ + @if grep -w undef $(srcdir)/automake.in > /dev/null 2>&1; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ exit 1; \ fi