[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[automake-commit] branch master updated: Add support for the Algol 68 pr
From: |
Karl Berry |
Subject: |
[automake-commit] branch master updated: Add support for the Algol 68 programming language. |
Date: |
Sun, 02 Feb 2025 13:11:47 -0500 |
This is an automated email from the git hooks/post-receive script.
karl pushed a commit to branch master
in repository automake.
View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=bbb06167cc9aac0c28a28db70e042bf9f1aa7c0c
The following commit(s) were added to refs/heads/master by this push:
new bbb06167c Add support for the Algol 68 programming language.
bbb06167c is described below
commit bbb06167cc9aac0c28a28db70e042bf9f1aa7c0c
Author: Jose Marchesi <jemarch@gnu.org>
AuthorDate: Sun Feb 2 10:11:24 2025 -0800
Add support for the Algol 68 programming language.
* 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 found.
* lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for GA68
and GA68FLAGS.
* t/a68-demo.sh: New test.
* doc/automake.texi (Algol 68 Support): New section.
* NEWS: Add entry for Algol 68.
---
NEWS | 4 +++
bin/automake.in | 27 +++++++++++++--
configure.ac | 10 ++++++
doc/automake.texi | 36 ++++++++++++++++++++
lib/Automake/Variable.pm | 2 ++
t/a68-demo.sh | 87 ++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 163 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index b4c50ffc6..e514fb1a6 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 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 c08b83972..79a8bc898 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -1021,6 +1021,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.
@@ -5562,7 +5580,8 @@ 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);
}
}
}
@@ -6055,7 +6074,8 @@ sub resolve_linker
{
my (%linkers) = @_;
- foreach my $l (qw(GCJLINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK
UPCLINK))
+ foreach my $l (qw(GCJLINK OBJCXXLINK CXXLINK F77LINK FCLINK
+ OBJCLINK UPCLINK A68LINK))
{
return $l if defined $linkers{$l};
}
@@ -6174,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..03d99856c 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,40 @@ 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
+@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{A68FLAGS}.
+
+@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 a949f68d9..d454ff755 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -180,6 +180,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..ac07dff2e
--- /dev/null
+++ b/t/a68-demo.sh
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 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/>.
+
+# Basic check for 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@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
+
+:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [automake-commit] branch master updated: Add support for the Algol 68 programming language.,
Karl Berry <=