automake-patches
[Top][All Lists]
Advanced

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

patch 3: shtool support


From: Bonzini
Subject: patch 3: shtool support
Date: Wed, 12 Jun 2002 08:47:56 -0400
User-agent: Mutt/1.3.25i

This patch adds support for shtool.  Since my previous patch I removed
the ability to call shtoolize; I intend to put that into autoreconf.

2002-05-03      Paolo Bonzini  (address@hidden)

         * automake.in (shtool): new variables
         (parse_arguments): parse shtool option
         (handle_texinfo_helper): don't look for mdate-sh if
         shtool is being used; substitute MDATE rather than MDDIR
         (handle_configure): don't look for mkinstalldirs if
         shtool is being used
         (scan_autoconf_files): require shtool instead of install-sh
         and mkinstalldirs, if it is being used
         * lib/am/texi-vers.am: use %MDATE% rather than %MDDIR%/mdate-sh
         * automake.texi (Auxiliary programs): refer to shtool
         and document it
         (Automake options): document shtool-related options
         (Texinfo): document that shtool can replace mdate-sh


diff -rpC3 automake.old/NEWS automake.shtool/NEWS
*** automake.old/NEWS   Fri May  3 08:17:22 2002
--- automake.shtool/NEWS        Wed Jun 12 08:25:19 2002
***************
*** 1,4 ****
--- 1,6 ----
  New in 1.6a:
+ * Some of the scripts used by Automake-generated makefiles can be replaced
+   by shtool
  * It is no longuer a requirement to use AM_CONFIG_HEADER instead of
    AC_CONFIG_HEADERS.  AM_CONFIG_HEADER is obsolete.
  * Use Autoconf's --trace interface to inspect configure.ac and get
diff -rpC3 automake.old/automake.in automake.shtool/automake.in
*** automake.old/automake.in    Fri May  3 08:17:22 2002
--- automake.shtool/automake.in Wed Jun 12 08:44:01 2002
*************** my $default_strictness_name = 'gnu';
*** 254,259 ****
--- 254,263 ----
  # included in generated Makefile.in.
  my $cmdline_use_dependencies = 1;
  
+ # TRUE if shtool has to be used instead of mkinstalldirs, install-sh
+ # and mdate-sh.
+ my $shtool = 0;
+ 
  # This holds our (eventual) exit status.  We don't actually exit until
  # we have processed all input files.
  my $exit_status = 0;
*************** sub parse_arguments ()
*** 1106,1111 ****
--- 1110,1116 ----
         'a|add-missing'        => \$add_missing,
         'c|copy'       => \$copy_missing,
         'v|verbose'    => \$verbose,
+        's|shtool'     => \$shtool,
         'Werror'         => sub { $SIG{"__WARN__"} = sub { die $_[0] } },
         'Wno-error'      => sub { $SIG{"__WARN__"} = 'DEFAULT' }
        )
*************** sub handle_texinfo_helper
*** 3205,3210 ****
--- 3210,3216 ----
            or next;
        push (@texi_cleans, @clean_files);
  
+       my $mdate;
        if ($vtexi)
        {
            &am_error ("`$vtexi', included in `$info_cursor', also included in 
`$versions{$vtexi}'")
*************** sub handle_texinfo_helper
*** 3217,3249 ****
            my $vti = ($done ? $done : 'vti');
            ++$done;
  
!           # This is ugly, but it is our historical practice.
!           if ($config_aux_dir_set_in_configure_in)
            {
!               require_conf_file_with_macro ('info_TEXINFOS', FOREIGN,
                                              'mdate-sh');
!           }
!           else
!           {
!               require_file_with_macro ('info_TEXINFOS', FOREIGN,
!                                        'mdate-sh');
!           }
  
-           my $conf_dir;
-           if ($config_aux_dir_set_in_configure_in)
-           {
-               $conf_dir = $config_aux_dir;
-               $conf_dir .= '/' unless $conf_dir =~ /\/$/;
-           }
-           else
-           {
-               $conf_dir = '$(srcdir)/';
-           }
            $output_rules .= &file_contents ('texi-vers',
                                             ('TEXI'  => $info_cursor,
                                              'VTI'   => $vti,
                                              'VTEXI' => $vtexi,
!                                             'MDDIR' => $conf_dir));
        }
  
        # If user specified file_TEXINFOS, then use that as explicit
--- 3223,3264 ----
            my $vti = ($done ? $done : 'vti');
            ++$done;
  
!           if (!$shtool)
            {
!               # This is ugly, but it is our historical practice.
!               if ($config_aux_dir_set_in_configure_in)
!               {
!                   &require_conf_file_with_macro ('info_TEXINFOS', FOREIGN,
!                                                  'mdate-sh');
!               }
!               else
!               {
!                   &require_file_with_macro ('info_TEXINFOS', FOREIGN,
                                              'mdate-sh');
!               }
!               
!               my $conf_dir;
!               if ($config_aux_dir_set_in_configure_in)
!               {
!                   $conf_dir = $config_aux_dir;
!                   $conf_dir .= '/' unless $conf_dir =~ /\/$/;
!               }
!               else
!               {
!                   $conf_dir = '$(srcdir)/';
!               }
!               $mdate = $conf_dir . "mdate-sh";
!           }
!           else
!           {
!               $mdate = $config_aux_dir . "/shtool mdate";
!           }
  
            $output_rules .= &file_contents ('texi-vers',
                                             ('TEXI'  => $info_cursor,
                                              'VTI'   => $vti,
                                              'VTEXI' => $vtexi,
!                                             'MDATE' => $mdate));
        }
  
        # If user specified file_TEXINFOS, then use that as explicit
*************** sub handle_configure
*** 3943,3951 ****
                                    ('FILES' => "@distclean_config"))
        if @distclean_config;
  
!     # Set location of mkinstalldirs.
!     define_variable ('mkinstalldirs',
!                    ('$(SHELL) ' . $config_aux_dir . '/mkinstalldirs'));
  
      macro_error ('CONFIG_HEADER',
                 "`CONFIG_HEADER' is an anachronism; now determined from 
`$configure_ac'")
--- 3958,3974 ----
                                    ('FILES' => "@distclean_config"))
        if @distclean_config;
  
!     # Set location of mkinstalldirs or redirect to shtool.
!     if ($shtool)
!     {
!       &define_variable ('mkinstalldirs',
!                         ('$(SHELL) ' . $config_aux_dir . '/shtool mkdir -p'));
!     }
!     else
!     {
!       &define_variable ('mkinstalldirs',
!                         ('$(SHELL) ' . $config_aux_dir . '/mkinstalldirs'));
!     }
  
      macro_error ('CONFIG_HEADER',
                 "`CONFIG_HEADER' is an anachronism; now determined from 
`$configure_ac'")
*************** sub scan_autoconf_files
*** 4781,4791 ****
      # FIXME: Is this broken because it needs dynamic scopes.
      # My tests seems to show it's not the case.
      $relative_dir = '.';
!     require_conf_file ($configure_ac, FOREIGN,
!                      'install-sh', 'mkinstalldirs', 'missing');
!     am_error ("`install.sh' is an anachronism; use `install-sh' instead")
!         if -f $config_aux_path[0] . '/install.sh';
! 
      require_conf_file ($pythondir_location, FOREIGN, 'py-compile')
        if $pythondir_location;
  
--- 4804,4822 ----
      # FIXME: Is this broken because it needs dynamic scopes.
      # My tests seems to show it's not the case.
      $relative_dir = '.';
!     if ($shtool)
!     {
!         &require_conf_file ($configure_ac, FOREIGN, 'shtool');
!     }
!     else
!     {
!         &require_conf_file ($configure_ac, FOREIGN,
!                           'install-sh', 'mkinstalldirs');
!         &am_error ("`install.sh' is an anachronism; use `install-sh' instead")
!             if -f $config_aux_path[0] . '/install.sh';
!     }
!     &require_conf_file ($configure_ac, FOREIGN, 'missing');
!     
      require_conf_file ($pythondir_location, FOREIGN, 'py-compile')
        if $pythondir_location;
  
*************** Library files:
*** 8035,8040 ****
--- 8066,8072 ----
        --libdir=DIR       directory storing library files
    -c, --copy             with -a, copy missing files (default is symlink)
    -f, --force-missing    force update of standard files
+   -s, --shtool           replace some of the auxiliary programs with shtool
  EOF
  
      my ($last, @lcomm);
diff -rpC3 automake.old/automake.texi automake.shtool/automake.texi
*** automake.old/automake.texi  Fri May  3 08:17:22 2002
--- automake.shtool/automake.texi       Wed Jun 12 08:22:57 2002
*************** This program is used to byte-compile Ema
*** 581,591 ****
  
  @item install-sh
  This is a replacement for the @code{install} program which works on
! platforms where @code{install} is unavailable or unusable.
  
  @item mdate-sh
  This script is used to generate a @file{version.texi} file.  It examines
! a file and prints some date information about it.
  
  @item missing
  This wraps a number of programs which are typically only required by
--- 581,593 ----
  
  @item install-sh
  This is a replacement for the @code{install} program which works on
! platforms where @code{install} is unavailable or unusable.  This is
! unnecessary if @code{shtool} is used by the program.
  
  @item mdate-sh
  This script is used to generate a @file{version.texi} file.  It examines
! a file and prints some date information about it.  This is unnecessary
! if @code{shtool} is used by the program.
  
  @item missing
  This wraps a number of programs which are typically only required by
*************** build can continue.
*** 595,604 ****
--- 597,615 ----
  
  @item mkinstalldirs
  This works around the fact that @code{mkdir -p} is not portable.
+ This is unnecessary if @code{shtool} is used by the program.
  
  @item py-compile
  This is used to byte-compile Python scripts.
  
+ @item shtool
+ @cindex shtool
+ This includes the functionality of some of the other scripts, and much
+ more.  This must be downloaded separately.  When @code{automake} is
+ told to use it, you should include its @code{mdate}, @code{install}
+ and @code{mkdir} scriptlets (hopefully future versions of 
+ @code{autoreconf} will do this automatically.
+ 
  @item texinfo.tex
  Not a program, this file is required for @code{make dvi} to work when
  Texinfo sources are in the package.
*************** Ordinarily each @file{Makefile.in} is cr
*** 1023,1028 ****
--- 1034,1049 ----
  corresponding @file{Makefile.am}.  This option is deprecated and will be
  removed in a future release.
  
+ @item -s
+ @itemx --shtool
+ @cindex shtool
+ This specifies that the generated @file{Makefile.in} files should
+ make use of @sc{gnu} @code{shtool} rather than using separate scripts
+ bundled with @code{automake}.  The @code{shtool} scripts that 
+ @code{automake} uses if @code{-s} is specified are @code{mdate}
+ (replacing @file{mdate-sh}), @code{install} (replacing 
+ @file{install-sh}), and @code{mkdir} (replacing @file{mkinstalldirs}).
+ 
  @item -v
  @itemx --verbose
  @opindex -v
*************** for new manuals.
*** 3468,3473 ****
--- 3489,3495 ----
  @cindex UPDATED-MONTH Texinfo macro
  
  @cindex mdate-sh
+ @cindex shtool
  
  If the @file{.texi} file @code{@@include}s @file{version.texi}, then
  that file will be automatically generated.  The file @file{version.texi}
*************** This holds the name of the month in whic
*** 3487,3496 ****
  was last modified.
  @end table
  
! The @file{version.texi} support requires the @code{mdate-sh} program;
! this program is supplied with Automake and automatically included when
! @code{automake} is invoked with the @code{--add-missing} option.
! 
  If you have multiple Texinfo files, and you want to use the
  @file{version.texi} feature, then you have to have a separate version
  file for each Texinfo file.  Automake will treat any include in a
--- 3509,3521 ----
  was last modified.
  @end table
  
! The @file{version.texi} support requires one of the @code{mdate-sh}
! or @code{shtool} programs; the former is supplied with Automake and
! automatically included when @code{automake} is invoked with the
! @code{--add-missing} option, while the latter must be downloaded
! separately and is used when @code{automake} is invoked with
! the @code{--shtool} option.
!   
  If you have multiple Texinfo files, and you want to use the
  @file{version.texi} feature, then you have to have a separate version
  file for each Texinfo file.  Automake will treat any include in a
diff -rpC3 automake.old/lib/am/texi-vers.am automake.shtool/lib/am/texi-vers.am
*** automake.old/lib/am/texi-vers.am    Fri May  3 08:17:22 2002
--- automake.shtool/lib/am/texi-vers.am Wed Jun 12 08:22:57 2002
*************** $(srcdir)/%VTEXI%: %MAINTAINER-MODE% $(s
*** 25,31 ****
  ## Depend on %CONFIGURE-AC% so that version number updates cause a
  ## rebuild.
  $(srcdir)/stamp-%VTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC%
!       @(set `$(SHELL) %MDDIR%mdate-sh $(srcdir)/%TEXI%`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \
--- 25,31 ----
  ## Depend on %CONFIGURE-AC% so that version number updates cause a
  ## rebuild.
  $(srcdir)/stamp-%VTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC%
!       @(set `$(SHELL) %MDATE% $(srcdir)/%TEXI%`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \



reply via email to

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