Re: [PATCH v4 1/19] modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite.

2022-12-12 Thread Gaius Mulley via Gcc-patches
Richard Biener  writes:

> On Sat, Dec 10, 2022 at 1:49 AM Gaius Mulley via Gcc-patches
>  wrote:
>>
>>
>> While writing the ChangeLog entries git gcc-verify spotted an oversight
>> with v3 of this patch set.  I had forgotten to post gm2.texi and also a
>> tiny patchlet in gcc/configure.ac (to detect Python).  HAVE_PYTHON is
>> used within gcc/m2/Make-lang.in to avoid generating the library section
>> included by gm2.texi should Python not be available.
>
> The configure check doesn't verify the python version.

indeed - I'll fix this

>  Does --enable-generated-files-in-srcdir (used when building release
> tarballs) generate the required section so it's packed up in the
> release tarball and avoid requiring python3 when building from the
> release tarball?

currently working on it - no it fails - should be done rsn.

> Note these kind of dependences should be mentioned in
> install.texi - for python also listing required modules would be nice.

I'll add these.

> Thanks,
> Richard.
>
>> ok to commit?  I've included gm2-lang.cc and lang.opt for reference.
>
> The python script would have been more informative, the generated
> .texi fragment and the Make-lang.in part as well

ah yes this is true, sorry.

regards,
Gaius


Re: [PATCH v4 1/19] modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite.

2022-12-11 Thread Richard Biener via Gcc-patches
On Sat, Dec 10, 2022 at 1:49 AM Gaius Mulley via Gcc-patches
 wrote:
>
>
> While writing the ChangeLog entries git gcc-verify spotted an oversight
> with v3 of this patch set.  I had forgotten to post gm2.texi and also a
> tiny patchlet in gcc/configure.ac (to detect Python).  HAVE_PYTHON is
> used within gcc/m2/Make-lang.in to avoid generating the library section
> included by gm2.texi should Python not be available.

The configure check doesn't verify the python version.  Does
--enable-generated-files-in-srcdir (used when building release
tarballs) generate the required section so it's packed up in the
release tarball and avoid requiring python3 when building from the
release tarball?

Note these kind of dependences should be mentioned in
install.texi - for python also listing required modules would be nice.

Thanks,
Richard.

> ok to commit?  I've included gm2-lang.cc and lang.opt for reference.

The python script would have been more informative, the generated
.texi fragment and the Make-lang.in part as well

> regards,
> Gaius
>
>
>
>
> diff -ruw gcc-git-master/gcc/configure.ac 
> gcc-git-devel-modula2/gcc/configure.ac
> --- gcc-git-master/gcc/configure.ac 2022-12-07 20:16:24.571677189 +
> +++ gcc-git-devel-modula2/gcc/configure.ac  2022-12-07 19:46:20.036302786 
> +
> @@ -1263,6 +1263,10 @@
>  # Bison?
>  AC_CHECK_PROGS([BISON], bison, [$MISSING bison])
>
> +# Python3?
> +AM_PATH_PYTHON(,, [:])
> +AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
> +
>  # Binutils are not build modules, unlike bison/flex/makeinfo.  So we
>  # check for build == host before using them.
>
> @@ -7651,4 +7655,3 @@
>  ],
>  [subdirs='$subdirs'])
>  AC_OUTPUT
> -
> diff -ruw /dev/null gcc-git-devel-modula2/gcc/doc/gm2.texi
> --- /dev/null   2022-08-24 16:22:16.88870 +0100
> +++ gcc-git-devel-modula2/gcc/doc/gm2.texi  2022-12-10 00:04:30.263603238 
> +
> @@ -0,0 +1,2944 @@
> +\input texinfo
> +@c -*-texinfo-*-
> +@c Copyright (C) 2001-2022 Free Software Foundation, Inc.
> +@c This is part of the GM2 manual.
> +
> +@c User level documentation for GNU Modula-2
> +@c
> +@c header
> +
> +@setfilename gm2.info
> +@settitle The GNU Modula-2 Compiler
> +
> +@set version-python  3.5
> +
> +@include gcc-common.texi
> +
> +@c Copyright years for this manual.
> +@set copyrights-gm2 1999-2022
> +
> +@copying
> +@c man begin COPYRIGHT
> +Copyright @copyright{} @value{copyrights-gm2} Free Software Foundation, Inc.
> +
> +Permission is granted to copy, distribute and/or modify this document
> +under the terms of the GNU Free Documentation License, Version 1.3 or
> +any later version published by the Free Software Foundation; with no
> +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
> +A copy of the license is included in the
> +@c man end
> +section entitled ``GNU Free Documentation License''.
> +@ignore
> +@c man begin COPYRIGHT
> +man page gfdl(7).
> +@c man end
> +@end ignore
> +@end copying
> +
> +@ifinfo
> +@format
> +@dircategory Software development
> +@direntry
> +* gm2: (gm2).   A GCC-based compiler for the Modula-2 language
> +@end direntry
> +@end format
> +
> +@insertcopying
> +@end ifinfo
> +
> +@titlepage
> +@title The GNU Modula-2 Compiler
> +@versionsubtitle
> +@author Gaius Mulley
> +
> +@page
> +@vskip 0pt plus 1filll
> +Published by the Free Software Foundation @*
> +51 Franklin Street, Fifth Floor@*
> +Boston, MA 02110-1301, USA@*
> +@sp 1
> +@insertcopying
> +@end titlepage
> +@contents
> +@page
> +
> +@c `Top' Node and Master Menu
> +
> +@node Top, Overview, (dir), (dir)
> +@top Introduction
> +
> +@menu
> +* Overview:: What is GNU Modula-2.
> +* Using::Using GNU Modula-2.
> +* Licence::  Licence of GNU Modula-2
> +* Copying::  GNU Public Licence V3.
> +* Contributing:: Contributing to GNU Modula-2
> +* Internals::GNU Modula-2 internals.
> +* EBNF:: EBNF of GNU Modula-2
> +* Libraries::PIM and ISO library definitions.
> +* Indices::  Document and function indices.
> +@end menu
> +
> +@node Overview, Using, Top, Top
> +@chapter Overview of GNU Modula-2
> +
> +@menu
> +* What is GNU Modula-2::  Brief description of GNU Modula-2.
> +* Why use GNU Modula-2::  Advantages of GNU Modula-2.
> +* News::  Latest news about GNU Modula-2.
> +* Development::   How to get source code using git.
> +* Obtaining:: Where to get the source code using git.
> +* Features::  GNU Modula-2 Features
> +@end menu
> +
> +@node What is GNU Modula-2, Why use GNU Modula-2, , Using
> +@section What is GNU Modula-2
> +
> +GNU Modula-2 is a @uref{http://gcc.gnu.org/frontends.html, front end}
> +for the GNU Compiler Collection (@uref{http://gcc.gnu.org/, GCC}).
> +The GNU Modula-2 compiler is compliant with the PIM2, PIM3, PIM4 and
> +ISO dialects.  Also implemented are a complete set of free ISO
> +libraries and PIM libraries.
> +
> +@footnote{The four Modula-2 dial

[PATCH v4 1/19] modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite.

2022-12-09 Thread Gaius Mulley via Gcc-patches


While writing the ChangeLog entries git gcc-verify spotted an oversight
with v3 of this patch set.  I had forgotten to post gm2.texi and also a
tiny patchlet in gcc/configure.ac (to detect Python).  HAVE_PYTHON is
used within gcc/m2/Make-lang.in to avoid generating the library section
included by gm2.texi should Python not be available.

ok to commit?  I've included gm2-lang.cc and lang.opt for reference.

regards,
Gaius




diff -ruw gcc-git-master/gcc/configure.ac gcc-git-devel-modula2/gcc/configure.ac
--- gcc-git-master/gcc/configure.ac 2022-12-07 20:16:24.571677189 +
+++ gcc-git-devel-modula2/gcc/configure.ac  2022-12-07 19:46:20.036302786 
+
@@ -1263,6 +1263,10 @@
 # Bison?
 AC_CHECK_PROGS([BISON], bison, [$MISSING bison])

+# Python3?
+AM_PATH_PYTHON(,, [:])
+AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
+
 # Binutils are not build modules, unlike bison/flex/makeinfo.  So we
 # check for build == host before using them.

@@ -7651,4 +7655,3 @@
 ],
 [subdirs='$subdirs'])
 AC_OUTPUT
-
diff -ruw /dev/null gcc-git-devel-modula2/gcc/doc/gm2.texi
--- /dev/null   2022-08-24 16:22:16.88870 +0100
+++ gcc-git-devel-modula2/gcc/doc/gm2.texi  2022-12-10 00:04:30.263603238 
+
@@ -0,0 +1,2944 @@
+\input texinfo
+@c -*-texinfo-*-
+@c Copyright (C) 2001-2022 Free Software Foundation, Inc.
+@c This is part of the GM2 manual.
+
+@c User level documentation for GNU Modula-2
+@c
+@c header
+
+@setfilename gm2.info
+@settitle The GNU Modula-2 Compiler
+
+@set version-python  3.5
+
+@include gcc-common.texi
+
+@c Copyright years for this manual.
+@set copyrights-gm2 1999-2022
+
+@copying
+@c man begin COPYRIGHT
+Copyright @copyright{} @value{copyrights-gm2} Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+A copy of the license is included in the
+@c man end
+section entitled ``GNU Free Documentation License''.
+@ignore
+@c man begin COPYRIGHT
+man page gfdl(7).
+@c man end
+@end ignore
+@end copying
+
+@ifinfo
+@format
+@dircategory Software development
+@direntry
+* gm2: (gm2).   A GCC-based compiler for the Modula-2 language
+@end direntry
+@end format
+
+@insertcopying
+@end ifinfo
+
+@titlepage
+@title The GNU Modula-2 Compiler
+@versionsubtitle
+@author Gaius Mulley
+
+@page
+@vskip 0pt plus 1filll
+Published by the Free Software Foundation @*
+51 Franklin Street, Fifth Floor@*
+Boston, MA 02110-1301, USA@*
+@sp 1
+@insertcopying
+@end titlepage
+@contents
+@page
+
+@c `Top' Node and Master Menu
+
+@node Top, Overview, (dir), (dir)
+@top Introduction
+
+@menu
+* Overview:: What is GNU Modula-2.
+* Using::Using GNU Modula-2.
+* Licence::  Licence of GNU Modula-2
+* Copying::  GNU Public Licence V3.
+* Contributing:: Contributing to GNU Modula-2
+* Internals::GNU Modula-2 internals.
+* EBNF:: EBNF of GNU Modula-2
+* Libraries::PIM and ISO library definitions.
+* Indices::  Document and function indices.
+@end menu
+
+@node Overview, Using, Top, Top
+@chapter Overview of GNU Modula-2
+
+@menu
+* What is GNU Modula-2::  Brief description of GNU Modula-2.
+* Why use GNU Modula-2::  Advantages of GNU Modula-2.
+* News::  Latest news about GNU Modula-2.
+* Development::   How to get source code using git.
+* Obtaining:: Where to get the source code using git.
+* Features::  GNU Modula-2 Features
+@end menu
+
+@node What is GNU Modula-2, Why use GNU Modula-2, , Using
+@section What is GNU Modula-2
+
+GNU Modula-2 is a @uref{http://gcc.gnu.org/frontends.html, front end}
+for the GNU Compiler Collection (@uref{http://gcc.gnu.org/, GCC}).
+The GNU Modula-2 compiler is compliant with the PIM2, PIM3, PIM4 and
+ISO dialects.  Also implemented are a complete set of free ISO
+libraries and PIM libraries.
+
+@footnote{The four Modula-2 dialects supported are defined in the following
+references:
+
+PIM2: 'Programming in Modula-2', 2nd Edition, Springer Verlag, 1982,
+1983 by Niklaus Wirth (PIM2).
+
+PIM3: 'Programming in Modula-2', 3rd Corrected Edition, Springer Verlag,
+1985 (PIM3).
+
+PIM4: 'Programming in Modula-2', 4th Edition, Springer Verlag, 1988
+(@uref{http://freepages.modula2.org/report4/modula-2.html, PIM4}).
+
+ISO: the ISO Modula-2 language as defined in 'ISO/IEC Information
+technology - programming languages - part 1: Modula-2 Language,
+ISO/IEC 10514-1 (1996)'
+}
+
+@node Why use GNU Modula-2, Release map, What is GNU Modula-2, Using
+@section Why use GNU Modula-2
+
+There are a number of advantages of using GNU Modula-2 rather than
+translate an existing project into another language.
+
+The first advantage is of maintainability of the original sources
+and the ability to debug the origi