automake-patches
[Top][All Lists]
Advanced

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

qw.patch


From: Alexandre Duret-Lutz
Subject: qw.patch
Date: 03 Nov 2001 13:36:43 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Do you agree these "'" and "," characters are pollution?

--- ChangeLog
+++ ChangeLog
@@ -1,1 +1,11 @@
+2001-11-03  Alexandre Duret-Lutz  <address@hidden>
+
+       * automake.in (libtool_files, libtool_sometimes, common_files,
+       common_sometimes, config_aux_path): Use qw to simplify definition.
+       (scan_texinfo_file) <clean_suffixes, predefined_index,
+       hidden_index>: Likewise.
+       (scan_autoconf_traces) <traced>: Likewise.
+       (scan_one_autoconf_file, check_gnu_standards, resulve_linker):
+       Likewise.
+

--- /tmp/tmp.11512.1    Sat Nov  3 13:32:08 2001
+++ automake.in Sat Nov  3 13:31:48 2001
@@ -192,31 +192,24 @@
 my $DIST_CLEAN = 1;
 
 # Libtool files.
-my @libtool_files = ('ltmain.sh', 'config.guess', 'config.sub');
+my @libtool_files = qw(ltmain.sh config.guess config.sub);
 # ltconfig appears here for compatibility with old versions of libtool.
-my @libtool_sometimes = ('ltconfig', 'ltcf-c.sh', 'ltcf-cxx.sh',
-                           'ltcf-gcj.sh');
+my @libtool_sometimes = qw(ltconfig ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh);
 
 # Commonly found files we look for and automatically include in
 # DISTFILES.
 my @common_files =
-  (
-   'README', 'THANKS', 'TODO', 'NEWS', 'COPYING', 'COPYING.LIB',
-   'INSTALL', 'ABOUT-NLS', 'ChangeLog', 'configure.ac',
-   'configure.in', 'configure', 'config.guess', 'config.sub',
-   'AUTHORS', 'BACKLOG', 'ABOUT-GNU', 'libversion.in',
-   'mdate-sh', 'mkinstalldirs', 'install-sh', 'texinfo.tex',
-   'ansi2knr.c', 'ansi2knr.1', 'elisp-comp',
-   'ylwrap', 'acinclude.m4', @libtool_files, @libtool_sometimes,
-   'missing', 'depcomp', 'compile', 'py-compile'
-  );
+    (qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.LIB
+       ChangeLog INSTALL NEWS README THANKS TODO acinclude.m4
+       ansi2knr.1 ansi2knr.c compile config.guess config.sub
+       configure configure.ac configure.in depcomp elisp-comp
+       install-sh libversion.in mdate-sh missing mkinstalldirs
+       py-compile texinfo.tex ylwrap),
+    @libtool_files, @libtool_sometimes);
 
 # Commonly used files we auto-include, but only sometimes.
 my @common_sometimes =
-  (
-   'aclocal.m4', 'acconfig.h', 'config.h.top',
-   'config.h.bot', 'stamp-h.in', 'stamp-vti'
-  );
+    qw(aclocal.m4 acconfig.h config.h.top config.h.bot stamp-h.in stamp-vti);
 
 # Copyright on generated Makefile.ins.
 my $gen_copyright = "\
@@ -371,7 +364,7 @@
 
 # List of directories to search for configure-required files.  This
 # can be set by AC_CONFIG_AUX_DIR.
-my @config_aux_path = ('.', '..', '../..');
+my @config_aux_path = qw(. .. ../..);
 my $config_aux_dir = '';
 my $config_aux_dir_set_in_configure_in = 0;
 
@@ -2878,36 +2871,23 @@
     my ($filename) = @_;
 
     # These are always created, no matter whether indexes are used or not.
-    my @clean_suffixes = ('aux', 'dvi', 'log', 'ps', 'toc',
-                         # grep new.*index texinfo.tex
-                         'cp', 'fn', 'ky', 'vr', 'tp', 'pg');
+    my @clean_suffixes = qw(aux dvi log ps toc
+                           cp fn ky vr tp pg); # grep new.*index texinfo.tex
 
     # There are predefined indexes which don't follow the regular rules.
-    my %predefined_index =
-      (
-       # cindex => *.cps
-       'c' => 'cps', 'f' => 'fns', 'k' => 'kys',
-       'v' => 'vrs', 't' => 'tps', 'p' => 'pgs'
-      );
+    my %predefined_index = qw(c cps
+                             f fns
+                             k kys
+                             v vrs
+                             t tps
+                             p pgs);
 
     # There are commands which include a hidden index command.
-    my %hidden_index =
-      (
-       # deffn => *.fns.
-       'fn' => 'fns',     'un' => 'fns',
-       'typefn' => 'fns', 'typefun' => 'fns',
-       'mac' => 'fns', 'spec' => 'fns',
-       'op' => 'fns',  'typeop' => 'fns',
-       'method' => 'fns', 'typemethod' => 'fns',
-
-       'vr' => 'vrs', 'var' => 'vrs',
-       'typevr' => 'vrs', 'typevar' => 'vrs',
-       'opt' => 'vrs',
-       'cv' => 'vrs',
-       'ivar' => 'vrs', 'typeivar' => 'vrs',
-
-       'tp' => 'tps'
-      );
+    my %hidden_index = (tp => 'tps');
+    $hidden_index{$_} = 'fns' foreach qw(fn un typefn typefun max spec
+                                        op typeop method typemethod);
+    $hidden_index{$_} = 'fns' foreach qw(vr var typevr typevar opt cv
+                                        ivar typeivar);
 
     # Indexes stored into another one.  In this case, the *.??s file
     # is not created.
@@ -4393,25 +4373,23 @@
 {
   my ($filename) = @_;
 
-  my @traced = (
-               'AC_CANONICAL_HOST',
-               'AC_CANONICAL_SYSTEM',
-               'AC_CONFIG_AUX_DIR',
-               'AC_CONFIG_FILES',
-               'AC_LIBSOURCE',
-               'AC_PROG_LIBTOOL', 'AM_PROG_LIBTOOL',
-               'AC_PROG_LEX',
-               'AC_SUBST',
-               'AM_CONDITIONAL',
-               'AM_CONFIG_HEADER',
-               'AM_C_PROTOTYPES',
-               'AM_GNU_GETTEXT',
-               'AM_INIT_AUTOMAKE',
-               'AM_MAINTAINER_MODE',
-               'AM_PATH_LISPDIR',
-               'AM_PATH_PYTHON',
-               'AM_PROG_CC_C_O',
-              );
+  my @traced = qw(AC_CANONICAL_HOST
+                 AC_CANONICAL_SYSTEM
+                 AC_CONFIG_AUX_DIR
+                 AC_CONFIG_FILES
+                 AC_LIBSOURCE
+                 AC_PROG_LIBTOOL AM_PROG_LIBTOOL
+                 AC_PROG_LEX
+                 AC_SUBST
+                 AM_CONDITIONAL
+                 AM_CONFIG_HEADER
+                 AM_C_PROTOTYPES
+                 AM_GNU_GETTEXT
+                 AM_INIT_AUTOMAKE
+                 AM_MAINTAINER_MODE
+                 AM_PATH_LISPDIR
+                 AM_PATH_PYTHON
+                 AM_PROG_CC_C_O);
 
   my $traces = "$ENV{amtraces} ";
 
@@ -4719,8 +4697,7 @@
         # because not all programs will necessarily use X.
        if (/AC_PATH_XTRA/)
          {
-           foreach my $var ('X_CFLAGS', 'X_LIBS', 'X_EXTRA_LIBS',
-                            'X_PRE_LIBS')
+           foreach my $var qw(X_CFLAGS X_LIBS X_EXTRA_LIBS X_PRE_LIBS)
              {
                $configure_vars{$var} = $here;
              }
@@ -4917,9 +4894,8 @@
     if ($relative_dir eq '.')
     {
        # In top level (or only) directory.
-       require_file ('',
-                     $GNU, 'INSTALL', 'NEWS', 'README', 'COPYING',
-                     'AUTHORS', 'ChangeLog');
+       require_file ('', $GNU,
+                     qw(INSTALL NEWS README COPYING AUTHORS ChangeLog));
     }
 
     if ($strictness >= $GNU
@@ -5232,14 +5208,10 @@
 {
     my (%linkers) = @_;
 
-    return 'GCJLINK'
-       if defined $linkers{'GCJLINK'};
-    return 'CXXLINK'
-       if defined $linkers{'CXXLINK'};
-    return 'F77LINK'
-       if defined $linkers{'F77LINK'};
-    return 'OBJCLINK'
-        if defined $linkers{'OBJCLINK'};
+    foreach my $l (qw(GCJLINK CXXLINK F77LINK OBJCLINK))
+    {
+       return $l if defined $linkers{$l};
+    }
     return 'LINK';
 }
 

-- 
Alexandre Duret-Lutz



reply via email to

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