]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 16 Feb 2013 18:39:07 +0000 (19:39 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 16 Feb 2013 18:39:07 +0000 (19:39 +0100)
* maint:
  style: call perl functions 'like_this()', not '&like_this()'
  maint: use more perl subroutines prototypes in the automake script
  build: auto-generate perl subroutines prototypes for automake and aclocal
  refactor: rip module Automake::Language out of automake script

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
1  2 
Makefile.am
aclocal.in
automake.in
bootstrap.sh
maintainer/syntax-checks.mk

diff --cc Makefile.am
Simple merge
diff --cc aclocal.in
Simple merge
diff --cc automake.in
index 70214e45e2eb94e97463d79bbeba447ee4b90e8f,d4c25c4c00aef1054e05ed69fb53b4889242606b..02c6d413809346738b01fa0b84f1661ff0886a87
@@@ -32,95 -34,17 +34,8 @@@ BEGI
    @Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
      unless @Automake::perl_libdirs;
    unshift @INC, @Automake::perl_libdirs;
 -
 -  # Override SHELL.  This is required on DJGPP so that system() uses
 -  # bash, not COMMAND.COM which doesn't quote arguments properly.
 -  # Other systems aren't expected to use $SHELL when Automake
 -  # runs, but it should be safe to drop the "if DJGPP" guard if
 -  # it turns up other systems need the same thing.  After all,
 -  # if SHELL is used, ./configure's SHELL is always better than
 -  # the user's SHELL (which may be something like tcsh).
 -  $ENV{'SHELL'} = '@SHELL@' if exists $ENV{'DJDIR'};
  }
  
- use Class::Struct ();
- Class::Struct::struct (
-       # Short name of the language (c, f77...).
-       'name' => "\$",
-       # Nice name of the language (C, Fortran 77...).
-       'Name' => "\$",
-       # List of configure variables which must be defined.
-       'config_vars' => '@',
-       # 'pure' is '1' or ''.  A 'pure' language is one where, if
-       # all the files in a directory are of that language, then we
-       # do not require the C compiler or any code to call it.
-       'pure'   => "\$",
-       'autodep' => "\$",
-       # Name of the compiling variable (COMPILE).
-       'compiler'  => "\$",
-       # Content of the compiling variable.
-       'compile'  => "\$",
-       # Flag to require compilation without linking (-c).
-       'compile_flag' => "\$",
-       'extensions' => '@',
-       # A subroutine to compute a list of possible extensions of
-       # the product given the input extensions.
-       # (defaults to a subroutine which returns ('.$(OBJEXT)', '.lo'))
-       'output_extensions' => "\$",
-       # A list of flag variables used in 'compile'.
-       # (defaults to [])
-       'flags' => "@",
-       # Any tag to pass to libtool while compiling.
-       'libtool_tag' => "\$",
-       # The file to use when generating rules for this language.
-       # The default is 'depend2'.
-       'rule_file' => "\$",
-       # Name of the linking variable (LINK).
-       'linker' => "\$",
-       # Content of the linking variable.
-       'link' => "\$",
-       # Name of the compiler variable (CC).
-       'ccer' => "\$",
-       # Name of the linker variable (LD).
-       'lder' => "\$",
-       # Content of the linker variable ($(CC)).
-       'ld' => "\$",
-       # Flag to specify the output file (-o).
-       'output_flag' => "\$",
-       '_finish' => "\$",
-       # This is a subroutine which is called whenever we finally
-       # determine the context in which a source file will be
-       # compiled.
-       '_target_hook' => "\$",
-       # If TRUE, nodist_ sources will be compiled using specific rules
-       # (i.e. not inference rules).  The default is FALSE.
-       'nodist_specific' => "\$");
- sub finish ($)
- {
-   my ($self) = @_;
-   if (defined $self->_finish)
-     {
-       &{$self->_finish} (@_);
-     }
- }
- sub target_hook ($$$$%)
- {
-     my ($self) = @_;
-     if (defined $self->_target_hook)
-     {
-       &{$self->_target_hook} (@_);
-     }
- }
- package Automake;
- use strict;
  use Automake::Config;
  BEGIN
  {
@@@ -5449,8 -5391,9 +5364,8 @@@ EO
  }
  
  
- # &scan_autoconf_files ()
+ # scan_autoconf_files ()
 -# ----------------------
 -# Check whether we use 'configure.ac' or 'configure.in'.
 +# -----------------------
  # Scan it (and possibly 'aclocal.m4') for interesting things.
  # We must scan aclocal.m4 because there might be AC_SUBSTs and such there.
  sub scan_autoconf_files ()
diff --cc bootstrap.sh
Simple merge
index e1d5e6b5dd4c04654e7eabc40ba7b0f2084f7d2c,878789f1564e90ad454fed53aae2efe4ccb12647..1f72085ea6c6a81f2aa41c26427910c8c202b380
@@@ -80,17 -80,20 +80,20 @@@ sc_tabs_in_texi 
  sc_at_in_texi
  
  ## These check avoids accidental configure substitutions in the source.
 -## There are exactly 8 lines that should be modified from automake.in to
 +## There are exactly 7 lines that should be modified from automake.in to
  ## automake, and 9 lines that should be modified from aclocal.in to
  ## aclocal.
 -automake_diff_no = 8
 +automake_diff_no = 7
  aclocal_diff_no = 9
  sc_diff_automake sc_diff_aclocal: sc_diff_% :
-       @set +e; tmp=$*-diffs.tmp; \
-        diff -u $(srcdir)/$*.in $* > $$tmp; test $$? -eq 1 || exit 1; \
-        added=`grep -v '^+++ ' $$tmp | grep -c '^+'` || exit 1; \
-        removed=`grep -v '^--- ' $$tmp | grep -c '^-'` || exit 1; \
-        test $$added,$$removed = $($*_diff_no),$($*_diff_no) \
+       @set +e; \
+       in=$*-in.tmp out=$*-out.tmp diffs=$*-diffs.tmp \
+         && sed '/^#!.*[pP]rototypes/d' $(srcdir)/$*.in > $$in \
+         && sed '/^# BEGIN.* PROTO/,/^# END.* PROTO/d' $* > $$out \
+         && { diff -u $$in $$out > $$diffs; test $$? -eq 1; } \
+         && added=`grep -v '^+++ ' $$diffs | grep -c '^+'` \
+         && removed=`grep -v '^--- ' $$diffs | grep -c '^-'` \
+         && test $$added,$$removed = $($*_diff_no),$($*_diff_no) \
          || { \
            echo "Found unexpected diffs between $*.in and $*"; \
            echo "Lines added:   $$added"  ; \