Re: [PATCH] tests: fix py-compile-basedir.sh: add missing test call

2022-01-18 Thread Mike Frysinger
On 18 Jan 2022 11:29, Jim Meyering wrote:
> On Tue, Jan 18, 2022 at 10:29 AM Mike Frysinger wrote:
> > On 18 Jan 2022 09:48, Jim Meyering wrote:
> ...
> > > But IMHO that's too much duplication/syntax.
> > > How about this instead?
> > >
> > >   case $(echo "$files" | wc -l) in 4|6) ;; *) false;; esac
> >
> > looks reasonable for POSIX shell.  not a fan of the one-line, but that style
> > seems to be SOP for test code, so i won't whine too loudly :p.
> >
> > i assume you'll take care of writing the actual patch at this point since it
> > was your idea ? :)
> 
> Sure. How about this?

lgtm, thanks
-mike


signature.asc
Description: PGP signature


Re: [PATCH] tests: fix py-compile-basedir.sh: add missing test call

2022-01-18 Thread Jim Meyering
On Tue, Jan 18, 2022 at 10:29 AM Mike Frysinger  wrote:
> On 18 Jan 2022 09:48, Jim Meyering wrote:
...
> > But IMHO that's too much duplication/syntax.
> > How about this instead?
> >
> >   case $(echo "$files" | wc -l) in 4|6) ;; *) false;; esac
>
> looks reasonable for POSIX shell.  not a fan of the one-line, but that style
> seems to be SOP for test code, so i won't whine too loudly :p.
>
> i assume you'll take care of writing the actual patch at this point since it
> was your idea ? :)

Sure. How about this?

From: Jim Meyering 
Date: Tue, 18 Jan 2022 02:00:22 -0800
Subject: [PATCH] tests: fix py-compile-basedir.sh: missing "test"

Prompted by a patch from Thomas Deutschmann ,
via https://lists.gnu.org/r/automake-patches/2022-01/msg1.html:
commit v1.16.1-26-gb279a0d46 ("tests: in python tests, do not
require .pyo files (for python3)") was missing a `test` call.
Reported to Gentoo at https://bugs.gentoo.org/715040.
* t/py-compile-basedir.sh: Rather than just adding the missing
"test", rewrite using a case statement, to avoid some duplication.
---
 t/py-compile-basedir.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
index 44b6b07c1..22e605f9d 100644
--- a/t/py-compile-basedir.sh
+++ b/t/py-compile-basedir.sh
@@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
   py_installed "$d2/sub/$f.pyc"
   files=$(find "$d2" | grep '\.py[co]$')
   # with new-enough Python3, there are six files.
-  test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6
+  case $(echo "$files" | wc -l) in 4|6) ;; *) false;; esac
   case $d2 in
 .|..) rm -f $files;;
*) rm -rf "$d2";;
--



Re: [PATCH] tests: fix py-compile-basedir.sh: add missing test call

2022-01-18 Thread Mike Frysinger
On 18 Jan 2022 09:48, Jim Meyering wrote:
> On Tue, Jan 18, 2022 at 7:46 AM Mike Frysinger  wrote:
> > From: Thomas Deutschmann 
> >
> > Commit b279a0d46dfeca1ca40057c3c910ab1657d60be5 ("tests: in python
> > tests, do not require .pyo files (for python3)") had a slight logic
> > error in that it missed a `test` call.
> >
> > Reported to Gentoo at https://bugs.gentoo.org/715040.
> >
> > * t/py-compile-basedir.sh: Add test command.
> > ---
> >  t/py-compile-basedir.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
> > index 44b6b07c1962..979f65710c0b 100644
> > --- a/t/py-compile-basedir.sh
> > +++ b/t/py-compile-basedir.sh
> > @@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
> >py_installed "$d2/sub/$f.pyc"
> >files=$(find "$d2" | grep '\.py[co]$')
> ># with new-enough Python3, there are six files.
> > -  test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6
> > +  test $(echo "$files" | wc -l) -eq 4 || test $(echo "$files" | wc -l) -eq 
> > 6
> 
> Thanks. Good catch.
> If we were to use that, it's a little better to double-quote each
> $(...) result, in case somehow the result is not just precisely one
> token:
> 
>   test "$(echo "$files" | wc -l)" -eq 4 || test "$(echo "$files" | wc -l)" 
> -eq 6
> 
> But IMHO that's too much duplication/syntax.
> How about this instead?
> 
>   case $(echo "$files" | wc -l) in 4|6) ;; *) false;; esac

looks reasonable for POSIX shell.  not a fan of the one-line, but that style
seems to be SOP for test code, so i won't whine too loudly :p.

i assume you'll take care of writing the actual patch at this point since it
was your idea ? :)
-mike


signature.asc
Description: PGP signature


Re: [PATCH] tests: fix py-compile-basedir.sh: add missing test call

2022-01-18 Thread Jim Meyering
On Tue, Jan 18, 2022 at 7:46 AM Mike Frysinger  wrote:
> From: Thomas Deutschmann 
>
> Commit b279a0d46dfeca1ca40057c3c910ab1657d60be5 ("tests: in python
> tests, do not require .pyo files (for python3)") had a slight logic
> error in that it missed a `test` call.
>
> Reported to Gentoo at https://bugs.gentoo.org/715040.
>
> * t/py-compile-basedir.sh: Add test command.
> ---
>  t/py-compile-basedir.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
> index 44b6b07c1962..979f65710c0b 100644
> --- a/t/py-compile-basedir.sh
> +++ b/t/py-compile-basedir.sh
> @@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
>py_installed "$d2/sub/$f.pyc"
>files=$(find "$d2" | grep '\.py[co]$')
># with new-enough Python3, there are six files.
> -  test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6
> +  test $(echo "$files" | wc -l) -eq 4 || test $(echo "$files" | wc -l) -eq 6

Thanks. Good catch.
If we were to use that, it's a little better to double-quote each
$(...) result, in case somehow the result is not just precisely one
token:

  test "$(echo "$files" | wc -l)" -eq 4 || test "$(echo "$files" | wc -l)" -eq 6

But IMHO that's too much duplication/syntax.
How about this instead?

  case $(echo "$files" | wc -l) in 4|6) ;; *) false;; esac



[PATCH] tests: fix py-compile-basedir.sh: add missing test call

2022-01-17 Thread Mike Frysinger
From: Thomas Deutschmann 

Commit b279a0d46dfeca1ca40057c3c910ab1657d60be5 ("tests: in python
tests, do not require .pyo files (for python3)") had a slight logic
error in that it missed a `test` call.

Reported to Gentoo at https://bugs.gentoo.org/715040.

* t/py-compile-basedir.sh: Add test command.
---
 t/py-compile-basedir.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
index 44b6b07c1962..979f65710c0b 100644
--- a/t/py-compile-basedir.sh
+++ b/t/py-compile-basedir.sh
@@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
   py_installed "$d2/sub/$f.pyc"
   files=$(find "$d2" | grep '\.py[co]$')
   # with new-enough Python3, there are six files.
-  test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6
+  test $(echo "$files" | wc -l) -eq 4 || test $(echo "$files" | wc -l) -eq 6
   case $d2 in
 .|..) rm -f $files;;
*) rm -rf "$d2";;
-- 
2.33.0




Re: [PATCH] readme: add missing word

2020-04-18 Thread Karl Berry
-that the range specifies every single year in that closed interval.
+note that the range specifies every single year in that closed interval.

Thanks for pointing that out. I decided to delete the "that" instead of
adding the "note". Pushed. --best wishes, karl.



[PATCH] readme: add missing word

2020-04-18 Thread Vincent Lefevre
diff --git a/README b/README
index 4ac357012..184825761 100644
--- a/README
+++ b/README
@@ -48,7 +48,7 @@ be informed, subscribe to that list by following the 
instructions at
 .
 
 For any copyright year range specified as - in this package,
-that the range specifies every single year in that closed interval.
+note that the range specifies every single year in that closed interval.
 
 -
 

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



bug#33166: automake --add-missing does not install config.rpath when AM_ICONV is used

2018-12-07 Thread Bruno Haible
> I need iconv but not gettext.

Then take the Gnulib module 'iconv'. [1][2] It contains iconv.m4, its
macro dependencies, and config.rpath - that is, exactly what you need.

Bruno

[1] https://www.gnu.org/software/gnulib/MODULES.html#module=iconv
[1] https://www.gnu.org/software/gnulib/manual/html_node/iconv.html






bug#33573: --add-missing behaviour

2018-12-01 Thread Ben Elliston
I ran 'automake --add-missing' to copy mdate-sh to my project. This,
of course, creates a symbolic link to the automake install tree.
Remembering this, I then ran 'automake --add-missing -c' to copy the
script instead. Since mdate-sh was already present in my tree,
automake did nothing. When passing -c, I think automake should replace
the symbolic link (if and only if it is a symbolic link).

Ben


signature.asc
Description: PGP signature


bug#33166: automake --add-missing does not install config.rpath when AM_ICONV is used

2018-10-27 Thread Hans-Bernhard Bröker
Am 27.10.2018 um 12:48 schrieb Stuart Caie:

> I understand that there is a boundary between these two packages, and
> this is not directly automake's problem, even though the main mechanism
> for copying missing files is in automake.

Not for this file it isn't, because as far as automake is concerned,
this is not a missing file.  It's just a file you might or might not
have, and if you do have it, automake should do a thing or two with it,
automatically.

Automake has mechanism for copying important files from your fully
equipped source tree into the distributed tarball.  config.rpath is
among the list of these files (a fact I had overlooked before --- my bad).

Automake also has a mechanism for copying/linking missing files from its
own storage into your source tree.  config.rpath is not among these
files, and it can't be, because it really is not part of automake.

> I think I have a corner case. I need iconv but not gettext. 

Well, then that's a bug in gettext that it doesn't currently let you do
that quite as readily as you would like it to.  As-is, you _do_ need
gettext for this, if only for it to supply config.rpath.

> How do you think this corner case should be handled?

By addressing this to gettext.

> 3) AM_ICONV invokes AC_LIB_RPATH invokes AC_REQUIRE_AUX_FILE which
> signals automake to complain if config.rpath is missing -- can automake
> copy config.rpath at that time?

No, because it doesn't have one to copy.





bug#33166: automake --add-missing does not install config.rpath when AM_ICONV is used

2018-10-27 Thread Stuart Caie




On 26/10/2018 20:54, Mathieu Lirzin wrote:

“config.rpath” which is maintained in GNU Gettext is already copied
inside the target source tree by the ‘autopoint’ program which is
automatically run by ‘autoreconf --install’ when the Gettext macros are
added to “configure.ac”.  ‘autoreconf’ serves as a meta command for the
autotools which should be used instead of manually running ‘autoconf’,
‘aclocal’, ‘automake’, ... in sequence.

Unless you disagree, I will close this bug.



Thanks for the explanation.

I understand that there is a boundary between these two packages, and 
this is not directly automake's problem, even though the main mechanism 
for copying missing files is in automake.


I think I have a corner case. I need iconv but not gettext. I found that 
autoreconf won't even invoke autopoint, and invoking autopoint manually 
won't do anything. So my expectation that autoreconf -i will bring in 
any aux files implied by any standard macro is not met in this situation.


$ autoreconf -v -i -W all
...
autoreconf: configure.ac: not using Gettext
...
$ autopoint
autopoint: *** Missing version: please specify in configure.ac through a 
line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package 
is using

autopoint: *** Stop.

How do you think this corner case should be handled?

1) autoreconf and autopoint should look for AM_ICONV as well as 
AM_GNU_GETTEXT_VERSION macros, and install config.rpath


2) I should pretend to need gettext, even though I don't?

3) AM_ICONV invokes AC_LIB_RPATH invokes AC_REQUIRE_AUX_FILE which 
signals automake to complain if config.rpath is missing -- can automake 
copy config.rpath at that time?


4) some other way?

Regards
Stuart





bug#33166: automake --add-missing does not install config.rpath when AM_ICONV is used

2018-10-26 Thread Nick Bowler
On 10/26/18, Hans-Bernhard Bröker  wrote:
> Am 26.10.2018 um 17:06 schrieb Stuart Caie:
>> Technically, AM_ICONV is not distributed with automake, and neither is
>> is config.rpath. However, automake recognises config.rpath as a special
>> file to distribute nonetheless.
>
> That's not really automake doing that.  That's done by gettextize and
> the autofoo code it adds to your project.

To be fair, Automake does have a special handling for config.rpath:
it will distribute a file with this name automatically if it is
present in the source tree, just like it does with files named
README, COPYING, etc.  But that's the extent of it.

(Aside: I've never liked this particular behaviour of Automake.
Especially in "foreign" mode, it's easy to miss adding files to
version control and it's possible nobody notices until someone
other than the original author runs "make dist", gets no error
whatsoever, and publishes a tarball without any README).





bug#33166: automake --add-missing does not install config.rpath when AM_ICONV is used

2018-10-26 Thread Mathieu Lirzin
Hello Stuart,

Stuart Caie  writes:

> the automake macro AM_ICONV requires the auxiliary program config.rpath,
> however automake --add-missing will not install it.
>
> Technically, AM_ICONV is not distributed with automake, and neither is
> is config.rpath. However, automake recognises config.rpath as a special
> file to distribute nonetheless.
>
> Could config.rpath be added to automake's list of auxiliary programs,
> like ar-lib, config.guess and so on?
>
> If not, could there be some mechanism added to automake so other
> packages can tell it to add their required files? e.g. could gettext.m4
> which defines AM_ICONV include some special macro that tells automake
> that config.rpath is needed and can be found in  ?

“config.rpath” which is maintained in GNU Gettext is already copied
inside the target source tree by the ‘autopoint’ program which is
automatically run by ‘autoreconf --install’ when the Gettext macros are
added to “configure.ac”.  ‘autoreconf’ serves as a meta command for the
autotools which should be used instead of manually running ‘autoconf’,
‘aclocal’, ‘automake’, ... in sequence.

Unless you disagree, I will close this bug.

Thanks for the report.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37





bug#33166: automake --add-missing does not install config.rpath when AM_ICONV is used

2018-10-26 Thread Hans-Bernhard Bröker
Am 26.10.2018 um 17:06 schrieb Stuart Caie:
> Hello,
> 
> the automake macro AM_ICONV requires the auxiliary program config.rpath,
> however automake --add-missing will not install it.

That's because it's not automake's file.  Automake has no way of knowing
where to get that file from, nor a responsibility to do anything about it.

> Technically, AM_ICONV is not distributed with automake, and neither is
> is config.rpath. However, automake recognises config.rpath as a special
> file to distribute nonetheless.

That's not really automake doing that.  That's done by gettextize and
the autofoo code it adds to your project.

> If not, could there be some mechanism added to automake so other
> packages can tell it to add their required files? e.g. could gettext.m4
> which defines AM_ICONV include some special macro that tells automake
> that config.rpath is needed and can be found in  ?

Such mechanisms exist, and from the look of it, gettext is _already_
using them.





bug#33166: automake --add-missing does not install config.rpath when AM_ICONV is used

2018-10-26 Thread Stuart Caie
Hello,

the automake macro AM_ICONV requires the auxiliary program config.rpath,
however automake --add-missing will not install it.

Technically, AM_ICONV is not distributed with automake, and neither is
is config.rpath. However, automake recognises config.rpath as a special
file to distribute nonetheless.

Could config.rpath be added to automake's list of auxiliary programs,
like ar-lib, config.guess and so on?

If not, could there be some mechanism added to automake so other
packages can tell it to add their required files? e.g. could gettext.m4
which defines AM_ICONV include some special macro that tells automake
that config.rpath is needed and can be found in  ?

Thanks in advance,
Stuart





Re: Add missing '$' for variable expansion in depout.m4

2013-04-19 Thread Stefano Lattarini
Hi Gavin, and sorry for the delay.

Thanks for the patch --- and well spotted BTW; I'm a little
ashamed such a blatant typo had escaped my attention so far!

On 04/11/2013 08:12 PM, Gavin Smith wrote:
 (I hope I have prepared this patch properly.)

Not really, because we prefer patches formatted with git format-patch.

But for such a small change it's really no big deal, so I went ahead
and applied the patch in you name (the resulting commit is reported
below, for reference).  It will appear in the next bug-fixing version
of Automake (1.13.2).

Thank you,
  Stefano

 Add missing '$' for variable expansion in depout.m4
 
 * m4/depout.m4: am__include appeared where $am__include was meant.
 

 8  8  8  8  8  8  8  8  8 

From 82628de32451186708c0630cf995fdf5430c3f76 Mon Sep 17 00:00:00 2001
Message-Id: 
82628de32451186708c0630cf995fdf5430c3f76.1366378018.git.stefano.lattar...@gmail.com
From: Gavin Smith gavinsmith0...@gmail.com
Date: Fri, 19 Apr 2013 15:16:26 +0200
Subject: [PATCH] Add missing '$' for variable expansion in depout.m4

* m4/depout.m4: am__include appeared where $am__include was meant.

Reference:
http://lists.gnu.org/archive/html/automake-patches/2013-04/msg0.html

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com
---
 THANKS   | 1 +
 m4/depout.m4 | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/THANKS b/THANKS
index c8ec3fd..cf46972 100644
--- a/THANKS
+++ b/THANKS
@@ -128,6 +128,7 @@ Ganesan Rajagopal   rgane...@novell.com
 Garrett D'Amore garr...@qualcomm.com
 Garth Corralgar...@inktomi.com
 Gary V Vaughan  gvaug...@oranda.demon.co.uk
+Gavin Smith gavinsmith0...@gmail.com
 Geoffrey Keatinggeo...@apple.com
 Glenn Amerine   gl...@pie.mhsc.org
 Gord Matzigkeit g...@gnu.ai.mit.edu
diff --git a/m4/depout.m4 b/m4/depout.m4
index 880a597..c79d04b 100644
--- a/m4/depout.m4
+++ b/m4/depout.m4
@@ -40,7 +40,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 DEPDIR=`sed -n 's/^DEPDIR = //p'  $mf`
 test -z $DEPDIR  continue
 am__include=`sed -n 's/^am__include = //p'  $mf`
-test -z am__include  continue
+test -z $am__include  continue
 am__quote=`sed -n 's/^am__quote = //p'  $mf`
 # Find all dependency output files, they are included files with
 # $(DEPDIR) in their names.  We invoke sed twice because it is the
-- 
1.8.2.1.389.gcaa7d79



Add missing '$' for variable expansion in depout.m4

2013-04-11 Thread Gavin Smith
(I hope I have prepared this patch properly.)

Add missing '$' for variable expansion in depout.m4

* m4/depout.m4: am__include appeared where $am__include was meant.

diff --git a/m4/depout.m4 b/m4/depout.m4
index 880a597..c79d04b 100644
--- a/m4/depout.m4
+++ b/m4/depout.m4
@@ -40,7 +40,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 DEPDIR=`sed -n 's/^DEPDIR = //p'  $mf`
 test -z $DEPDIR  continue
 am__include=`sed -n 's/^am__include = //p'  $mf`
-test -z am__include  continue
+test -z $am__include  continue
 am__quote=`sed -n 's/^am__quote = //p'  $mf`
 # Find all dependency output files, they are included files with
 # $(DEPDIR) in their names.  We invoke sed twice because it is the



Re: Add missing '$' for variable expansion in depout.m4

2013-04-11 Thread Gavin Smith
The code here is looking for lines including *.Po dependency files in
output Makefiles. It never caused a problem because if am__include
wasn't set in the output file, then there would be unlikely to be any
lines picked up by the sed expression looking for the include lines.

I found this really by accident. I've been patching automake to see if
I can make it output plain Makefiles. I've arranged for many autoconf
output variables to be in a Makefile include file, so a line like
am__include = include was not in the Makefile, but in the include
file. However, I found that it would get past this check anyway.

am__include seems only to be set as a make variable so that
config.status can read it. Otherwise you would expect it to be
declared with _AM_SUBST_NOTMAKE. automake is passing config.status a
note via Makefile.in; there aren't any other ways for them to
communicate (although an unusual way of doing it would be for automake
to generate files which are source'd or m4_include'd from
configure.ac).

On Thu, Apr 11, 2013 at 7:45 PM, Nick Bowler nbow...@elliptictech.com wrote:
 On 2013-04-11 19:12 +0100, Gavin Smith wrote:
 (I hope I have prepared this patch properly.)

 Add missing '$' for variable expansion in depout.m4

 * m4/depout.m4: am__include appeared where $am__include was meant.

 diff --git a/m4/depout.m4 b/m4/depout.m4
 index 880a597..c79d04b 100644
 --- a/m4/depout.m4
 +++ b/m4/depout.m4
 @@ -40,7 +40,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  DEPDIR=`sed -n 's/^DEPDIR = //p'  $mf`
  test -z $DEPDIR  continue
  am__include=`sed -n 's/^am__include = //p'  $mf`
 -test -z am__include  continue
 +test -z $am__include  continue

 Well-spotted!  This definitely looks like a mistake.  How did you
 find this?

 The test appears to have been defective ever since it was introduced
 almost 10 years ago.  At this point, it may be better to simply remove
 the dead code entirely unless this is known to fix a real problem.

 Cheers,
 --
 Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)



bug#12219: Could the --add-missing option be supported in AM_INIT_AUTOMAKE? (was: Re: How to automatically get missing files when changing configure.ac?)

2012-08-17 Thread Stefano Lattarini
Severity: wishlist

[CC:ing bug-automake so that I won't forget about this issue]

On 08/17/2012 01:04 AM, Jeff Johnston wrote:
 If a configure.ac file is edited and the following added:
 
 LT_INIT
 AC_PROG_LIBTOOL

I think you shouldn't add both, BTW; AC_PROG_LIBTOOL is the
obsolescent name for LT_INIT AFAIK.

 The make can fail when it tries to do an automake and ltmain.sh
 is missing.

Note that even automake --add-missing wouldn't help you here,
because the ltmain.sh is provided by Libtool, not Automake, and
installed by 'libtoolize', not by 'automake'.

Still, for other, similar use cases (e.g., adding AC_PROG_CC_C_O
or AM_PROG_AR to configure.ac) your request sounds valid.

 How does one set up automake to use the --add-missing parameter
 automatically?

Currently, one can't.

 It's not recognized as an option to use with AM_INIT_AUTOMAKE,

Well, automake could be enhanced to recognize a add-missing option
in AM_INIT_AUTOMAKE too.  This would seem a good idea, but I need to
think about it more carefully, in case there is some a subtle reason
for the current beaviour, and against the proposed enhancement.

 and the generated call to AUTOMAKE in the Makefile does not use
 an option variable that can be set.

 Should this be used by default in the Makefile when maintainer
 mode is enabled?

I don't understand this question, sorry.  What do you refer to
with this here?

 -- Jeff J.


Thanks,
  Stefano





Could the --add-missing option be supported in AM_INIT_AUTOMAKE? (was: Re: How to automatically get missing files when changing configure.ac?)

2012-08-17 Thread Stefano Lattarini
Severity: wishlist

[CC:ing bug-automake so that I won't forget about this issue]

On 08/17/2012 01:04 AM, Jeff Johnston wrote:
 If a configure.ac file is edited and the following added:
 
 LT_INIT
 AC_PROG_LIBTOOL

I think you shouldn't add both, BTW; AC_PROG_LIBTOOL is the
obsolescent name for LT_INIT AFAIK.

 The make can fail when it tries to do an automake and ltmain.sh
 is missing.

Note that even automake --add-missing wouldn't help you here,
because the ltmain.sh is provided by Libtool, not Automake, and
installed by 'libtoolize', not by 'automake'.

Still, for other, similar use cases (e.g., adding AC_PROG_CC_C_O
or AM_PROG_AR to configure.ac) your request sounds valid.

 How does one set up automake to use the --add-missing parameter
 automatically?

Currently, one can't.

 It's not recognized as an option to use with AM_INIT_AUTOMAKE,

Well, automake could be enhanced to recognize a add-missing option
in AM_INIT_AUTOMAKE too.  This would seem a good idea, but I need to
think about it more carefully, in case there is some a subtle reason
for the current beaviour, and against the proposed enhancement.

 and the generated call to AUTOMAKE in the Makefile does not use
 an option variable that can be set.

 Should this be used by default in the Makefile when maintainer
 mode is enabled?

I don't understand this question, sorry.  What do you refer to
with this here?

 -- Jeff J.


Thanks,
  Stefano



Re: Could the --add-missing option be supported in AM_INIT_AUTOMAKE?

2012-08-17 Thread Jeff Johnston

On 08/17/2012 07:03 AM, Stefano Lattarini wrote:

Severity: wishlist

[CC:ing bug-automake so that I won't forget about this issue]

On 08/17/2012 01:04 AM, Jeff Johnston wrote:

If a configure.ac file is edited and the following added:

LT_INIT
AC_PROG_LIBTOOL


I think you shouldn't add both, BTW; AC_PROG_LIBTOOL is the
obsolescent name for LT_INIT AFAIK.


Ok, the lines above were part of a bug report for the Eclipse CDT 
autotools plug-in and I just copied

it over.


The make can fail when it tries to do an automake and ltmain.sh
is missing.


Note that even automake --add-missing wouldn't help you here,
because the ltmain.sh is provided by Libtool, not Automake, and
installed by 'libtoolize', not by 'automake'.


The end-user ended up using autoreconf -i.  In that case, would it
make sense for maintainer mode to run autoreconf -i?


Still, for other, similar use cases (e.g., adding AC_PROG_CC_C_O
or AM_PROG_AR to configure.ac) your request sounds valid.


How does one set up automake to use the --add-missing parameter
automatically?


Currently, one can't.


It's not recognized as an option to use with AM_INIT_AUTOMAKE,


Well, automake could be enhanced to recognize a add-missing option
in AM_INIT_AUTOMAKE too.  This would seem a good idea, but I need to
think about it more carefully, in case there is some a subtle reason
for the current beaviour, and against the proposed enhancement.


and the generated call to AUTOMAKE in the Makefile does not use
an option variable that can be set.

Should this be used by default in the Makefile when maintainer
mode is enabled?


I don't understand this question, sorry.  What do you refer to
with this here?


I meant the --add-missing option when calling automake.

-- Jeff J.


Thanks,
   Stefano





[FYI] {maint} amversion: add missing dependency

2012-01-25 Thread Stefano Lattarini
* m4/Makefile.am ($(top_srcdir)/m4/amversion.m4): Depend on
configure.ac, since the value of $(VERSION) can change every
time configure.ac is updated.
---
 m4/Makefile.am |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/m4/Makefile.am b/m4/Makefile.am
index 4fa1406..b0e0d84 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -72,7 +72,7 @@ EXTRA_DIST = acdir/dirlist amversion.in
 # loop otherwise.
 # Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
 # how amversion.m4 appears in our dependencies.
-$(top_srcdir)/m4/amversion.m4: $(srcdir)/amversion.in
+$(top_srcdir)/m4/amversion.m4: $(top_srcdir)/configure.ac 
$(srcdir)/amversion.in
$(AM_V_at)sed \
-e 's,[@]VERSION[@],$(VERSION),g' \
-e 's,[@]APIVERSION[@],$(APIVERSION),g' \
-- 
1.7.7.3




Re: [FYI] {branch-1.11} tests: add missing dependency for some 'ar-lib*.test' tests

2012-01-12 Thread Stefano Lattarini
 Subject: [FYI] {branch-1.11} tests: add missing dependency for some 
 'ar-lib*.test' tests

Oops, wrong -- this patch hasn't been pushed to 'branch-1.11'.  Rather, it
has been pushed to the 'msvc' branch, and then merged into 'branch-1.11'.

Sorry for the noise,
  Stefano



[FYI] {branch-1.11} tests: add missing dependency for some 'ar-lib*.test' tests

2012-01-12 Thread Stefano Lattarini
This change fixes spurious failures of the tests ar-lib4.test,
ar-lib6a.test and ar-lib6b.test.

* tests/Makefile.am (ar-lib4.log): Depend explicitly on the
`libtool-macros.log' file.
(ar-lib6a.log, ar-lib6b.log): Likewise.
---
 tests/Makefile.am |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 52b5114..bf732e5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -958,6 +958,9 @@ $(parallel_tests)
 
 # FIXME: make these automatically computed once we are merged into
 # FIXME: the `testsuite-work' branch.
+ar-lib4.log: libtool-macros.log
+ar-lib6a.log: libtool-macros.log
+ar-lib6b.log: libtool-macros.log
 depcomp4.log: libtool-macros.log
 depcomp7.log: libtool-macros.log
 depcomp8b.log: libtool-macros.log
-- 
1.7.7.3




Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.

2011-09-05 Thread Stefano Lattarini
On Monday 05 September 2011, Peter Rosin wrote:
 Hi!

Hi Peter, thanks for the patch.

 This fixes a fail on Cygwin (and others I suppose).
 
 I'm aware that the lax non-gnu-tar branch adds even more laxness
 since $EXEEXT normally contains a dot for the oddball cases when
 it's non-empty, but that's so minor that I didn't bother to code
 around it...  Ok for maint?

I only have a minor nit: I'd prefer the extraction of `EXEEXT' from
Makefile to be done by something like this (avoiding use of eval):

 EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'`

And BTW, this could also be improved to allow escaping of literal
dots, as in:

 EXEEXT=`sed -n '/^EXEEXT *=/{ s/^EXEEXT *= *//; s/\./\\./g; p; }'`

WDYT?

Thanks,
  Stefano


Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.

2011-09-05 Thread Peter Rosin
Den 2011-09-05 10:06 skrev Stefano Lattarini:
 On Monday 05 September 2011, Peter Rosin wrote:
 Hi!

 Hi Peter, thanks for the patch.
 
 This fixes a fail on Cygwin (and others I suppose).

 I'm aware that the lax non-gnu-tar branch adds even more laxness
 since $EXEEXT normally contains a dot for the oddball cases when
 it's non-empty, but that's so minor that I didn't bother to code
 around it...  Ok for maint?

 I only have a minor nit: I'd prefer the extraction of `EXEEXT' from
 Makefile to be done by something like this (avoiding use of eval):
 
  EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'`
 
 And BTW, this could also be improved to allow escaping of literal
 dots, as in:
 
  EXEEXT=`sed -n '/^EXEEXT *=/{ s/^EXEEXT *= *//; s/\./\\./g; p; }'`
 
 WDYT?

I'm ok with your first alternative, but the second is undefined
according to posix (at least 'Limitations of usual tools' in
Autoconf states so; you can't have semicolon after a '{' verb)
and, even worse, it breaks for the gnu tar branch.

So, unless someone else chimes in I'm pushing with this

EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'  ../Makefile`

sometime later today.

Cheers,
Peter



Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.

2011-09-05 Thread Peter Rosin
Den 2011-09-05 11:37 skrev Stefano Lattarini:
 On Monday 05 September 2011, Peter Rosin wrote:
 Den 2011-09-05 10:06 skrev Stefano Lattarini:
 On Monday 05 September 2011, Peter Rosin wrote:
 Hi!

 Hi Peter, thanks for the patch.

 This fixes a fail on Cygwin (and others I suppose).

 I'm aware that the lax non-gnu-tar branch adds even more laxness
 since $EXEEXT normally contains a dot for the oddball cases when
 it's non-empty, but that's so minor that I didn't bother to code
 around it...  Ok for maint?

 I only have a minor nit: I'd prefer the extraction of `EXEEXT' from
 Makefile to be done by something like this (avoiding use of eval):

  EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'`

 And BTW, this could also be improved to allow escaping of literal
 dots, as in:

  EXEEXT=`sed -n '/^EXEEXT *=/{ s/^EXEEXT *= *//; s/\./\\./g; p; }'`

 WDYT?

 I'm ok with your first alternative, but the second is undefined
 according to posix (at least 'Limitations of usual tools' in
 Autoconf states so; you can't have semicolon after a '{' verb)

 Ah right; thank you for digging that up.
 
 and, even worse, it breaks for the gnu tar branch.

 Ouch!  Silly me for not thinking about that.

And the quoting was off too, should have been s/\././g to
do what you intended... :-)

 So, unless someone else chimes in I'm pushing with this

 EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'  ../Makefile`

 sometime later today.

 Fine by me.

Pushed now, thanks for looking!

Cheers,
Peter



Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.

2011-09-05 Thread Stefano Lattarini
On Monday 05 September 2011, Peter Rosin wrote:
 Den 2011-09-05 11:37 skrev Stefano Lattarini:
  Ouch!  Silly me for not thinking about that.
 
 And the quoting was off too, should have been s/\././g to
 do what you intended... :-)
 
Double ouch, you're right again!

  $ x=`echo a.b | sed 's/\./\\./g'`; printf '%s\n' $x
  a.b

I should really give up attemping to understand how the `\' escaping
works inside backticks... I've been burned so many times, sigh... :-(

And maybe it's about time to write a configure check that looks for a
POSIX shell, so that we can run our tests with it and dispense with
the clumsy workarounds for exotic bugs and limitations; most of the
framework is already in place anyway (e.g., automatic re-execing of
tests with the configure-time shell), so that shouldn't be too
difficult.  But I'm cooking another patch right now, so this will
have to wait.

 Pushed now, thanks for looking!


Regards,
  Stefano


* tests/amhello-binpkg.test: Add missing $EXEEXT usage.

2011-09-04 Thread Peter Rosin
Hi!

This fixes a fail on Cygwin (and others I suppose).

I'm aware that the lax non-gnu-tar branch adds even more laxness
since $EXEEXT normally contains a dot for the oddball cases when
it's non-empty, but that's so minor that I didn't bother to code
around it...

Ok for maint?

Cheers,
Peter

2011-09-05  Peter Rosin  p...@lysator.liu.se

* tests/amhello-binpkg.test: Add missing $EXEEXT usage.
From 396f69c65ddc01ebbcfcccb59381a80b9c050b1a Mon Sep 17 00:00:00 2001
From: Peter Rosin p...@lysator.liu.se
Date: Mon, 5 Sep 2011 00:31:48 +0200
Subject: [PATCH] * tests/amhello-binpkg.test: Add missing $EXEEXT usage.

Signed-off-by: Peter Rosin p...@lysator.liu.se
---
 ChangeLog |6 +-
 tests/amhello-binpkg.test |8 +---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index add6c9c..b768311 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-2011-09-04 Stefano Lattarini  stefano.lattar...@gmail.com
+2011-09-05  Peter Rosin  p...@lysator.liu.se
+
+	* tests/amhello-binpkg.test: Add missing $EXEEXT usage.
+
+2011-09-04  Stefano Lattarini  stefano.lattar...@gmail.com
 
 	fix: list test 'vala-vpath.test' in XFAIL_TESTS
 	* tests/Makefile.am (XFAIL_TESTS): Update.
diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test
index f11421f..165078c 100755
--- a/tests/amhello-binpkg.test
+++ b/tests/amhello-binpkg.test
@@ -34,16 +34,18 @@ cd inst
 find . -type f -print  ../files.lst
 tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst`  tar.got 21
 
+eval `sed -n -e 's/^EXEEXT = /EXEEXT=/p'  ../Makefile`
+
 if tar --version /dev/null | grep GNU; then
   LC_ALL=C sort tar.got  t
   mv -f t tar.got
-  diff - tar.got 'END'
-./usr/bin/hello
+  diff - tar.got END
+./usr/bin/hello$EXEEXT
 ./usr/share/doc/amhello/README
 END
 else
   : Be laxer with other tar implementations, to avoid spurious failures.
-  $EGREP '(^| )\./usr/bin/hello( |$)' tar.got
+  $EGREP '(^| )\./usr/bin/hello'$EXEEXT'( |$)' tar.got
   $EGREP '(^| )\./usr/share/doc/amhello/README( |$)' tar.got
 fi
 
-- 
1.7.5.1



Re: [PATCH] {testsuite-work} tests: extend tests on `--add-missing' and `--copy' a bit

2011-06-16 Thread Stefano Lattarini
On Monday 13 June 2011, Stefano Lattarini wrote:
 On Monday 13 June 2011, Stefano Lattarini wrote:
  References:
   http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00048.html
   http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00065.html
  
  I've pushed this patch now.
  
  Regards,
Stefano
  
 I'd like also to add the attached patch, which offers a small increase
 in coverage of possible use cases.  I'll push in 48 hours if there is no
 objection by then.
 
 Regards,
   Stefano
 
Pushed now.

Regards,
  Stefano



[PATCH] {testsuite-work} tests: extend tests on `--add-missing' and `--copy' a bit

2011-06-13 Thread Stefano Lattarini
On Monday 13 June 2011, Stefano Lattarini wrote:
 References:
  http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00048.html
  http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00065.html
 
 I've pushed this patch now.
 
 Regards,
   Stefano
 
I'd like also to add the attached patch, which offers a small increase
in coverage of possible use cases.  I'll push in 48 hours if there is no
objection by then.

Regards,
  Stefano
From fb4ca27a3992f229def170dffeb2c1c8c23d9478 Mon Sep 17 00:00:00 2001
Message-Id: fb4ca27a3992f229def170dffeb2c1c8c23d9478.1307986986.git.stefano.lattar...@gmail.com
From: Stefano Lattarini stefano.lattar...@gmail.com
Date: Mon, 13 Jun 2011 19:42:52 +0200
Subject: [PATCH] tests: extend tests on `--add-missing' and `--copy' a bit

* tests/add-missing.test: Fix typo in heading comments.  Try with
another testcase that install many (but not all) the auxiliary
scripts at once, and uses non-standard (but valid and documented)
setups (e.g., defining YACC in Makefile.am instead of calling
AC_PROG_YACC from configure.in).
* tests/copy.test: Reference `add-missing.test' in heading
comments.  Try few more test scenarios.
---
 ChangeLog  |   11 +
 tests/add-missing.test |   23 ++-
 tests/copy.test|   58 
 3 files changed, 91 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a41dfdf..7139ccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-06-13  Stefano Lattarini  stefano.lattar...@gmail.com
+
+	tests: extend tests on `--add-missing' and `--copy' a bit
+	* tests/add-missing.test: Fix typo in heading comments.  Try with
+	another testcase that install many (but not all) the auxiliary
+	scripts at once, and uses non-standard (but valid and documented)
+	setups (e.g., defining YACC in Makefile.am instead of calling
+	AC_PROG_YACC from configure.in).
+	* tests/copy.test: Reference `add-missing.test' in heading
+	comments.  Try few more test scenarios.
+
 2011-06-10  Stefano Lattarini  stefano.lattar...@gmail.com
 
 	tests: new test dedicated to `--add-missing' and `--copy'
diff --git a/tests/add-missing.test b/tests/add-missing.test
index f16da39..d6729f3 100755
--- a/tests/add-missing.test
+++ b/tests/add-missing.test
@@ -17,7 +17,7 @@
 # Test that automake complains when required auxiliary files are not
 # found, and that `automake --add-missing' installs the files (and only
 # the files) it's supposed to, and that these files are symlinked by
-# default, but copied if the `--install' option is used.
+# default, but copied if the `--copy' option is used.
 
 . ./defs || Exit 1
 
@@ -297,4 +297,25 @@ AM_PATH_PYTHON
 python_PYTHON = foo.py
 END
 
+: %%% few unrelated auxiliary scripts together %%%
+check_ 'END'
+== Files ==
+py-compile
+depcomp
+ylwrap
+config.sub
+config.guess
+== configure.in ==
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_PROG_CXX
+== Makefile.am ==
+PYTHON = python
+pythondir = $(prefix)/py
+YACC = bison -y
+bin_PROGRAMS = foo
+foo_SOURCES = bar.yxx baz.c++
+python_PYTHON = zardoz.py
+END
+
 :
diff --git a/tests/copy.test b/tests/copy.test
index 714f722..3eb1c9e 100755
--- a/tests/copy.test
+++ b/tests/copy.test
@@ -16,16 +16,74 @@
 # along with this program.  If not, see http://www.gnu.org/licenses/.
 
 # Test to make sure `-c' works.  Report from Andris Pavenis.
+# See also the much more in-depth test `add-missing'.
 
 . ./defs || Exit 1
 
+# First a simple test, where the auxdir is automatically determined
+# by automake.
+
 :  Makefile.am
 rm -f install-sh
 
 $ACLOCAL
 $AUTOMAKE -c -a
+ls -l # For debugging.
 
 test -f install-sh
 test ! -h install-sh
 
+# Let's do a couple of more elaborated tests, this time with the auxdir
+# explicitly defined in configure.in.
+
+mkdir sub
+cd sub
+
+cat  configure.in END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat  Makefile.am END
+bin_PROGRAMS = foo
+END
+
+$ACLOCAL
+
+# `automake -a' called without `-c' should create symlinks by default,
+# even when there is already a non-symlinked required auxiliary file.
+
+mkdir auxdir
+echo FAKE-DEPCOMP  auxdir/depcomp
+$AUTOMAKE -a
+ls -l auxdir # For debugging.
+test -f auxdir/install-sh
+test -h auxdir/install-sh
+test -f auxdir/depcomp
+test ! -h auxdir/depcomp
+test FAKE-DEPCOMP = `cat auxdir/depcomp`
+
+# `automake -a -c' should not create symlinks, even when there are
+# already symlinked required auxiliary files.
+
+rm -rf auxdir
+mkdir auxdir
+cd auxdir
+ln -s $top_testsrcdir/lib/missing $top_testsrcdir/lib/install-sh .
+cd ..
+
+$AUTOMAKE -a -c
+ls -l auxdir # For debugging.
+test -f auxdir/install-sh
+test -h auxdir/install-sh
+test -f auxdir/missing
+test -h auxdir/missing
+test -f auxdir/depcomp
+test ! -h auxdir/depcomp
+diff $top_testsrcdir/lib/depcomp auxdir/depcomp
+
 :
-- 
1.7.2.3



Re: [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/')

2011-06-12 Thread Stefano Lattarini
References:
 http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00048.html
 http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00065.html

I've pushed this patch now.

Regards,
  Stefano



Re: [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/')

2011-06-10 Thread Stefano Lattarini
On Wednesday 08 June 2011, Stefano Lattarini wrote:
 On Tuesday 07 June 2011, Stefano Lattarini wrote:
  On Tuesday 07 June 2011, Stefano Lattarini wrote:
   On Tuesday 07 June 2011, Peter Rosin wrote:
 This test no longer checks if $AUTOMAKE -a copies over compile, as
 that is done manually now. I assume this aspect of $AUTOMAKE -a is
 tested elsewhere. Or is it?

 Yes, in 'subobj.test'.

The same argument could be made about the other instances where the
script is brought in explicitly. Seems like a bit of a fluke that
subobj.test covered the compile script.
   
   Agreed.  I now think we should have a centralized test where to check
   for files installed with `--add-missing', not to risk reduced coverage
   anymore.  Patch coming up soon ...
   
  Done in the attached patch.  It is more complex than I'd like, so I'll
  wait until sunday or so before pushing, to allow more time for reviews.
  
  Regards,
Stefano
  
 A couple of minor fixes I'd like to squash in.   First, a typofix in a
 comment; second, an internal sanity check looking out for bogus input
 passed to the `check_' subroutine.
 
 Regards,
Stefano
 
 -*-*-*-
 
 diff --git a/tests/add-missing.test b/tests/add-missing.test
 index a8742f6..e460a95 100755
 --- a/tests/add-missing.test
 +++ b/tests/add-missing.test
 @@ -94,6 +94,7 @@ check_ ()
'== Makefile.am ==') what=Makefile.am;;
'== configure.in ==') what=configure.in;;
'== Files ==') what=LIST;;
 +  '==.*') framework_failure_ invalid input line: $line;;
''|'#%'*)
  : empty line or ad-hoc comment, ignore;;
*)
 @@ -210,7 +211,7 @@ check_ --run-aclocal 'END'
  compile
  == configure.in ==
  # Using AM_PROG_CC_C_O in configure.in should be enough.  No need to
 -# use AC_PROG_CC too, not to define xxx_PROGRAMS in Makefile.am.
 +# use AC_PROG_CC too, nor to define xxx_PROGRAMS in Makefile.am.
  AM_PROG_CC_C_O
  END
 
And for some reason I've forgotten to add check for config.guess and
config.sub.  Sigh.

Here is what I've squashed in; the updated patch is attached, for
reference.

-*-*-

  diff --git a/tests/add-missing.test b/tests/add-missing.test
  index e460a95..9d6da7a 100755
  --- a/tests/add-missing.test
  +++ b/tests/add-missing.test
  @@ -39,9 +39,12 @@ AM_INIT_AUTOMAKE
   AC_CONFIG_FILES([Makefile])
   END
 
  -# Pre-compute aclocal.m4 to save a lot aclocal invocations.
  +# Pre-compute aclocal.m4, in order to save several aclocal invocations.
   cat  configure.in 'END'
   AC_PROG_CC
  +AC_CANONICAL_BUILD
  +AC_CANONICAL_HOST
  +AC_CANONICAL_TARGET
   AM_PATH_LISPDIR
   AM_PATH_PYTHON
   END
  @@ -215,6 +218,18 @@ compile
   AM_PROG_CC_C_O
   END
 
  +: %%% config.guess and config.sub %%%
  +
  +for macro in AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET; do
  +  check_ END
  +== Files ==
  +config.sub
  +config.guess
  +== configure.in ==
  +$macro
  +END
  +done
  +
   : %%% ylwrap with Lex %%%
   check_ 'END'
   == Files ==

-*-*-

It might also be worth noting that I haven't added check for ansi2knr.c
and ansi2knr.1; that's because the de-ansification features in automake
are expected to be removed in 1.12, being basically obsolete by now.

Regards,
  Stefano
From c13dac34e870e118f36df01bc29bb8bf0d6ec625 Mon Sep 17 00:00:00 2001
Message-Id: c13dac34e870e118f36df01bc29bb8bf0d6ec625.1307721171.git.stefano.lattar...@gmail.com
From: Stefano Lattarini stefano.lattar...@gmail.com
Date: Tue, 7 Jun 2011 22:49:28 +0200
Subject: [PATCH] tests: new test dedicated to `--add-missing' and `--copy'

* tests/add-missing.test: New test.
* tests/Makefile.am (TESTS): Update.

Suggested by Peter Rosin.
---
 ChangeLog  |7 +
 tests/Makefile.am  |1 +
 tests/Makefile.in  |1 +
 tests/add-missing.test |  300 
 4 files changed, 309 insertions(+), 0 deletions(-)
 create mode 100755 tests/add-missing.test

diff --git a/ChangeLog b/ChangeLog
index 569f44a..94f44c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-07  Stefano Lattarini  stefano.lattar...@gmail.com
+
+	tests: new test dedicated to `--add-missing' and `--copy'
+	* tests/add-missing.test: New test.
+	* tests/Makefile.am (TESTS): Update.
+	Suggested by Peter Rosin.
+
 2011-06-02  Stefano Lattarini  stefano.lattar...@gmail.com
 
 	self tests: fix another spurious failure
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d863b28..3c157c1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -150,6 +150,7 @@ acoutbs2.test \
 acsilent.test \
 acsubst.test \
 acsubst2.test \
+add-missing.test \
 all.test \
 all2.test \
 alloca.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d2975d7..0b29184 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -438,6 +438,7 @@ acoutbs2.test \
 acsilent.test \
 acsubst.test \
 acsubst2.test \
+add-missing.test \
 all.test \
 all2.test \
 alloca.test \
diff --git a/tests/add-missing.test b/tests

Re: [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/')

2011-06-08 Thread Stefano Lattarini
On Tuesday 07 June 2011, Stefano Lattarini wrote:
 On Tuesday 07 June 2011, Stefano Lattarini wrote:
  On Tuesday 07 June 2011, Peter Rosin wrote:
This test no longer checks if $AUTOMAKE -a copies over compile, as
that is done manually now. I assume this aspect of $AUTOMAKE -a is
tested elsewhere. Or is it?
   
Yes, in 'subobj.test'.
   
   The same argument could be made about the other instances where the
   script is brought in explicitly. Seems like a bit of a fluke that
   subobj.test covered the compile script.
  
  Agreed.  I now think we should have a centralized test where to check
  for files installed with `--add-missing', not to risk reduced coverage
  anymore.  Patch coming up soon ...
  
 Done in the attached patch.  It is more complex than I'd like, so I'll
 wait until sunday or so before pushing, to allow more time for reviews.
 
 Regards,
   Stefano
 
A couple of minor fixes I'd like to squash in.   First, a typofix in a
comment; second, an internal sanity check looking out for bogus input
passed to the `check_' subroutine.

Regards,
   Stefano

-*-*-*-

diff --git a/tests/add-missing.test b/tests/add-missing.test
index a8742f6..e460a95 100755
--- a/tests/add-missing.test
+++ b/tests/add-missing.test
@@ -94,6 +94,7 @@ check_ ()
   '== Makefile.am ==') what=Makefile.am;;
   '== configure.in ==') what=configure.in;;
   '== Files ==') what=LIST;;
+  '==.*') framework_failure_ invalid input line: $line;;
   ''|'#%'*)
 : empty line or ad-hoc comment, ignore;;
   *)
@@ -210,7 +211,7 @@ check_ --run-aclocal 'END'
 compile
 == configure.in ==
 # Using AM_PROG_CC_C_O in configure.in should be enough.  No need to
-# use AC_PROG_CC too, not to define xxx_PROGRAMS in Makefile.am.
+# use AC_PROG_CC too, nor to define xxx_PROGRAMS in Makefile.am.
 AM_PROG_CC_C_O
 END




[PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/')

2011-06-07 Thread Stefano Lattarini
On Tuesday 07 June 2011, Stefano Lattarini wrote:
 On Tuesday 07 June 2011, Peter Rosin wrote:
   This test no longer checks if $AUTOMAKE -a copies over compile, as
   that is done manually now. I assume this aspect of $AUTOMAKE -a is
   tested elsewhere. Or is it?
  
   Yes, in 'subobj.test'.
  
  The same argument could be made about the other instances where the
  script is brought in explicitly. Seems like a bit of a fluke that
  subobj.test covered the compile script.
 
 Agreed.  I now think we should have a centralized test where to check
 for files installed with `--add-missing', not to risk reduced coverage
 anymore.  Patch coming up soon ...
 
Done in the attached patch.  It is more complex than I'd like, so I'll
wait until sunday or so before pushing, to allow more time for reviews.

Regards,
  Stefano
From fa7fddaad1a5c79d96d18bf2051df19ec9ec07eb Mon Sep 17 00:00:00 2001
Message-Id: fa7fddaad1a5c79d96d18bf2051df19ec9ec07eb.1307480921.git.stefano.lattar...@gmail.com
From: Stefano Lattarini stefano.lattar...@gmail.com
Date: Tue, 7 Jun 2011 22:49:28 +0200
Subject: [PATCH] tests: new test dedicated to `--add-missing' and `--copy'

* tests/add-missing.test: New test.
* tests/Makefile.am (TESTS): Update.

Suggested by Peter Rosin.
---
 ChangeLog  |7 +
 tests/Makefile.am  |1 +
 tests/Makefile.in  |1 +
 tests/add-missing.test |  284 
 4 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100755 tests/add-missing.test

diff --git a/ChangeLog b/ChangeLog
index 569f44a..94f44c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-07  Stefano Lattarini  stefano.lattar...@gmail.com
+
+	tests: new test dedicated to `--add-missing' and `--copy'
+	* tests/add-missing.test: New test.
+	* tests/Makefile.am (TESTS): Update.
+	Suggested by Peter Rosin.
+
 2011-06-02  Stefano Lattarini  stefano.lattar...@gmail.com
 
 	self tests: fix another spurious failure
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d863b28..3c157c1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -150,6 +150,7 @@ acoutbs2.test \
 acsilent.test \
 acsubst.test \
 acsubst2.test \
+add-missing.test \
 all.test \
 all2.test \
 alloca.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d2975d7..0b29184 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -438,6 +438,7 @@ acoutbs2.test \
 acsilent.test \
 acsubst.test \
 acsubst2.test \
+add-missing.test \
 all.test \
 all2.test \
 alloca.test \
diff --git a/tests/add-missing.test b/tests/add-missing.test
new file mode 100755
index 000..a8742f6
--- /dev/null
+++ b/tests/add-missing.test
@@ -0,0 +1,284 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see http://www.gnu.org/licenses/.
+
+# Test that automake complains when required auxiliary files are not
+# found, and that `automake --add-missing' installs the files (and only
+# the files) it's supposed to, and that these files are symlinked by
+# default, but copied if the `--install' option is used.
+
+. ./defs || Exit 1
+
+build_aux=build-aux
+
+# Try to improve readability of displayed diffs.
+if diff -u /dev/null /dev/null; then
+  am_diff='diff -u'
+elif diff -c /dev/null /dev/null; then
+  am_diff='diff -c'
+else
+  am_diff=diff
+fi
+
+cat  configure.stub  END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([$build_aux])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+
+# Pre-compute aclocal.m4 to save a lot aclocal invocations.
+cat  configure.in 'END'
+AC_PROG_CC
+AM_PATH_LISPDIR
+AM_PATH_PYTHON
+END
+$ACLOCAL || framework_failure_ cannot pre-compute aclocal.m4
+
+rm -rf install-sh missing depcomp configure.in autom4te*.cache
+mv aclocal.m4 aclocal.stub
+
+cat configure.stub # For debugging.
+cat aclocal.stub   # Likewise.
+
+# This is hacky and ugly and complex, but allow us to organize our tests
+# below in a more declarative fashion.  All in all, a good trade-off.
+check_ ()
+{
+  set +x # Temporary disable shell traces to remove noise from log files.
+  override=no
+  run_aclocal=no
+  extra_files=
+  while test $# -gt 0; do
+case $1 in
+  --override) override=yes;;
+  --run-aclocal) run_aclocal=yes;;
+  --extra-file*) extra_files=$with_files $2; shift;;
+  *) framework_failure_ check_: invalid argument '$1';;
+esac
+shift
+  done
+  mkdir testdir-generic
+  cd

[FYI] NEWS: Add missing blank line between two entries.

2010-12-23 Thread Stefano Lattarini
I pushed this to master.

Regards,
   Stefano

---
 ChangeLog |4 
 NEWS  |1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 39a42a6..56aa429 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-12-23  Stefano Lattarini  stefano.lattar...@gmail.com
 
+   * NEWS: Add missing blank line between two entries.
+
+2010-12-23  Stefano Lattarini  stefano.lattar...@gmail.com
+
Improve and extend tests `suffix*.test'.
* tests/suffix.test: Check that suffix rules for C compilation are
only included once.  Try also with a static library.
diff --git a/NEWS b/NEWS
index 37f018f..a7c5914 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ New in 1.11a:
 * Changes to automake:
 
   - automake now generates silenced rules for texinfo outputs.
+
   - The deprecated options `--output-dir', `--Werror' and `--Wno-error'
 have been removed.
 
-- 
1.7.2.3




Re: Add missing bootstrap file

2009-11-16 Thread Alfred M. Szmidt
You didn't answer why you need this switch, only that you want it.




Re: Add missing bootstrap file

2009-11-16 Thread Ralf Wildenhues
Hi Alfred,

* Alfred M. Szmidt wrote on Mon, Nov 16, 2009 at 08:33:10PM CET:
 You didn't answer why you need this switch, only that you want it.

Various threads on this list during the last months document this,
I would say.  It otherwise isn't even hard to guess.  ;-)

Cheers,
Ralf




Re: Add missing bootstrap file

2009-11-15 Thread Alfred M. Szmidt
   Index: automake/m4/init.m4
   ===
   --- automake.orig/m4/init.m4
   +++ automake/m4/init.m4
   @@ -107,6 +107,7 @@ dnl is hooked onto _AC_COMPILER_EXEEXT e
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
  [AM_CONDITIONAL([am__EXEEXT], [test -n $EXEEXT])])])dnl
   +AM_SILENT_RULES([yes])
])

Why is this needed?  Maybe the problem can be solved in a better way.




Re: Add missing bootstrap file

2009-11-15 Thread Jan Engelhardt

[Note that this has nothing to do with the bootstrap file]


On Sunday 2009-11-15 17:44, Alfred M. Szmidt wrote:

   Index: automake/m4/init.m4
   ===
   --- automake.orig/m4/init.m4
   +++ automake/m4/init.m4
   @@ -107,6 +107,7 @@ dnl is hooked onto _AC_COMPILER_EXEEXT e
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
  [AM_CONDITIONAL([am__EXEEXT], [test -n $EXEEXT])])])dnl
   +AM_SILENT_RULES([yes])
])

Why is this needed?  Maybe the problem can be solved in a better way.

Because I want it for everything that I run autoreconf on, regardless of 
whether a package added enough goo to enable it or not. It is thus 
needed in init.m4, because a previously-existing configure may not have 
included the verbosity messages at all.




Re: Add missing bootstrap file

2009-11-14 Thread Ralf Wildenhues
Hi Jan,

* Jan Engelhardt wrote on Mon, Nov 09, 2009 at 02:09:14AM CET:
 in the automake tarballs, the 'bootstrap' script is missing, but it 
 would be needed when modifying any of the automake files in a tarball. 

Sounds reasonable to me, esp. since it doesn't even use git in any way
(yet).

 In other words, when used in an rpm build script:
 
 Source:   automake-1.11.tar.bz2
 Patch1:   foobar.diff modifying m4/init.m4

BTW, what's in that patch?

Thanks,
Ralf




Re: Add missing bootstrap file

2009-11-14 Thread Gaetan Nadon
On Sat, 2009-11-14 at 14:06 +0100, Ralf Wildenhues wrote:

 Hi Jan,
 
 * Jan Engelhardt wrote on Mon, Nov 09, 2009 at 02:09:14AM CET:
  in the automake tarballs, the 'bootstrap' script is missing, but it 
  would be needed when modifying any of the automake files in a tarball. 
 
 Sounds reasonable to me, esp. since it doesn't even use git in any way
 (yet).
 

I have recently downloaded from the GNU site various versions of
automake. I did what the INSTALL file tells me to do. Run ./configure
and then make. I had no other automake version installed. It worked
right away in all cases. I don't see why any file would be missing in
the automake traball. At first, I did not have autoconf installed, so
automake told me it was missing. The INSTALL file is not talking about
any boostrap file.

If you want to modify files in automake, then you are doing development,
rather than just installing the software. Given that automake requires
itself, there may be special things to do. In any case, nothing should
be added to the tarball that isn't required for installation.

I hope it helps.


  In other words, when used in an rpm build script:
  
  Source: automake-1.11.tar.bz2
  Patch1: foobar.diff modifying m4/init.m4
 
 BTW, what's in that patch?
 
 Thanks,
 Ralf
 
 


Re: Add missing bootstrap file

2009-11-14 Thread Peter Johansson

Gaetan Nadon wrote:


If you want to modify files in automake, then you are doing development,
rather than just installing the software. Given that automake requires
itself, there may be special things to do. In any case, nothing should
be added to the tarball that isn't required for installation.

  
From where did you get that rule? It doesn't go very well with the fact 
that automake by default adds Makefile.am, configure.ac and other .m4 
files to the tarball. Those files will never be useful for a pure 
./configure; make; make install, but as soon as you wanna fix a bug or 
just modify the package you'll be happy those files are around.


Peter




Re: Add missing bootstrap file

2009-11-14 Thread Gaetan Nadon
On Sat, 2009-11-14 at 09:35 -0500, Peter Johansson wrote:

 Gaetan Nadon wrote:
 
  If you want to modify files in automake, then you are doing development,
  rather than just installing the software. Given that automake requires
  itself, there may be special things to do. In any case, nothing should
  be added to the tarball that isn't required for installation.
 

  From where did you get that rule? It doesn't go very well with the fact 
 that automake by default adds Makefile.am, configure.ac and other .m4 
 files to the tarball. Those files will never be useful for a pure 
 ./configure; make; make install, but as soon as you wanna fix a bug or 
 just modify the package you'll be happy those files are around.
 

I messed up my point, sorry. Based on my experience, there is nothing
missing, but I cannot prove it. 


 Peter


Re: Add missing bootstrap file

2009-11-14 Thread Jan Engelhardt

On Saturday 2009-11-14 14:06, Ralf Wildenhues wrote:

Hi Jan,

* Jan Engelhardt wrote on Mon, Nov 09, 2009 at 02:09:14AM CET:
 in the automake tarballs, the 'bootstrap' script is missing, but it 
 would be needed when modifying any of the automake files in a tarball. 

Sounds reasonable to me, esp. since it doesn't even use git in any way
(yet).

 In other words, when used in an rpm build script:
 
 Source:  automake-1.11.tar.bz2
 Patch1:  foobar.diff modifying m4/init.m4

BTW, what's in that patch?

You sure don't want to have it.

---
 m4/init.m4 |1 +
 1 file changed, 1 insertion(+)

Index: automake/m4/init.m4
===
--- automake.orig/m4/init.m4
+++ automake/m4/init.m4
@@ -107,6 +107,7 @@ dnl is hooked onto _AC_COMPILER_EXEEXT e
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n $EXEEXT])])])dnl
+AM_SILENT_RULES([yes])
 ])
 
 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not




Re: Add missing bootstrap file

2009-11-14 Thread Bob Friesenhahn

On Sat, 14 Nov 2009, Peter Johansson wrote:


From where did you get that rule? It doesn't go very well with the fact that 
automake by default adds Makefile.am, configure.ac and other .m4 files to the 
tarball. Those files will never be useful for a pure ./configure; make; make 
install, but as soon as you wanna fix a bug or just modify the package you'll 
be happy those files are around.


Yes, and these added files assist with assuring compliance with the 
GPL, which requires that all original source files and scripts that 
the developer needs to build and install the software are included, or 
otherwise formally made available.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/




Add missing bootstrap file

2009-11-08 Thread Jan Engelhardt
Hi,


in the automake tarballs, the 'bootstrap' script is missing, but it 
would be needed when modifying any of the automake files in a tarball. 
In other words, when used in an rpm build script:

Source: automake-1.11.tar.bz2
Patch1: foobar.diff modifying m4/init.m4

Not running bootstrap after applying Patch1 causes configure/make to fail:

+ ./configure
[...]
+ make
CDPATH=${ZSH_VERSION+.}:  cd .  
perllibdir=/usr/src/packages/BUILD/automake-1.11/lib:./lib 
/usr/src/packages/BUILD/automake-1.11/aclocal --acdir=m4 -I m4
/bin/sh: /usr/src/packages/BUILD/automake-1.11/aclocal: No such file or 
directory
make: *** [aclocal.m4] Error 127
error: Bad exit status from /var/tmp/rpm-tmp.CEw4fJ (%build)

Please provide the bootstrap script in the next release tarballs instead
of just the git tree.

Thanks,
Jan




Parallel automake --add-missing: serialized file installs. [4/4]

2008-10-26 Thread Ralf Wildenhues
The final piece.  A bit ugly because the changes in require_conf_file
depend on nonlocal semantics in require_file_internal and in
maybe_push_required_file.  Oh well.

Cheers,
Ralf

Parallel automake --add-missing: serialized file installs.
* automake.in (QUEUE_CONF_FILE, QUEUE_LOCATION, QUEUE_STRING):
New serialization keys.
($required_conf_file_queue): New file global.
(queue_required_conf_file, require_queued_conf_file): New
functions, to queue and dequeue requirements for aux dir files.
(require_conf_file): Enqueue if needed.
(get_number_of_threads): Can do threads with --add-missing now.
(handle_makefiles_threaded): Let worker threads enqueue, let
master attend to queued requirements at the right time.
* tests/parallel-am.test: Explain the purpose of the include
chain used here.
* tests/parallel-am2.test: Also cope with --add-missing.
* tests/parallel-am3.test: New test, test absence of races with
concurrent same-file installs stemming from --add-missing.
* tests/Makefile.am: Adjust.

diff --git a/automake.in b/automake.in
index d7db627..0815773 100755
--- a/automake.in
+++ b/automake.in
@@ -280,6 +280,9 @@ use constant INTERNAL = new Automake::Location;
 # Serialization keys for message queues.
 use constant {
   QUEUE_MESSAGE   = msg,
+  QUEUE_CONF_FILE = conf file,
+  QUEUE_LOCATION  = location,
+  QUEUE_STRING= string
 };
 
 
@@ -7475,13 +7478,80 @@ sub require_libsource_with_macro ($$$@)
   }
 }
 
+# Queue to push require_conf_file requirements to.
+my $required_conf_file_queue;
+
+# queue_required_conf_file ($QUEUE, $KEY, $DIR, $WHERE, $MYSTRICT, @FILES)
+# -
+sub queue_required_conf_file (@)
+{
+my ($queue, $key, $dir, $where, $mystrict, @files) = @_;
+my @serial_loc;
+if (ref $where)
+  {
+@serial_loc = (QUEUE_LOCATION, $where-serialize ());
+  }
+else
+  {
+@serial_loc = (QUEUE_STRING, $where);
+  }
+$queue-enqueue ($key, $dir, @serial_loc, $mystrict, 0 + @files, @files);
+}
+
+# require_queued_conf_file ($QUEUE)
+# --
+sub require_queued_conf_file ($)
+{
+my ($queue) = @_;
+my $where;
+my $dir = $queue-dequeue ();
+my $loc_key = $queue-dequeue ();
+if ($loc_key eq QUEUE_LOCATION)
+  {
+   $where = Automake::Location::deserialize ($queue);
+  }
+elsif ($loc_key eq QUEUE_STRING)
+  {
+   $where = $queue-dequeue ();
+  }
+else
+  {
+   prog_error unexpected key $loc_key;
+  }
+my $mystrict = $queue-dequeue ();
+my $nfiles = $queue-dequeue ();
+my @files;
+push @files, $queue-dequeue ()
+  foreach (1 .. $nfiles);
+
+# Dequeuing happens outside of per-makefile context, so we have to
+# set the variables used by require_file_internal and the functions
+# it calls.  Gross!
+$relative_dir = $dir;
+require_file_internal ($where, $mystrict, $config_aux_dir, @files);
+}
+
 # require_conf_file ($WHERE, $MYSTRICT, @FILES)
 # --
-# Looks in configuration path, as specified by AC_CONFIG_AUX_DIR.
+# Looks in configuration path, as specified by AC_CONFIG_AUX_DIR;
+# worker threads may queue up the action to be serialized by the master.
+#
+# FIXME: this seriously relies on the semantics of require_file_internal
+# and maybe_push_required_file, in that we exploit the fact that only the
+# contents of the last handled output file may be impacted (which in turn
+# is dealt with by the master thread).
 sub require_conf_file ($$@)
 {
 my ($where, $mystrict, @files) = @_;
-require_file_internal ($where, $mystrict, $config_aux_dir, @files);
+if (defined $required_conf_file_queue)
+  {
+   queue_required_conf_file ($required_conf_file_queue, QUEUE_CONF_FILE,
+ $relative_dir, $where, $mystrict, @files);
+  }
+else
+  {
+   require_file_internal ($where, $mystrict, $config_aux_dir, @files);
+  }
 }
 
 
@@ -8051,11 +8121,6 @@ sub get_number_of_threads
 {
   $nthreads = $max_threads;
 }
-
-  # We cannot deal with --add-missing (yet).
-  $nthreads = 0
-if ($add_missing);
-
   return $nthreads;
 }
 
@@ -8066,6 +8131,7 @@ sub get_number_of_threads
 # worker threads push back everything that needs serialization:
 # * warning and (normal) error messages, for stable stderr output
 #   order and content (avoiding duplicates, for example),
+# * races when installing aux files (and respective messages),
 # * races when collecting aux files for distribution.
 #
 # The latter requires that the makefile that deals with the aux dir
@@ -8101,9 +8167,11 @@ sub handle_makefiles_threaded ($)
  verb handling $file;
  my $queue = $msg_queues{$file};
  setup_channel_queue ($queue

Passing --add-missing when rebuilding Makefile.in

2007-10-30 Thread Benoit SIGOURE

Hi list,
I find it annoying that when I have a (very) small package to which I  
add AC_PROG_CC (for instance) in configure.ac, the next invocation of  
`make' will fail:


cd .  /bin/sh /tmp/ac/missing --run aclocal-1.10
cd .  /bin/sh /tmp/ac/missing --run automake-1.10 --foreign
Makefile.am: required file `./depcomp' not found
Makefile.am:   `automake --add-missing' can install `depcomp'
make: *** [Makefile.in] Error 1

Would it be a problem if --add-missing was always passed to automake  
at this point?


Cheers,

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory




PGP.sig
Description: This is a digitally signed message part


Re: Passing --add-missing when rebuilding Makefile.in

2007-10-30 Thread Ralf Wildenhues
Hello Benoit,

* Benoit SIGOURE wrote on Tue, Oct 30, 2007 at 08:09:52AM CET:
 I find it annoying that when I have a (very) small package to which I add 
 AC_PROG_CC (for instance) in configure.ac, the next invocation of `make' 
 will fail:

 cd .  /bin/sh /tmp/ac/missing --run aclocal-1.10
 cd .  /bin/sh /tmp/ac/missing --run automake-1.10 --foreign
 Makefile.am: required file `./depcomp' not found
 Makefile.am:   `automake --add-missing' can install `depcomp'
 make: *** [Makefile.in] Error 1

 Would it be a problem if --add-missing was always passed to automake at 
 this point?

It would be an uncontrollable point in time where the developer must
take care that files are added to the source tree which she may want
to put in version control.  Not all developers omit installed and
generated files from version control!  For them it's good to delimit
when such files are added.

To answer your (presumably) next question: if you add a C-compiled
program for the first time in this Makefile.am, and issue `make',
the missing `depfiles' argument will cause .deps/* not to be
created.  No, I don't know a good solution to that.

Cheers,
Ralf




Re: --add-missing

2007-07-24 Thread Ralf Wildenhues
Hello Eric,

* Eric Polino wrote on Tue, Jul 24, 2007 at 06:00:44AM CEST:

 Here lies the problem.  If I run toplevel/ag.sh it creates
 finch/libgnt/Makefile.in, as it always has and should.  Within there
 it generates a variable called DIST_COMMON which doesn't reference the
 automake scripts such as 'install-sh'.  If I then run
 finch/libgnt/ag.sh it will regenerate f/l/Makefile.in to where
 DIST_COMMON now contains 'install-sh' but it references the one in
 toplevel/ instead of one located in libgnt/.

 DIST_COMMON=. ../../install-sh 

 On the other hand if I run finch/libgnt/ag.sh first, it generates
 Makefile.in with DIST_COMMON having 'install-sh' located in libgnt/

 DIST_COMMON=.. install.sh 

 The latter behavior is what I want to get.  Is there a way I can get
 the latter outcome by doing the former procedure while still
 preserving the latter procedure/outcome pair?

Put `AC_CONFIG_AUX_DIR([.])' in finch/libgnt/configure.ac.  Put either
`AC_CONFIG_AUX_DIR([.])' or `AC_CONFIG_AUX_DIR([finch/libgnt])' in the
toplevel configure.ac (depending on whether you would prefer to have two
copies or only one of the auxiliary scripts in the combined tree.

I should note that the latter setup may cause you to stumble over a
bug with Automake releases older than 1.10, so be sure to use at least
that.

Hope that helps.

Cheers,
Ralf




Re: --add-missing

2007-07-24 Thread Eric Polino

On 7/24/07, Ralf Wildenhues [EMAIL PROTECTED] wrote:

Hello Eric,

* Eric Polino wrote on Tue, Jul 24, 2007 at 06:00:44AM CEST:

 Here lies the problem.  If I run toplevel/ag.sh it creates
 finch/libgnt/Makefile.in, as it always has and should.  Within there
 it generates a variable called DIST_COMMON which doesn't reference the
 automake scripts such as 'install-sh'.  If I then run
 finch/libgnt/ag.sh it will regenerate f/l/Makefile.in to where
 DIST_COMMON now contains 'install-sh' but it references the one in
 toplevel/ instead of one located in libgnt/.

 DIST_COMMON=. ../../install-sh 

 On the other hand if I run finch/libgnt/ag.sh first, it generates
 Makefile.in with DIST_COMMON having 'install-sh' located in libgnt/

 DIST_COMMON=.. install.sh 

 The latter behavior is what I want to get.  Is there a way I can get
 the latter outcome by doing the former procedure while still
 preserving the latter procedure/outcome pair?

Put `AC_CONFIG_AUX_DIR([.])' in finch/libgnt/configure.ac.  Put either
`AC_CONFIG_AUX_DIR([.])' or `AC_CONFIG_AUX_DIR([finch/libgnt])' in the
toplevel configure.ac (depending on whether you would prefer to have two
copies or only one of the auxiliary scripts in the combined tree.


I'm sort of confused on my options, is this correct?

1. AC_CONFIG_AUX_DIR([.]) in finch/libgnt/configure.ac 
   AC_CONFIG_AUX_DIR([.]) in configure.ac

OR

2. AC_CONFIG_AUX_DIR([.]) in finch/libgnt/configure.ac 
   AC_CONFIG_AUX_DIR([finch/libgnt]) in configure.ac


I should note that the latter setup may cause you to stumble over a
bug with Automake releases older than 1.10, so be sure to use at least
that.


After reading what that macro does, I think the former setup is
optimal for our situation.  Thank you for you help, we appreciate it!

Eric

--
http://aluink.blogspot.com

--
...indexable arrays, which may be thought of as functions whose
domains are isomorphic to contiguous subsets of the integers.
--Haskell 98 Library Report




--add-missing

2007-07-23 Thread Eric Polino

I am working on building a standalone version of libgnt.  Currently
the code for libgnt resides in the Pidgin repository.  So as it stands
we have two autogen.sh files.  One in the toplevel of the source that
has been there for a long time and recently we've added one in the
libgnt folder to allow libgnt to be build standalone.  We are
essentially trying to make the libgnt folder extractable to be its own
package so that distros can install it by itself without installing
Pidgin

Some more info on the directories:

toplevel/autogen.sh (calls 'automake --add-missing --copy')
finch/libgnt/autogent.sh (calls 'automake --add-missing --copy')

Here lies the problem.  If I run toplevel/ag.sh it creates
finch/libgnt/Makefile.in, as it always has and should.  Within there
it generates a variable called DIST_COMMON which doesn't reference the
automake scripts such as 'install-sh'.  If I then run
finch/libgnt/ag.sh it will regenerate f/l/Makefile.in to where
DIST_COMMON now contains 'install-sh' but it references the one in
toplevel/ instead of one located in libgnt/.

DIST_COMMON=. ../../install-sh 

On the other hand if I run finch/libgnt/ag.sh first, it generates
Makefile.in with DIST_COMMON having 'install-sh' located in libgnt/

DIST_COMMON=.. install.sh 

The latter behavior is what I want to get.  Is there a way I can get
the latter outcome by doing the former procedure while still
preserving the latter procedure/outcome pair?

I understand that this question would/might require looking at how we
have this setup in our source tree.  We currently don't have a tarball
of it up as this feature hasn't come out in a release yet.  Though if
need be, you can find a tarball at
http://cs.southern.edu/~club/pidgin.tar.gz.

TIA,
Eric

--
http://aluink.blogspot.com

--
...indexable arrays, which may be thought of as functions whose
domains are isomorphic to contiguous subsets of the integers.
--Haskell 98 Library Report




Re: --add-missing broken

2001-05-05 Thread Tom Tromey

 Akim == Akim Demaille [EMAIL PROTECTED] writes:
 Ralf == Ralf Corsepius [EMAIL PROTECTED] writes:

Ralf Related question: Which directory is am_dir/--am-dir supposed to
Ralf point to, now? ../automake/ or ../automake/am?

Akim Good question.  No idea what Tom will prefer.  AFAIC, a single
Akim option is enough, and therefore /automake seems the right
Akim answer.  Maybe --libdir would sound better?

I agree it should point to /automake.
We can rename it if you really want to.
It doesn't matter to me.  This option is only for the test suite.

Tom




Re: --add-missing broken

2001-05-04 Thread Akim Demaille

 Ralf == Ralf Corsepius [EMAIL PROTECTED] writes:

Ralf Hi, At present time, automake --add-missing is broken.
Ralf Apparent cause is this patch below.

Doh!

Thanks!  Weird that the test suite did not catch this.

Ralf Related question: Which directory is am_dir/--am-dir supposed to
Ralf point to, now? ../automake/ or ../automake/am?

Good question.  No idea what Tom will prefer.  AFAIC, a single option
is enough, and therefore /automake seems the right answer.  Maybe
--libdir would sound better?




Re: --Werror and --add-missing don't work toghether

2001-04-07 Thread Tom Tromey

 "Pavel" == Pavel Roskin [EMAIL PROTECTED] writes:

Pavel CVS Automake uses am_line_error() to inform the user that it's
Pavel installing files. As a result, --Werror causes Automake to exit
Pavel after it installs the first file:

I submitted a PR about this in your name.
Thanks.

Tom




--Werror and --add-missing don't work toghether

2001-03-13 Thread Pavel Roskin

Hello!

CVS Automake uses am_line_error() to inform the user that it's installing
files. As a result, --Werror causes Automake to exit after it installs the
first file:

$ automake --Werror --add-missing; echo $?
automake: Makefile.am: installing `./INSTALL'
2
$ automake --Werror --add-missing; echo $?
automake: Makefile.am: required file `./NEWS' not found
2

Sorry, no patch.

Regards,
Pavel Roskin





Re: [Fwd: --add-missing]

2000-12-26 Thread Derek R. Price

Tom Tromey wrote:

 I wouldn't be averse to adding a `pdf' target so that `make pdf' works
 as expected.  Someone else would have to write it though since I don't
 know how.

It should be the exact target used for DVI except for the addition of a
'--pdf' switch to the texi2dvi command line.  I'm using the following,
stripped directly from my Automake generated Makefile.in's DVI targets,
but I didn't research enough to know if any of the constituent elements
(TEXINPUTS, MAKEINFO, makeinfo includes) vary with Makefile.am
parameters:

SUFFIXES = .aux .txt .pdf
# texinfo based targets automake neglects to include
.texinfo.pdf:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $
.txi.pdf:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $
.texi.pdf:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $

By the way, there may not be much demand for it any longer, but we have
legacy targets to generate ASCII versions of our manuals as well.  I'm
told they ocassionally came in handy for mailing:

.texinfo.txt:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $ --no-headers
-o $@
.txi.txt:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $ --no-headers
-o $@
.texi.txt:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $ --no-headers
-o $@

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
--
This is the fourth?
- Thomas Jefferson's last words
(he died on the 4th of July)







Re: [Fwd: --add-missing]

2000-12-17 Thread Tom Tromey

 "Derek" == Derek R Price [EMAIL PROTECTED] writes:

 Me too.  But the point is that GNU packages are supposed to ship
 with texinfo.tex.

Derek Is there a web page somewhere with this standard on it?  I
Derek browsed briefly but I haven't been able to locate one.

It is in the GNU Coding Standards.  I know these are on the web but
offhand I don't know where.  Here is the text from the standard:

   Include in your distribution a copy of the `texinfo.tex' you used to
test print any `*.texinfo' or `*.texi' files.

For me standards.info appears in /usr/info/.

 I'm reluctant to rely on kpsewhich.  What if we changed makeinfo to
 have an option to print the path to texinfo.tex?

Derek What's the difference?  Who maintains makeinfo?

makeinfo is a GNU program.  Offhand I don't know who maintains it.

Derek The makeinfo on my system seems to have been installed with my
Derek texinfo package anyhow, the same place kpsewhich came from.

For me, kpsewhich is from the tetex package.  I'm fairly sure it isn't
part of GNU texinfo.

Derek Also, this still doesn't solve my problem.  My problem stems
Derek from the fact that 'texi2dvi' and 'texi2dvi --pdf' will use
Derek find two different texinfo.tex files and the two files don't
Derek appear to be compatibile - unless there is a texinfo.tex in the
Derek local directory ('.'), in which case both calls to 'texi2dvi'
Derek will use './texinfo.tex' and one call will produce garbage
Derek rather than readable output.

Shouldn't `make dvi' do the right thing already here?

Tom




[Fwd: --add-missing]

2000-11-14 Thread Derek R. Price

Yep.  Looks like that could be used by configure to set, say,
TEX_TEXINPUTS  PDFTEX_TEXINPUTS and prepend include dirs differently
for different targets, but I suspect that if your TeX distribution
includes kpsewhich then your TeX applications can already find the
appropriate texinfo.tex.

Of course, I suppose this could still be used to find a more recent
texinfo.tex than was included with your automake distribution, which
would work slightly better than including an out-of-date texinfo.tex,
but the included texinfo.tex will still render PDF targets unbuildable
since texi2dvi will, by default, prefer a texinfo.tex in '.' over one
elsewhere.

In other words, a complete solution is probably some combination of
these two, so that TEX_TEXINPUTS or PDFTEX_TEXINPUTS is used when
available and the included texinfo.tex is used when the appropriate
texinfo.tex can't be found.

This is a little more work, but it seems much less baroque than mv'ing
texinfo.tex out of the way when a better one is found.  Then again,
maybe you can find a way to make that work.

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
--
... one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of their C
programs.

- Robert Firth





Hi,

"Derek R. Price" [EMAIL PROTECTED] writes:
 Alexandre Oliva wrote:
  On Nov 13, 2000, "Derek R. Price" [EMAIL PROTECTED] wrote:
   Okay, is there some way short of symlinking the
   /usr/share/automake/texinfo.tex file by hand to make sure that automake
   --add-missing uses the "proper" texinfo.tex file (i.e. the one installed
   with the texinfo package and assumedly the most recent one)?
 
  I'm afraid not.  Any suggestions about how automake could find out
  where texinfo.tex from the texinfo package is installed, assuming it
  is?
 
 Well, after sifting the documentation for my distribution for several hours,
 I have discovered the "texmf.cnf" file.  It appears to define all sorts of
 possible search paths dependant on the format of your input and output files.

Assuming you're using teTeX (likely for most recent UNIX TeX
installations), you look for things using the 'kpsewhich' program,
like in

  kpsewhich texinfo.tex

The texmf.cnf file should be treated as an internal detail.

- Hari
-- 
Raja R Harinath -- [EMAIL PROTECTED]
"When all else fails, read the instructions."  -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash




--add-missing

2000-11-13 Thread Derek R. Price

Okay, is there some way short of symlinking the
/usr/share/automake/texinfo.tex file by hand to make sure that automake
--add-missing uses the "proper" texinfo.tex file (i.e. the one installed
with the texinfo package and assumedly the most recent one)?

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
--
When you find yourself getting irritated with someone, try to remember
that all men are brothers...  a noogie or an Indian burn should do the
trick.







Re: automake --add-missing --copy

2000-04-05 Thread Tom Tromey

 "Lars" == Lars J Aas [EMAIL PROTECTED] writes:

Lars I've always been annoyed that automake --add-missing --copy
Lars doesn't pass the "--copy"-option along to libtoolize, so I end
Lars up with symlinked config.guess, config.sub, ltconfig and
Lars ltmain.sh.

Fixed.

Lars This might be fixed already, it's an "old" (month at least)
Lars automake 1.4a I've got installed.

That's funny, given the recent pace of development.

Tom






automake --add-missing --copy

2000-04-04 Thread Lars J. Aas

Using: automake (GNU automake) 1.4a

I've always been annoyed that automake --add-missing --copy doesn't pass
the "--copy"-option along to libtoolize, so I end up with symlinked
config.guess, config.sub, ltconfig and ltmain.sh.

This might be fixed already, it's an "old" (month at least) automake 1.4a
I've got installed.

  Lars J