/[autoconf]/autoconf/bin/autoreconf.in
ViewVC logotype

Diff of /autoconf/bin/autoreconf.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.109 by akim, Tue Oct 29 08:09:05 2002 UTC revision 1.110 by akim, Sun Nov 3 17:39:30 2002 UTC
# Line 64  Operation modes: Line 64  Operation modes:
64    -f, --force              consider all files obsolete    -f, --force              consider all files obsolete
65    -i, --install            copy missing auxiliary files    -i, --install            copy missing auxiliary files
66    -s, --symlink            with -i, install symbolic links instead of copies    -s, --symlink            with -i, install symbolic links instead of copies
67      -m, --make               when applicable, re-run ./configure && make
68    -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]    -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
69    
70  Warning categories include:  Warning categories include:
# Line 109  my $autopoint  = $ENV{'AUTOPOINT'}  || ' Line 110  my $autopoint  = $ENV{'AUTOPOINT'}  || '
110    
111  # --install -- as --add-missing in other tools.  # --install -- as --add-missing in other tools.
112  my $install = 0;  my $install = 0;
 my @prepend_include;  
 my @include;  
 my $status = 0;  
113  # symlink -- when --install, use symlinks instead.  # symlink -- when --install, use symlinks instead.
114  my $symlink = 0;  my $symlink = 0;
115    
116  # The directory where autoreconf was run.  my @prepend_include;
117  my $cwd = cwd;  my @include;
118    
119  # List of warnings.  # List of warnings.
120  my @warning;  my @warning;
121    
122    # Rerun `./configure && make'?
123    my $make = 0;
124    
125  ## ---------- ##  ## ---------- ##
126  ## Routines.  ##  ## Routines.  ##
# Line 138  sub parse_args () Line 138  sub parse_args ()
138            'I|include=s'          => \@include,            'I|include=s'          => \@include,
139            'B|prepend-include=s'  => \@prepend_include,            'B|prepend-include=s'  => \@prepend_include,
140            'i|install'            => \$install,            'i|install'            => \$install,
141            's|symlink'            => \$symlink);            's|symlink'            => \$symlink,
142              'm|make'               => \$make);
143    
144    # Split the warnings as a list of elements instead of a list of    # Split the warnings as a list of elements instead of a list of
145    # lists.    # lists.
# Line 210  sub parse_args () Line 211  sub parse_args ()
211  }  }
212    
213    
214  # &autoreconf ($DIRECTORY)  # &autoreconf_current_directory
215  # ------------------------  # -----------------------------
216  # Reconf the $DIRECTORY.  sub autoreconf_current_directory ()
 sub autoreconf ($)  
217  {  {
   my ($directory) = @_;  
   
   # The format for this message is not free: taken from Emacs, itself  
   # using GNU Make's format.  
   verbose "Entering directory `$directory'";  
   chdir $directory  
     or error "cannot chdir to $directory: $!";  
   
218    my $configure_ac = find_configure_ac;    my $configure_ac = find_configure_ac;
219    error "cannot find `configure.ac' in `$directory'"    error "cannot find `configure.ac'"
220      unless $configure_ac;      unless $configure_ac;
221    
222    # ---------------------- #    # ---------------------- #
# Line 362  sub autoreconf ($) Line 354  sub autoreconf ($)
354    my $uses_libtool;    my $uses_libtool;
355    my $uses_autoheader;    my $uses_autoheader;
356    my @subdir;    my @subdir;
357      verbose "$configure_ac: tracing";
358    my $traces = new Autom4te::XFile    my $traces = new Autom4te::XFile
359      ("$autoconf"      ("$autoconf"
360       . join (' --trace=', '',       . join (' --trace=', '',
# Line 389  sub autoreconf ($) Line 382  sub autoreconf ($)
382        if (-d)        if (-d)
383          {          {
384            verbose "$configure_ac: subdirectory $_ to autoreconf";            verbose "$configure_ac: subdirectory $_ to autoreconf";
385            push @ARGV, catfile ($directory, $_);            autoreconf ($_);
386          }          }
387        else        else
388          {          {
# Line 536  sub autoreconf ($) Line 529  sub autoreconf ($)
529        xsystem ($automake);        xsystem ($automake);
530      }      }
531    
532    
533      # -------------- #
534      # Running make.  #
535      # -------------- #
536    
537      if ($make)
538        {
539          if (!-f "config.status")
540            {
541              verbose "no config.status: cannot re-make";
542            }
543          else
544            {
545              xsystem ("./config.status --recheck");
546              xsystem ("./config.status");
547              if (!-f "Makefile")
548                {
549                  verbose "no Makefile: cannot re-make";
550                }
551              else
552                {
553                  xsystem ("make");
554                }
555            }
556        }
557    }
558    
559    
560    # &autoreconf ($DIRECTORY)
561    # ------------------------
562    # Reconf the $DIRECTORY.
563    sub autoreconf ($)
564    {
565      my ($directory) = @_;
566      my $cwd = cwd;
567    
568      # The format for this message is not free: taken from Emacs, itself
569      # using GNU Make's format.
570      verbose "Entering directory `$directory'";
571      chdir $directory
572        or error "cannot chdir to $directory: $!";
573    
574      autoreconf_current_directory;
575    
576    # The format is not free: taken from Emacs, itself using GNU Make's    # The format is not free: taken from Emacs, itself using GNU Make's
577    # format.    # format.
578    verbose "Leaving directory `$directory'";    verbose "Leaving directory `$directory'";
# Line 556  parse_args; Line 593  parse_args;
593    
594  # Autoreconf all the given configure.ac.  A while loop, not a for,  # Autoreconf all the given configure.ac.  A while loop, not a for,
595  # since the list can change at runtime because of AC_CONFIG_SUBDIRS.  # since the list can change at runtime because of AC_CONFIG_SUBDIRS.
596  autoreconf (shift @ARGV)  for my $directory (@ARGV)
597    while (@ARGV);    {
598        autoreconf ($directory);
599      }
600    
601  ### Setup "GNU" style for perl-mode and cperl-mode.  ### Setup "GNU" style for perl-mode and cperl-mode.
602  ## Local Variables:  ## Local Variables:

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.110

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26