GNU bug report logs - #75807
[PATCH,WIP] Support for the Algol 68 language

Previous Next

Package: automake-patches;

Reported by: "Jose E. Marchesi" <jemarch <at> gnu.org>

Date: Fri, 24 Jan 2025 15:30:02 UTC

Severity: normal

Tags: patch

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75807 in the body.
You can then email your comments to 75807 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Fri, 24 Jan 2025 15:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Jose E. Marchesi" <jemarch <at> gnu.org>:
New bug report received and forwarded. Copy sent to automake-patches <at> gnu.org. (Fri, 24 Jan 2025 15:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Jose E. Marchesi" <jemarch <at> gnu.org>
To: automake-patches <at> gnu.org
Subject: [PATCH,WIP] Support for the Algol 68 language
Date: Fri, 24 Jan 2025 01:23:47 +0100
Hello.

This patch adds support for the Algol 68 programming language to
Automake.  It is based on the Algol 68 GCC front-end, which is currently
under development [1]. A WIP series got sent to gcc-patches in January
[2], and the front-end is temporarily hosted in the sourceware forge
until integration in GCC is completed [3].

The full language is (almost) already implemented, the compiler is
useful and I plan to send official patches for inclusion in GCC 16 very
soon.

In the meanwhile, I would like to have both autoconf and automake
support ready to be added upstream once the front-end lands.

This WIP seems to work for me: make, make install, make dist, etc.  With
a Makefile.am like this:

----
bin_PROGRAMS = program
godcc_SOURCES = program.a68
----

But I am not familiar with the Automake internals and it is likely I am
missing something and/or doing something wrong.  Comments are welcome.

A patch adding Algol 68 support to autoconf has been sent to
autoconf-patches@.

Salud!

[1] https://gcc.gnu.org/wiki/Algol68FrontEnd
[2] https://inbox.sourceware.org/gcc-patches/20250101020952.18404-1-jose.marchesi <at> oracle.com/T/#t 
[3] https://forge.sourceforge.org/jemarch/a68-gcc


    Add support for the Algol 68 programming language.
    
    * NEWS: Add entry for Algol 68.
    * bin/automake.in: Call register_language for Algol 68.
      (resolve_linker): handle A68LINK.
      (%_am_macro_for_cond): Add entry for am__fastdepGA68.
    * configure.ac: Look for ga68 and set GNU_GA68 and GNU_A68FLAGS if fuond.
    * lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for GA68
      and GA68FLAGS.

diff --git a/NEWS b/NEWS
index b4c50ffc6..9da978c39 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ please see NEWS-future and start following the advice there now.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 New in 1.x:
 
+* New supported languages:
+
+  - Support for Algol 68 has been added; based on the GNU Algol 68 compiler.
+
 * Miscellaneous changes
 
    - Only require the presence of an ABOUT-NLS file at the 'gnits'
diff --git a/bin/automake.in b/bin/automake.in
index 5d3e7c766..bc5c3838a 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -1023,6 +1023,24 @@ register_language ('name' => 'java',
 		   'pure' => 1,
 		   'extensions' => ['.java', '.class', '.zip', '.jar']);
 
+# Algol 68 in GCC
+register_language ('name' => 'a68',
+                   'Name' => 'Algol 68',
+                   'config_vars' => ['GA68'],
+                   'linker' => 'A68LINK',
+                   'link' => '$(A68LD) $(AM_A68FLAGS) $(A68FLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
+		   'flags' => ['A68FLAGS'],
+		   'compile' => '$(GA68) $(AM_A68FLAGS) $(A68FLAGS)',
+		   'ccer' => 'GA68',
+		   'compiler' => 'A68COMPILE',
+		   'compile_flag' => '-c',
+		   'output_flag' => '-o',
+		   'libtool_tag' => 'GA68',
+		   'lder' => 'A68LD',
+		   'ld' => '$(GA68)',
+		   'pure' => 1,
+		   'extensions' => ['.a68']);
+
 ################################################################
 
 # Error reporting functions.
@@ -5564,7 +5582,7 @@ EOF
 	  if (0 == keys %libtool_tags)
 	    {
 	      # Hardcode the tags supported by Libtool 1.5.
-	      %libtool_tags = (CC => 1, CXX => 1, GCJ => 1, F77 => 1);
+	      %libtool_tags = (CC => 1, CXX => 1, GCJ => 1, F77 => 1, GA68 => 1);
 	    }
 	}
     }
@@ -6057,7 +6075,7 @@ sub resolve_linker
 {
     my (%linkers) = @_;
 
-    foreach my $l (qw(GCJLINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK UPCLINK))
+    foreach my $l (qw(GCJLINK A68LINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK UPCLINK))
     {
 	return $l if defined $linkers{$l};
     }
@@ -6176,11 +6194,12 @@ my %_am_macro_for_cond =
   (
   AMDEP => "one of the compiler tests\n"
 	   . "    AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,\n"
-	   . "    AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC",
+	   . "    AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC, AM_PROG_A68",
   am__fastdepCC => 'AC_PROG_CC',
   am__fastdepCCAS => 'AM_PROG_AS',
   am__fastdepCXX => 'AC_PROG_CXX',
   am__fastdepGCJ => 'AM_PROG_GCJ',
+  am__fastdepGA68 => 'AM_PROG_GA68',
   am__fastdepOBJC => 'AC_PROG_OBJC',
   am__fastdepOBJCXX => 'AC_PROG_OBJCXX',
   am__fastdepUPC => 'AM_PROG_UPC'
diff --git a/configure.ac b/configure.ac
index 0a9e1904e..295bd2749 100644
--- a/configure.ac
+++ b/configure.ac
@@ -565,6 +565,16 @@ if test "$GNU_F77" != false; then
         _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
 fi
 
+# GNU Algol 68 compiler.
+AC_ARG_VAR([GNU_GA68],    [GNU Algol 68 compiler])
+AC_ARG_VAR([GNU_A68FLAGS], [GNU Algol 68 compiler flags])
+AC_CHECK_TOOLS([GNU_GA68], [ga68], [false])
+if test "$GNU_GA68" != false; then
+   AS_IF([AM_RUN_LOG([$GNU_GA68 --version && $GNU_GA68 -v])], [],
+   [AC_MSG_WARN([botched installation for GNU Algol 68 compiler])
+   _AM_SKIP_COMP_TESTS([GNU Algol 68])])
+fi
+
 # GNU Java compiler.
 AC_ARG_VAR([GNU_GCJ], [GNU Java compiler])
 AC_ARG_VAR([GNU_GCJFLAGS], [GNU Java compiler flags])
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 6e90b81f2..ccf065803 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -183,6 +183,8 @@ my %_ac_macro_for_var =
    CXX => 'AC_PROG_CXX',
    CXXFLAGS => 'AC_PROG_CXX',
    F77 => 'AC_PROG_F77',
+   GA68 => 'AC_PROG_GA68',
+   A68FLAGS => 'AC_PROG_GA68',
    FFLAGS => 'AC_PROG_F77',
    FC => 'AC_PROG_FC',
    FCFLAGS => 'AC_PROG_FC',




Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Fri, 24 Jan 2025 21:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: jemarch <at> gnu.org
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Fri, 24 Jan 2025 14:55:43 -0700
    the compiler is useful 

What Algol 68 code does anyone want to use or write nowadays?
Just curious.

    But I am not familiar with the Automake internals 

Neither am I, but we plunge ahead as best we can anyway.

    and it is likely I am missing something and/or doing something wrong.  

It looks reasonable to me at first glance. But one crucial thing is
missing: test(s) to exercise the functionality. Just compiling
hello,world and running it should suffice for starters.

Can you write a test please? --thanks, karl.





Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Sat, 25 Jan 2025 00:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: "Jose E. Marchesi" <jemarch <at> gnu.org>
To: Karl Berry <karl <at> freefriends.org>
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Sat, 25 Jan 2025 01:10:43 +0100
Hello Karl.

>     the compiler is useful 
>
> What Algol 68 code does anyone want to use or write nowadays?
> Just curious.

Algol 68 is a very good programming language.  Once implemented in a
modern optimized compiler and carefully extended, I plan to use it for
many of my non-C projects.

>     But I am not familiar with the Automake internals 
>
> Neither am I, but we plunge ahead as best we can anyway.

:)

>     and it is likely I am missing something and/or doing something wrong.  
>
> It looks reasonable to me at first glance. But one crucial thing is
> missing: test(s) to exercise the functionality. Just compiling
> hello,world and running it should suffice for starters.
>
> Can you write a test please? --thanks, karl.

Sure thing.  Will send a V2.

I see this triggered a ddebugs ticket.  Should I send the [PATCH V2] by
replying to this email, or start a new thread?  If the second, shall I
add 75807 <at> debbugs.gnu.org in CC?  How does it work?

Thanks!




Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Sat, 25 Jan 2025 22:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: jemarch <at> gnu.org
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Sat, 25 Jan 2025 15:23:03 -0700
    Will send a V2.

Thanks. I belatedly realized that a draft update to automake.texi would
also be greatly appreciated.

    Should I send the [PATCH V2] by replying to this email, 

That will work.

    or start a new thread?  

Better not to.

    If the second, shall I add 75807 <at> debbugs.gnu.org in CC?  How does it
    work?

As far as I know, if NNNNN <at> debbugs.gnu.org is one of the recipients to a
message, the msg will get added to that bug. When only one bug is
involved, it's simpler (for the humans) to keep the same Subject: line.
In this case:
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language

Thanks Jose. Happy ca.1968 hacking :),
Karl




Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Sat, 25 Jan 2025 23:58:01 GMT) Full text and rfc822 format available.

Message #17 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: "Jose E. Marchesi" <jemarch <at> gnu.org>
To: Karl Berry <karl <at> freefriends.org>
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Sun, 26 Jan 2025 00:56:56 +0100
Hello.

New version of the patch below.  Differences from previous versions:

- The GA68 variable has been renamed to A68.  (This has been also
  changed in the corresponding autoconf patches.)
- Added a section 'Algol 68 Support' to the manual.
- Added a test t/a68-demo.sh.

commit c33511e6df2b23de3040484a56cc0efdff5c0691
Author: Jose E. Marchesi <jose.marchesi <at> oracle.com>
Date:   Fri Jan 24 00:20:27 2025 +0100

    Add support for the Algol 68 programming language.
    
    * NEWS: Add entry for Algol 68.
    * doc/automake.texi (Algol 68 Support): New section.
    * bin/automake.in: Call register_language for Algol 68.
      (resolve_linker): handle A68LINK.
      (%_am_macro_for_cond): Add entry for am__fastdepGA68.
    * configure.ac: Look for ga68 and set GNU_GA68 and GNU_A68FLAGS if fuond.
    * lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for GA68
      and GA68FLAGS.
    * t/a68-demo.sh: New test.

diff --git a/NEWS b/NEWS
index b4c50ffc6..9da978c39 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ please see NEWS-future and start following the advice there now.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 New in 1.x:
 
+* New supported languages:
+
+  - Support for Algol 68 has been added; based on the GNU Algol 68 compiler.
+
 * Miscellaneous changes
 
    - Only require the presence of an ABOUT-NLS file at the 'gnits'
diff --git a/bin/automake.in b/bin/automake.in
index 5d3e7c766..f7451e3f8 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -1023,6 +1023,24 @@ register_language ('name' => 'java',
 		   'pure' => 1,
 		   'extensions' => ['.java', '.class', '.zip', '.jar']);
 
+# Algol 68 in GCC
+register_language ('name' => 'a68',
+                   'Name' => 'Algol 68',
+                   'config_vars' => ['A68'],
+                   'linker' => 'A68LINK',
+                   'link' => '$(A68LD) $(AM_A68FLAGS) $(A68FLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
+		   'flags' => ['A68FLAGS'],
+		   'compile' => '$(A68) $(AM_A68FLAGS) $(A68FLAGS)',
+		   'ccer' => 'A68',
+		   'compiler' => 'A68COMPILE',
+		   'compile_flag' => '-c',
+		   'output_flag' => '-o',
+		   'libtool_tag' => 'A68',
+		   'lder' => 'A68LD',
+		   'ld' => '$(A68)',
+		   'pure' => 1,
+		   'extensions' => ['.a68']);
+
 ################################################################
 
 # Error reporting functions.
@@ -5564,7 +5582,7 @@ EOF
 	  if (0 == keys %libtool_tags)
 	    {
 	      # Hardcode the tags supported by Libtool 1.5.
-	      %libtool_tags = (CC => 1, CXX => 1, GCJ => 1, F77 => 1);
+	      %libtool_tags = (CC => 1, CXX => 1, GCJ => 1, F77 => 1, A68 => 1);
 	    }
 	}
     }
@@ -6057,7 +6075,7 @@ sub resolve_linker
 {
     my (%linkers) = @_;
 
-    foreach my $l (qw(GCJLINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK UPCLINK))
+    foreach my $l (qw(GCJLINK A68LINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK UPCLINK))
     {
 	return $l if defined $linkers{$l};
     }
@@ -6176,11 +6194,12 @@ my %_am_macro_for_cond =
   (
   AMDEP => "one of the compiler tests\n"
 	   . "    AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,\n"
-	   . "    AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC",
+	   . "    AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC, AM_PROG_A68",
   am__fastdepCC => 'AC_PROG_CC',
   am__fastdepCCAS => 'AM_PROG_AS',
   am__fastdepCXX => 'AC_PROG_CXX',
   am__fastdepGCJ => 'AM_PROG_GCJ',
+  am__fastdepA68 => 'AM_PROG_A68',
   am__fastdepOBJC => 'AC_PROG_OBJC',
   am__fastdepOBJCXX => 'AC_PROG_OBJCXX',
   am__fastdepUPC => 'AM_PROG_UPC'
diff --git a/configure.ac b/configure.ac
index 0a9e1904e..27fe4a328 100644
--- a/configure.ac
+++ b/configure.ac
@@ -565,6 +565,16 @@ if test "$GNU_F77" != false; then
         _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
 fi
 
+# GNU Algol 68 compiler.
+AC_ARG_VAR([GNU_A68],    [GNU Algol 68 compiler])
+AC_ARG_VAR([GNU_A68FLAGS], [GNU Algol 68 compiler flags])
+AC_CHECK_TOOLS([GNU_A68], [ga68], [false])
+if test "$GNU_A68" != false; then
+   AS_IF([AM_RUN_LOG([$GNU_A68 --version && $GNU_A68 -v])], [],
+   [AC_MSG_WARN([botched installation for GNU Algol 68 compiler])
+   _AM_SKIP_COMP_TESTS([GNU Algol 68])])
+fi
+
 # GNU Java compiler.
 AC_ARG_VAR([GNU_GCJ], [GNU Java compiler])
 AC_ARG_VAR([GNU_GCJFLAGS], [GNU Java compiler flags])
diff --git a/doc/automake.texi b/doc/automake.texi
index a5b993007..4f848e7af 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -230,6 +230,7 @@ Building Programs and Libraries
 * Fortran 9x Support::          Compiling Fortran 9x sources
 * Java Support with gcj::       Compiling Java sources using gcj
 * Vala Support::                Compiling Vala sources
+* Algol 68 Support::            Compiling Algol 68 sources
 * Support for Other Languages:: Compiling other languages
 * Dependencies::                Automatic dependency tracking
 * EXEEXT::                      Support for executable extensions
@@ -4848,6 +4849,7 @@ to build programs and libraries.
 * Fortran 9x Support::          Compiling Fortran 9x sources
 * Java Support with gcj::       Compiling Java sources using gcj
 * Vala Support::                Compiling Vala sources
+* Algol 68 Support::            Compiling Algol 68 sources
 * Support for Other Languages::  Compiling other languages
 * Dependencies::                Automatic dependency tracking
 * EXEEXT::                      Support for executable extensions
@@ -7178,6 +7180,41 @@ Note that currently, you cannot use per-target @code{*_VALAFLAGS}
 (@pxref{Renamed Objects}) to produce different C files from one Vala
 source file.
 
+@node Algol 68 Support
+@comment  node-name,  next,  previous,  up
+@section Algol 68 Support
+
+@cindex Algol 68 support
+@cindex Support for Algol 68
+
+Automake includes support for Algol 68, using GCC.
+
+Any package including Algol 68 code must define the output variable
+@code{A68} in @file{configure.ac}; the simplest way to do this is to use
+the @code{AC_PROG_A68} macro (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}).
+
+A few additional variables are defined when a Fortran 77 source file is
+seen:
+
+@vtable @code
+
+@item A68
+The name of the Algol 68 compiler.
+
+@item A68FLAGS
+Any flags to pass to the Algol 68 compiler.
+
+@item AM_A68FLAGS
+The maintainer's variant of @code{FFLAGS}.
+
+@item A68COMPILE
+The command used to compile an Algol 68 source file.  The file name is
+appended to form the complete command line.
+
+@item A68LINK
+The command used to link a pure Algol 68 program or shared library.
+@end vtable
 
 @node Support for Other Languages
 @comment  node-name,  next,  previous,  up
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 6e90b81f2..7608de23d 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -183,6 +183,8 @@ my %_ac_macro_for_var =
    CXX => 'AC_PROG_CXX',
    CXXFLAGS => 'AC_PROG_CXX',
    F77 => 'AC_PROG_F77',
+   A68 => 'AC_PROG_A68',
+   A68FLAGS => 'AC_PROG_A68',
    FFLAGS => 'AC_PROG_F77',
    FC => 'AC_PROG_FC',
    FCFLAGS => 'AC_PROG_FC',
diff --git a/t/a68-demo.sh b/t/a68-demo.sh
new file mode 100644
index 000000000..c2966d4ea
--- /dev/null
+++ b/t/a68-demo.sh
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 2012-2025 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 <https://www.gnu.org/licenses/>.
+
+# Demo on Algol 68 support.
+
+required=ga68
+am_create_testdir=empty
+. test-init.sh
+
+cat > configure.ac << 'END'
+AC_INIT([GNU Algol 68 Demo], [1.0], [bug-automake <at> gnu.org])
+AC_CONFIG_SRCDIR([play.a68])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_A68
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+
+bin_PROGRAMS = work play
+play_SOURCES = play.a68
+work_SOURCES = work.a68
+
+.PHONY: test-objs
+check-local: test-objs
+test-objs:
+	test -f play.$(OBJEXT)
+	test -f work.$(OBJEXT)
+END
+
+mkdir sub build-aux
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+cat > work.a68 << 'END'
+PROGRAM (puts ("We are working :-(\n"); 0)
+END
+
+cat > play.a68 << 'END'
+PROGRAM (puts ("We are playing :-)\n"); 0)
+END
+
+./configure
+$MAKE
+$MAKE test-objs
+
+if ! cross_compiling; then
+  unindent > exp.play << 'END'
+    We are playing :-)
+END
+  unindent > exp.work << 'END'
+    We are working :-(
+END
+  for p in play work; do
+    # The program must run correctly (exit status = 0).
+    ./$p
+    # And it must have the expected output.  Note that we strip extra
+    # CR characters (if any), to cater to MinGW programs on MSYS.
+    # See automake bug#14493.
+    ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; }
+    cat exp.$p
+    cat got.$p
+    diff exp.$p got.$p
+  done
+fi
+
+$MAKE distcheck
+
+:




Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Sun, 26 Jan 2025 00:35:02 GMT) Full text and rfc822 format available.

Message #20 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: "Jose E. Marchesi" <jemarch <at> gnu.org>
To: Karl Berry <karl <at> freefriends.org>
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Sun, 26 Jan 2025 01:34:17 +0100
By the way, the version of autoconf needed to run the automake test can
be found in:

  https://git.sr.ht/~jemarch/a68-autoconf

Branch a68.


> Hello.
>
> New version of the patch below.  Differences from previous versions:
>
> - The GA68 variable has been renamed to A68.  (This has been also
>   changed in the corresponding autoconf patches.)
> - Added a section 'Algol 68 Support' to the manual.
> - Added a test t/a68-demo.sh.
>
> commit c33511e6df2b23de3040484a56cc0efdff5c0691
> Author: Jose E. Marchesi <jose.marchesi <at> oracle.com>
> Date:   Fri Jan 24 00:20:27 2025 +0100
>
>     Add support for the Algol 68 programming language.
>     
>     * NEWS: Add entry for Algol 68.
>     * doc/automake.texi (Algol 68 Support): New section.
>     * bin/automake.in: Call register_language for Algol 68.
>       (resolve_linker): handle A68LINK.
>       (%_am_macro_for_cond): Add entry for am__fastdepGA68.
>     * configure.ac: Look for ga68 and set GNU_GA68 and GNU_A68FLAGS if fuond.
>     * lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for GA68
>       and GA68FLAGS.
>     * t/a68-demo.sh: New test.
>
> diff --git a/NEWS b/NEWS
> index b4c50ffc6..9da978c39 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -4,6 +4,10 @@ please see NEWS-future and start following the advice there now.
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  New in 1.x:
>  
> +* New supported languages:
> +
> +  - Support for Algol 68 has been added; based on the GNU Algol 68 compiler.
> +
>  * Miscellaneous changes
>  
>     - Only require the presence of an ABOUT-NLS file at the 'gnits'
> diff --git a/bin/automake.in b/bin/automake.in
> index 5d3e7c766..f7451e3f8 100644
> --- a/bin/automake.in
> +++ b/bin/automake.in
> @@ -1023,6 +1023,24 @@ register_language ('name' => 'java',
>  		   'pure' => 1,
>  		   'extensions' => ['.java', '.class', '.zip', '.jar']);
>  
> +# Algol 68 in GCC
> +register_language ('name' => 'a68',
> +                   'Name' => 'Algol 68',
> +                   'config_vars' => ['A68'],
> +                   'linker' => 'A68LINK',
> +                   'link' => '$(A68LD) $(AM_A68FLAGS) $(A68FLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
> +		   'flags' => ['A68FLAGS'],
> +		   'compile' => '$(A68) $(AM_A68FLAGS) $(A68FLAGS)',
> +		   'ccer' => 'A68',
> +		   'compiler' => 'A68COMPILE',
> +		   'compile_flag' => '-c',
> +		   'output_flag' => '-o',
> +		   'libtool_tag' => 'A68',
> +		   'lder' => 'A68LD',
> +		   'ld' => '$(A68)',
> +		   'pure' => 1,
> +		   'extensions' => ['.a68']);
> +
>  ################################################################
>  
>  # Error reporting functions.
> @@ -5564,7 +5582,7 @@ EOF
>  	  if (0 == keys %libtool_tags)
>  	    {
>  	      # Hardcode the tags supported by Libtool 1.5.
> -	      %libtool_tags = (CC => 1, CXX => 1, GCJ => 1, F77 => 1);
> +	      %libtool_tags = (CC => 1, CXX => 1, GCJ => 1, F77 => 1, A68 => 1);
>  	    }
>  	}
>      }
> @@ -6057,7 +6075,7 @@ sub resolve_linker
>  {
>      my (%linkers) = @_;
>  
> -    foreach my $l (qw(GCJLINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK UPCLINK))
> +    foreach my $l (qw(GCJLINK A68LINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK UPCLINK))
>      {
>  	return $l if defined $linkers{$l};
>      }
> @@ -6176,11 +6194,12 @@ my %_am_macro_for_cond =
>    (
>    AMDEP => "one of the compiler tests\n"
>  	   . "    AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,\n"
> -	   . "    AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC",
> +	   . "    AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC, AM_PROG_A68",
>    am__fastdepCC => 'AC_PROG_CC',
>    am__fastdepCCAS => 'AM_PROG_AS',
>    am__fastdepCXX => 'AC_PROG_CXX',
>    am__fastdepGCJ => 'AM_PROG_GCJ',
> +  am__fastdepA68 => 'AM_PROG_A68',
>    am__fastdepOBJC => 'AC_PROG_OBJC',
>    am__fastdepOBJCXX => 'AC_PROG_OBJCXX',
>    am__fastdepUPC => 'AM_PROG_UPC'
> diff --git a/configure.ac b/configure.ac
> index 0a9e1904e..27fe4a328 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -565,6 +565,16 @@ if test "$GNU_F77" != false; then
>          _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
>  fi
>  
> +# GNU Algol 68 compiler.
> +AC_ARG_VAR([GNU_A68],    [GNU Algol 68 compiler])
> +AC_ARG_VAR([GNU_A68FLAGS], [GNU Algol 68 compiler flags])
> +AC_CHECK_TOOLS([GNU_A68], [ga68], [false])
> +if test "$GNU_A68" != false; then
> +   AS_IF([AM_RUN_LOG([$GNU_A68 --version && $GNU_A68 -v])], [],
> +   [AC_MSG_WARN([botched installation for GNU Algol 68 compiler])
> +   _AM_SKIP_COMP_TESTS([GNU Algol 68])])
> +fi
> +
>  # GNU Java compiler.
>  AC_ARG_VAR([GNU_GCJ], [GNU Java compiler])
>  AC_ARG_VAR([GNU_GCJFLAGS], [GNU Java compiler flags])
> diff --git a/doc/automake.texi b/doc/automake.texi
> index a5b993007..4f848e7af 100644
> --- a/doc/automake.texi
> +++ b/doc/automake.texi
> @@ -230,6 +230,7 @@ Building Programs and Libraries
>  * Fortran 9x Support::          Compiling Fortran 9x sources
>  * Java Support with gcj::       Compiling Java sources using gcj
>  * Vala Support::                Compiling Vala sources
> +* Algol 68 Support::            Compiling Algol 68 sources
>  * Support for Other Languages:: Compiling other languages
>  * Dependencies::                Automatic dependency tracking
>  * EXEEXT::                      Support for executable extensions
> @@ -4848,6 +4849,7 @@ to build programs and libraries.
>  * Fortran 9x Support::          Compiling Fortran 9x sources
>  * Java Support with gcj::       Compiling Java sources using gcj
>  * Vala Support::                Compiling Vala sources
> +* Algol 68 Support::            Compiling Algol 68 sources
>  * Support for Other Languages::  Compiling other languages
>  * Dependencies::                Automatic dependency tracking
>  * EXEEXT::                      Support for executable extensions
> @@ -7178,6 +7180,41 @@ Note that currently, you cannot use per-target @code{*_VALAFLAGS}
>  (@pxref{Renamed Objects}) to produce different C files from one Vala
>  source file.
>  
> +@node Algol 68 Support
> +@comment  node-name,  next,  previous,  up
> +@section Algol 68 Support
> +
> +@cindex Algol 68 support
> +@cindex Support for Algol 68
> +
> +Automake includes support for Algol 68, using GCC.
> +
> +Any package including Algol 68 code must define the output variable
> +@code{A68} in @file{configure.ac}; the simplest way to do this is to use
> +the @code{AC_PROG_A68} macro (@pxref{Particular Programs, , Particular
> +Program Checks, autoconf, The Autoconf Manual}).
> +
> +A few additional variables are defined when a Fortran 77 source file is
> +seen:
> +
> +@vtable @code
> +
> +@item A68
> +The name of the Algol 68 compiler.
> +
> +@item A68FLAGS
> +Any flags to pass to the Algol 68 compiler.
> +
> +@item AM_A68FLAGS
> +The maintainer's variant of @code{FFLAGS}.
> +
> +@item A68COMPILE
> +The command used to compile an Algol 68 source file.  The file name is
> +appended to form the complete command line.
> +
> +@item A68LINK
> +The command used to link a pure Algol 68 program or shared library.
> +@end vtable
>  
>  @node Support for Other Languages
>  @comment  node-name,  next,  previous,  up
> diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
> index 6e90b81f2..7608de23d 100644
> --- a/lib/Automake/Variable.pm
> +++ b/lib/Automake/Variable.pm
> @@ -183,6 +183,8 @@ my %_ac_macro_for_var =
>     CXX => 'AC_PROG_CXX',
>     CXXFLAGS => 'AC_PROG_CXX',
>     F77 => 'AC_PROG_F77',
> +   A68 => 'AC_PROG_A68',
> +   A68FLAGS => 'AC_PROG_A68',
>     FFLAGS => 'AC_PROG_F77',
>     FC => 'AC_PROG_FC',
>     FCFLAGS => 'AC_PROG_FC',
> diff --git a/t/a68-demo.sh b/t/a68-demo.sh
> new file mode 100644
> index 000000000..c2966d4ea
> --- /dev/null
> +++ b/t/a68-demo.sh
> @@ -0,0 +1,87 @@
> +#! /bin/sh
> +# Copyright (C) 2012-2025 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 <https://www.gnu.org/licenses/>.
> +
> +# Demo on Algol 68 support.
> +
> +required=ga68
> +am_create_testdir=empty
> +. test-init.sh
> +
> +cat > configure.ac << 'END'
> +AC_INIT([GNU Algol 68 Demo], [1.0], [bug-automake <at> gnu.org])
> +AC_CONFIG_SRCDIR([play.a68])
> +AC_CONFIG_AUX_DIR([build-aux])
> +AM_INIT_AUTOMAKE
> +AC_PROG_A68
> +AC_CONFIG_FILES([Makefile])
> +AC_OUTPUT
> +END
> +
> +cat > Makefile.am << 'END'
> +AUTOMAKE_OPTIONS = subdir-objects
> +
> +bin_PROGRAMS = work play
> +play_SOURCES = play.a68
> +work_SOURCES = work.a68
> +
> +.PHONY: test-objs
> +check-local: test-objs
> +test-objs:
> +	test -f play.$(OBJEXT)
> +	test -f work.$(OBJEXT)
> +END
> +
> +mkdir sub build-aux
> +
> +$ACLOCAL
> +$AUTOCONF
> +$AUTOMAKE --add-missing
> +
> +cat > work.a68 << 'END'
> +PROGRAM (puts ("We are working :-(\n"); 0)
> +END
> +
> +cat > play.a68 << 'END'
> +PROGRAM (puts ("We are playing :-)\n"); 0)
> +END
> +
> +./configure
> +$MAKE
> +$MAKE test-objs
> +
> +if ! cross_compiling; then
> +  unindent > exp.play << 'END'
> +    We are playing :-)
> +END
> +  unindent > exp.work << 'END'
> +    We are working :-(
> +END
> +  for p in play work; do
> +    # The program must run correctly (exit status = 0).
> +    ./$p
> +    # And it must have the expected output.  Note that we strip extra
> +    # CR characters (if any), to cater to MinGW programs on MSYS.
> +    # See automake bug#14493.
> +    ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; }
> +    cat exp.$p
> +    cat got.$p
> +    diff exp.$p got.$p
> +  done
> +fi
> +
> +$MAKE distcheck
> +
> +:




Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Sun, 26 Jan 2025 22:17:01 GMT) Full text and rfc822 format available.

Message #23 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: jemarch <at> gnu.org
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Sun, 26 Jan 2025 15:15:37 -0700
    New version of the patch below.

Thanks much, Jose. I'll take a look and install soonly, I hope. 
--all the best, karl.




Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Sun, 02 Feb 2025 21:40:01 GMT) Full text and rfc822 format available.

Message #26 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: jemarch <at> gnu.org
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Sun, 2 Feb 2025 14:38:46 -0700
    New version of the patch below.  

I pushed this. Thanks Jose!




Reply sent to Karl Berry <karl <at> freefriends.org>:
You have taken responsibility. (Sun, 02 Feb 2025 21:40:02 GMT) Full text and rfc822 format available.

Notification sent to "Jose E. Marchesi" <jemarch <at> gnu.org>:
bug acknowledged by developer. (Sun, 02 Feb 2025 21:40:02 GMT) Full text and rfc822 format available.

Information forwarded to automake-patches <at> gnu.org:
bug#75807; Package automake-patches. (Sun, 02 Feb 2025 21:52:02 GMT) Full text and rfc822 format available.

Message #34 received at 75807 <at> debbugs.gnu.org (full text, mbox):

From: "Jose E. Marchesi" <jemarch <at> gnu.org>
To: Karl Berry <karl <at> freefriends.org>
Cc: 75807 <at> debbugs.gnu.org
Subject: Re: [bug#75807] [PATCH,WIP] Support for the Algol 68 language
Date: Sun, 02 Feb 2025 22:50:30 +0100
Thank you Karl.
Now let's see if I can get the autoconf counterpart reviewed.

>     New version of the patch below.  
>
> I pushed this. Thanks Jose!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Mar 2025 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.