RE: fast make install

2008-03-10 Thread Duft Markus
Hi!

Wow. I have a work package pending which should make our build tool on
top of autotools make bulk-install, which is exactly the thing you
just committed :) will this make it into the next release for all file
types? Or can i get this whole thing as a patch for the version of
automake we currently use (1.9.6)?

Cheers, Markus

Ralf Wildenhues  wrote:
 * Ralf Wildenhues wrote on Thu, Jan 24, 2008 at 12:13:13AM CET:
 Here's the proposed patch (generated files not shown), still missing
 Autoconf version requirement.  It does the fast install for HEADERS,
 DATA, PYTHON, LIBRARIES, and TEXINFOS outputs.
 
 Comments, reviews, etc., greatly appreciated.
 
 The Autoconf version requirement has just been committed.  I have not
 yet added fast install for any other file types; notrans_*MANS will be
 simple once Peter's changes are in, but for all the rewriting types I
 haven't yet found a way to do it that isn't very ugly and quite
 involved.
 
 Applied as shown in

http://thread.gmane.org/gmane.comp.sysutils.automake.patches/2945/focus
=3088,
 except that I edited the ChangeLog message a bit as below.
 
 Cheers,
 Ralf
 
 2008-03-08  Ralf Wildenhues  [EMAIL PROTECTED]
 
   Use `install' with multiple files at once for some primaries.
   With nobase targets, at most 50 files are installed at once,
   to avoid quadratic string concatenation and line length limits.
   This isn't yet done with base targets.  One hope is that there,
   the typical file name length is lower.  If this turns out to be
   a problem, it should be revisited.
 
   * lib/am/inst-vars.am (am__nobase_list): New helper macro for
   installation of multiple nobase files at once: sorts and lists
   files keyed by their target directory.
   * lib/am/data.am (%DIR%%PRIMARY%_INSTALL): No need to set it to
   $(install_sh_DATA) any more, not even for nobase targets.
   (install-%DIR%%PRIMARY%): Split base and nobase cases.
   Rewrite to pass lists of files which all go in the same
   directory to `install'.  In the nobase case, make use of
   $(am__nobase_list) and $(MKDIR_P) each directory before
   populating it.  Take care of files in source and build trees,
   and avoid creating directories where no files are to be
   installed.
   * lib/am/libs.am (%DIR%LIBRARIES_INSTALL): Likewise.
   (install-%DIR%LIBRARIES): Likewise.
   * lib/am/python.am (%DIR%PYTHON_INSTALL): Likewise.
   (install-%DIR%PYTHON): Likewise.  Also take care to keep note of
   a list for byte compilation after installation.
   * lib/am/texinfos.am (install-dvi-am, install-html-am)
   (install-info-am, install-pdf-am, install-ps-am): Use file lists
   to install multiple files at once.
   * NEWS: Update.
   Suggested by Akim Demaille.





Re: Implementing notrans_man_MANS

2008-03-10 Thread Peter Breitenlohner

On Thu, 6 Mar 2008, Ralf Wildenhues wrote:


* Peter Breitenlohner wrote on Thu, Mar 06, 2008 at 01:27:05PM CET:

or still something else. If so please indicate what.


Oh sorry, I was in a hurry and not thinking.  What I meant was that
while you can't wrap arbitrary lines ending in backslash-newline in `if
%?NOTRANS_MANS%/else/endif', you can do so at a finer grainage than
whole rules: it's just that it won't work after lines ending in
backslash.

To some extent this is independent of the question you ask about the
rule target names: whether you interleave trans and notrans in the .am
file and whether you give trans and notrans different target names need
not be dealt with at the same time.  So please for now leave you patch
as is, but only change all those NOTR/DOTR prefixes to use if/else/endif
(which includes a few lines of duplication in the .am file).

Clearer now?  If not, then I guess I can also patch that later.


Hi Ralf,

yes, thanks. However, I can only use if/endif if/endif and not if/else/endif
because a section may have trans_ as well as notrans_ man pages.

=

Attached are revised versions of the three patches. I hope they take care of
all your earlier comments.

patch-03-notrans_MANS-impl:

The new variables names are more or less self explanatory (I hope).

I had to use
  @unsorted_deps = (keys %notrans_vars, keys %trans_vars,
keys %notrans_this_sect, keys %trans_this_sect);
  my @deps = sort @unsorted_deps;
instead of
  my @deps = sort (keys %notrans_vars, keys %trans_vars,
   keys %notrans_this_sect, keys %trans_this_sect);
because this may give a perl warning [sort (...) used as function],
resulting in three test (instsh.tes, location.test, warnopts.test) to FAIL.

patch-04-notrans_MANS-doc:

I have slightly reworded the text preceding the example, and hope this
clarifies the intent.

patch-05-notrans_MANS-test:

notrans.test now contains all combinations. I have incorporated the checks
that used to be in man4.test into notrans.test, because otherwise there
would have been much repetition.  Hope this is OK.  If so, remember not to
mention man4.test in the ChangLog.  If not, I could make that two separate
tests.

The install-man depedndencies are checked either directly (inspecting
Makefile.in) or indirectly (letting make generate the files).

=

regards
Peter Breitenlohner [EMAIL PROTECTED]diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti 
automake-1.10.1.orig/automake.in automake-1.10.1/automake.in
--- automake-1.10.1.orig/automake.in2008-02-19 18:07:41.0 +0100
+++ automake-1.10.1/automake.in 2008-03-08 00:10:34.0 +0100
@@ -3363,27 +3363,39 @@
   # Find all the sections in use.  We do this by first looking for
   # standard sections, and then looking for any additional
   # sections used in man_MANS.
-  my (%sections, %vlist);
+  my (%sections, %notrans_sections, %trans_sections,
+  %notrans_vars, %trans_vars, %notrans_sect_vars, %trans_sect_vars);
   # We handle nodist_ for uniformity.  man pages aren't distributed
   # by default so it isn't actually very important.
+  foreach my $npfx ('', 'notrans_')
+{
   foreach my $pfx ('', 'dist_', 'nodist_')
{
  # Add more sections as needed.
  foreach my $section ('0'..'9', 'n', 'l')
{
- my $varname = $pfx . 'man' . $section . '_MANS';
+ my $varname = $npfx . $pfx . 'man' . $section . '_MANS';
  if (var ($varname))
{
  $sections{$section} = 1;
  $varname = '$(' . $varname . ')';
- $vlist{$varname} = 1;
+ if ($npfx eq 'notrans_')
+   {
+ $notrans_sections{$section} = 1;
+ $notrans_sect_vars{$varname} = 1;
+   }
+ else
+   {
+ $trans_sections{$section} = 1;
+ $trans_sect_vars{$varname} = 1;
+   }
 
  push_dist_common ($varname)
if $pfx eq 'dist_';
}
}
 
- my $varname = $pfx . 'man_MANS';
+ my $varname = $npfx . $pfx . 'man_MANS';
  my $var = var ($varname);
  if ($var)
{
@@ -3393,28 +3405,87 @@
  if (/\.([0-9a-z])([a-z]*)$/)
{
  $sections{$1} = 1;
+ if ($npfx eq 'notrans_')
+   {
+ $notrans_sections{$1} = 1;
+   }
+ else
+   {
+ $trans_sections{$1} = 1;
+   }
}
}
 
  $varname = '$(' . $varname . ')';
- $vlist{$varname} = 1;
+ if ($npfx eq 'notrans_')
+   {
+