public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add a script for regenerating all newlib autotools files
@ 2021-12-09 21:47 Jon Turney
  2021-12-10  8:58 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Turney @ 2021-12-09 21:47 UTC (permalink / raw)
  To: newlib; +Cc: Jon Turney

Add a script for regenerating all newlib autotools files, applying the
instructions in the 'Regenerating Configuration Files' section of the
README everywhere.

Running this script produces loads of errors about 'no AC_LANG_SOURCE
call detected in body' from libtool.m4.  This is because that file is
old.

The versions of autotools in use on newlib seem to have backslid since
the README was last updated (for newlib 2.1.0 in 2013), so bring those
into alignment.  I don't know why.  I'm a little skeptical that automake
1.13 was used, since that doesn't permit '--cygnus', which we use.
---
 newlib/README     |  4 ++--
 newlib/autogen.sh | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100755 newlib/autogen.sh

diff --git a/newlib/README b/newlib/README
index 1c0541284..d47cccbcb 100644
--- a/newlib/README
+++ b/newlib/README
@@ -609,8 +609,8 @@ After creating a new configure.in and Makefile.am file, you would issue:
 from newlib/libc/machine/XXXX
 
 It is strongly advised that you use an adequate version of autotools.
-For this latest release, the following were used: autoconf 2.69, aclocal 1.13.4, and 
-automake 1.13.4.
+For this latest release, the following were used: autoconf 2.68, aclocal 1.11.6, and 
+automake 1.11.6.
 
 Reporting Bugs
 ==============
diff --git a/newlib/autogen.sh b/newlib/autogen.sh
new file mode 100755
index 000000000..001d297d8
--- /dev/null
+++ b/newlib/autogen.sh
@@ -0,0 +1,35 @@
+#!/bin/bash -e
+
+#
+# If you're changing this script, you probably want to also be changing the
+# 'Regenerating Configuration Files' section in the README.
+#
+
+basedir=$(dirname $(realpath $0))
+cd ${basedir}
+
+# aclocal -I${relative_path_to_toplevel_newlib_dir} -I${relative_path_to_toplevel_src_dir}
+find -name aclocal.m4 | while read f
+do
+  (cd $(dirname $f) ; aclocal-1.11 -I $(realpath --relative-to . ${basedir}) -I $(realpath --relative-to . ${basedir}/..))
+done
+
+# autoconf
+find -name configure.ac | while read f
+do
+  (cd $(dirname $f) ; autoconf-2.68)
+done
+
+# automake
+find -name configure.ac | while read f
+do
+  # Exclude directories containing a configure.ac and below, so that Makefile.in
+  # files are generated from the nearest directory up the tree which contains a
+  # configure.ac file.
+  (cd $(dirname $f) ; find -type d -execdir test -e {}/configure.ac ';' -a -not -path '.' -prune -o -name Makefile.am -printf '%P\n' | while read m
+   do
+    automake-1.11 -ac ${m%.*}
+  done)
+done
+
+rm -rf autom4te.cache
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add a script for regenerating all newlib autotools files
  2021-12-09 21:47 [PATCH] Add a script for regenerating all newlib autotools files Jon Turney
@ 2021-12-10  8:58 ` Corinna Vinschen
  2021-12-10 14:14   ` Jon Turney
  0 siblings, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2021-12-10  8:58 UTC (permalink / raw)
  To: newlib

Hi Jon,

On Dec  9 21:47, Jon Turney wrote:
> Add a script for regenerating all newlib autotools files, applying the
> instructions in the 'Regenerating Configuration Files' section of the
> README everywhere.

Great idea.

> Running this script produces loads of errors about 'no AC_LANG_SOURCE
> call detected in body' from libtool.m4.  This is because that file is
> old.
> 
> The versions of autotools in use on newlib seem to have backslid since
> the README was last updated (for newlib 2.1.0 in 2013), so bring those
> into alignment.  I don't know why.  I'm a little skeptical that automake
> 1.13 was used, since that doesn't permit '--cygnus', which we use.
> ---
>  newlib/README     |  4 ++--
>  newlib/autogen.sh | 35 +++++++++++++++++++++++++++++++++++
>  2 files changed, 37 insertions(+), 2 deletions(-)
>  create mode 100755 newlib/autogen.sh
> 
> diff --git a/newlib/README b/newlib/README
> index 1c0541284..d47cccbcb 100644
> --- a/newlib/README
> +++ b/newlib/README
> [...]
> +# automake
> +find -name configure.ac | while read f
> +do
> +  # Exclude directories containing a configure.ac and below, so that Makefile.in
> +  # files are generated from the nearest directory up the tree which contains a
> +  # configure.ac file.
> +  (cd $(dirname $f) ; find -type d -execdir test -e {}/configure.ac ';' -a -not -path '.' -prune -o -name Makefile.am -printf '%P\n' | while read m
> +   do
> +    automake-1.11 -ac ${m%.*}

Not being an automake guru at all, but... isn't the --cygnus option missing?


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add a script for regenerating all newlib autotools files
  2021-12-10  8:58 ` Corinna Vinschen
@ 2021-12-10 14:14   ` Jon Turney
  2021-12-10 14:41     ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Turney @ 2021-12-10 14:14 UTC (permalink / raw)
  To: newlib

On 10/12/2021 08:58, Corinna Vinschen wrote:
> Hi Jon,
> 
> On Dec  9 21:47, Jon Turney wrote:
>> Add a script for regenerating all newlib autotools files, applying the
>> instructions in the 'Regenerating Configuration Files' section of the
>> README everywhere.
> 
> Great idea.
> 
>> Running this script produces loads of errors about 'no AC_LANG_SOURCE
>> call detected in body' from libtool.m4.  This is because that file is
>> old.
>>
>> The versions of autotools in use on newlib seem to have backslid since
>> the README was last updated (for newlib 2.1.0 in 2013), so bring those
>> into alignment.  I don't know why.  I'm a little skeptical that automake
>> 1.13 was used, since that doesn't permit '--cygnus', which we use.
>> ---
>>   newlib/README     |  4 ++--
>>   newlib/autogen.sh | 35 +++++++++++++++++++++++++++++++++++
>>   2 files changed, 37 insertions(+), 2 deletions(-)
>>   create mode 100755 newlib/autogen.sh
>>
>> diff --git a/newlib/README b/newlib/README
>> index 1c0541284..d47cccbcb 100644
>> --- a/newlib/README
>> +++ b/newlib/README
>> [...]
>> +# automake
>> +find -name configure.ac | while read f
>> +do
>> +  # Exclude directories containing a configure.ac and below, so that Makefile.in
>> +  # files are generated from the nearest directory up the tree which contains a
>> +  # configure.ac file.
>> +  (cd $(dirname $f) ; find -type d -execdir test -e {}/configure.ac ';' -a -not -path '.' -prune -o -name Makefile.am -printf '%P\n' | while read m
>> +   do
>> +    automake-1.11 -ac ${m%.*}
> 
> Not being an automake guru at all, but... isn't the --cygnus option missing?

That's not actually required as every Makefile.am contains 
'AUTOMAKE_OPTIONS = cygnus'.

I am working on a patch to remove '--cygnus' (since I thought that would 
be a prerequisite of silent make until I checked which automake versions 
added it), but not finished yet...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add a script for regenerating all newlib autotools files
  2021-12-10 14:14   ` Jon Turney
@ 2021-12-10 14:41     ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2021-12-10 14:41 UTC (permalink / raw)
  To: newlib

On Dec 10 14:14, Jon Turney wrote:
> On 10/12/2021 08:58, Corinna Vinschen wrote:
> > Hi Jon,
> > 
> > On Dec  9 21:47, Jon Turney wrote:
> > > Add a script for regenerating all newlib autotools files, applying the
> > > instructions in the 'Regenerating Configuration Files' section of the
> > > README everywhere.
> > 
> > Great idea.
> > 
> > > Running this script produces loads of errors about 'no AC_LANG_SOURCE
> > > call detected in body' from libtool.m4.  This is because that file is
> > > old.
> > > 
> > > The versions of autotools in use on newlib seem to have backslid since
> > > the README was last updated (for newlib 2.1.0 in 2013), so bring those
> > > into alignment.  I don't know why.  I'm a little skeptical that automake
> > > 1.13 was used, since that doesn't permit '--cygnus', which we use.
> > > ---
> > >   newlib/README     |  4 ++--
> > >   newlib/autogen.sh | 35 +++++++++++++++++++++++++++++++++++
> > >   2 files changed, 37 insertions(+), 2 deletions(-)
> > >   create mode 100755 newlib/autogen.sh
> > > 
> > > diff --git a/newlib/README b/newlib/README
> > > index 1c0541284..d47cccbcb 100644
> > > --- a/newlib/README
> > > +++ b/newlib/README
> > > [...]
> > > +# automake
> > > +find -name configure.ac | while read f
> > > +do
> > > +  # Exclude directories containing a configure.ac and below, so that Makefile.in
> > > +  # files are generated from the nearest directory up the tree which contains a
> > > +  # configure.ac file.
> > > +  (cd $(dirname $f) ; find -type d -execdir test -e {}/configure.ac ';' -a -not -path '.' -prune -o -name Makefile.am -printf '%P\n' | while read m
> > > +   do
> > > +    automake-1.11 -ac ${m%.*}
> > 
> > Not being an automake guru at all, but... isn't the --cygnus option missing?
> 
> That's not actually required as every Makefile.am contains 'AUTOMAKE_OPTIONS
> = cygnus'.
> 
> I am working on a patch to remove '--cygnus' (since I thought that would be
> a prerequisite of silent make until I checked which automake versions added
> it), but not finished yet...

Great, feeel free to push.


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-10 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 21:47 [PATCH] Add a script for regenerating all newlib autotools files Jon Turney
2021-12-10  8:58 ` Corinna Vinschen
2021-12-10 14:14   ` Jon Turney
2021-12-10 14:41     ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).