public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Gaius Mulley <gaius@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/modula-2] Remove unnecessary scripts and scaffold files. Date: Fri, 7 Oct 2022 19:10:39 +0000 (GMT) [thread overview] Message-ID: <20221007191039.466603858CDA@sourceware.org> (raw) https://gcc.gnu.org/g:b8bcd40cae5c18030f1adcd365eb875364d9ea76 commit b8bcd40cae5c18030f1adcd365eb875364d9ea76 Author: Gaius Mulley <gaiusmod2@gmail.com> Date: Fri Oct 7 20:08:56 2022 +0100 Remove unnecessary scripts and scaffold files. gcc/m2/ChangeLog: * init/gm2-gccinit: Removed. * init/gm2linit: Removed. * tools-src/gensum.py: Removed. * tools-src/makeversion: Removed. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com> Diff: --- gcc/m2/init/gm2-gccinit | 97 ---------- gcc/m2/init/gm2linit | 66 ------- gcc/m2/tools-src/gensum.py | 428 ------------------------------------------- gcc/m2/tools-src/makeversion | 203 -------------------- 4 files changed, 794 deletions(-) diff --git a/gcc/m2/init/gm2-gccinit b/gcc/m2/init/gm2-gccinit deleted file mode 100755 index eb41223f2f9..00000000000 --- a/gcc/m2/init/gm2-gccinit +++ /dev/null @@ -1,97 +0,0 @@ -# gm2-gccinit list of Modula-2 modules used by cc1gm2. -# -# Copyright (C) 2000-2020 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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 3, or (at your option) -# any later version. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. -# -M2Bitset -Debug -M2Defaults -Environment -RTExceptions -M2EXCEPTION -M2RTS -SysExceptions -DynamicStrings -Assertion -FormatStrings -FIO -SFIO -SArgs -Lists -UnixArgs -Args -wrapc -TimeString -IO -StdIO -CmdArgs -M2Preprocess -M2Error -M2Search -Indexing -NameKey -NumberIO -FpuIO -SysStorage -Storage -StrIO -m2color -M2Debug -M2Batch -StrLib -M2ALU -M2Options -M2Comp -M2LexBuf -SymbolTable -M2Base -M2Quads -SymbolKey -FifoQueue -M2Reserved -M2Const -P0SymBuild -P1SymBuild -P2SymBuild -P3SymBuild -M2System -M2BasicBlock -M2Pass -M2Code -M2AsmUtil -M2FileName -M2Version -M2Students -StrCase -M2Entity -SymbolConversion -M2GCCDeclare -M2GenGCC -M2Range -M2Swig -M2MetaError -M2CaseList -PCSymBuild -PCBuild -M2Check -M2SSA -Sets -dtoa -ldtoa -gm2 -mod_init diff --git a/gcc/m2/init/gm2linit b/gcc/m2/init/gm2linit deleted file mode 100755 index d726ed21e66..00000000000 --- a/gcc/m2/init/gm2linit +++ /dev/null @@ -1,66 +0,0 @@ -# gm2linit list of Modula-2 modules used by gm2l. -# -# Copyright (C) 2000-2020 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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 3, or (at your option) -# any later version. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. -# -m2flex -RTExceptions -M2EXCEPTION -M2RTS -SysExceptions -DynamicStrings -Assertion -Debug -Environment -SEnvironment -SysStorage -Storage -FIO -SFIO -UnixArgs -CmdArgs -IO -M2LexBuf -StrIO -StrLib -NumberIO -Args -SArgs -Indexing -NameKey -M2Debug -M2Printf -M2Depth -M2Search -M2Defaults -M2FileName -M2Error -M2Preprocess -Lists -choosetemp -M2DriverOptions -M2Version -FormatStrings -StringConvert -StdIO -dtoa -ldtoa -M2ColorString -m2color -gm2l -mod_init diff --git a/gcc/m2/tools-src/gensum.py b/gcc/m2/tools-src/gensum.py deleted file mode 100644 index 9b5f516f349..00000000000 --- a/gcc/m2/tools-src/gensum.py +++ /dev/null @@ -1,428 +0,0 @@ -#!/usr/bin/env python3 -# -# gensum.py a utility for summarizing the regression tests into html. -# -# Copyright (C) 2007-2022 Free Software Foundation, Inc. -# Contributed by Gaius Mulley <gaius@glam.ac.uk>. -# -# This file is part of GNU Modula-2. -# -# GNU Modula-2 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 3, or (at your option) -# any later version. -# -# GNU Modula-2 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 GNU Modula-2; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. -# -import sys -import os -import glob -import string -import sys, getopt - - -class testcase: - name = "" - passes = [] - fails = [] - unresolved = [] - def __init__ (self, n): - self.name = n - self.passes = [] - self.fails = [] - self.unresolved = [] - def addPass (self, p): - self.passes += [p] - def addFail (self, p): - self.fails += [p] - def addUnresolved (self, p, r): - self.unresolved += [p, r] - def getPasses (self): - return self.passes - def getFails (self): - return self.fails - def getUnresolved (self): - return self.unresolved - - -# -# usage - displays the usage -# - -def usage (code): - global noColumns - - print("gensum [-h] [-c number] filename.sum {filename.sum}") - print(" -c number of columns per architectural table (default", noColumns, ")") - print(" -h help") - sys.exit (code) - - -# -# collectArgs - collects the arguments supplied and places -# useful contents into global variables. -# - -def collectArgs (): - global noColumns - try: - optlist, list = getopt.getopt (sys.argv[1:],':hc:') - except getopt.GetoptError: - usage (1) - for opt in optlist: - if opt[0] == '-h': - usage (0) - if opt[0] == '-c': - noColumns = int (opt[1]) - return list - - -# -# scanner - generic function to read in a file, name, -# and call, function, on each line read. -# - -def scanner (name, function): - file = open (name, 'r') - line = file.readline () - while line: - function (line) - line = file.readline () - file.close () - -# -# addPassResult - adds the pass information into the global dictionary. -# - -def addPassResult (name, varient): - global regressionTests, configuration, passStats - - if configuration not in regressionTests: - regressionTests[configuration] = {} - - arch = regressionTests[configuration] - if name in arch: - t = arch[name] - else: - t = testcase (name) - t.addPass (varient) - arch[name] = t - regressionTests[configuration] = arch - if configuration in passStats: - passStats[configuration] += 1 - else: - passStats[configuration] = 1 - - -# -# addFailResult - adds the fail information into the global dictionary. -# - -def addFailResult (name, varient): - global regressionTests, configuration, failStats - - if configuration not in regressionTests: - regressionTests[configuration] = {} - - arch = regressionTests[configuration] - if name in arch: - t = arch[name] - else: - t = testcase (name) - t.addFail (varient) - arch[name] = t - regressionTests[configuration] = arch - if configuration in failStats: - failStats[configuration] += 1 - else: - failStats[configuration] = 1 - - - -# -# addUnresolvedResult - adds the unresolved information into the global dictionary. -# - -def addUnresolvedResult (name, varient, reason): - global regressionTests, configuration, unresolvedStats - - if configuration not in regressionTests: - regressionTests[configuration] = {} - - arch = regressionTests[configuration] - if name in arch: - t = arch[name] - else: - t = testcase (name) - t.addUnresolved (varient, reason) - arch[name] = t - regressionTests[configuration] = arch - if configuration in unresolvedStats: - unresolvedStats[configuration] += 1 - else: - unresolvedStats[configuration] = 1 - - -# -# getName - returns the gm2 git testcase path -# - -def getName (testcase, directory): - words = string.split (directory, '/') - result = "" - found = False - for word in words: - if word == "testsuite": - found = True - result = word - elif word == "gm2.exp": - pass - elif found: - result = "%s/%s" % (result, word) - words = string.split (testcase, '/') - name = "%s/%s" % (result, words[-1]) - if name[-1] == ',': - name = name[:-1] - return name - -# -# processLine - -# - -def processLine(line): - global author, date, configuration, target, directory - words = string.split (line) - # Test Run By xxxx on - if (len (words) >= 4) and (words[:3] == ["Test", "Run", "By"]): - author = words[3] - if (len (words) >= 6) and (words[4] == "on"): - date = words[-5:] - elif (len (words) >= 4) and (words[:3] == [ "Native", "configuration", "is"]): - configuration = words[3] - elif (len (words) >= 3) and (words[:2] == [ "Running", "target"]): - target = words[2] - elif (len (words) >= 2) and (words[0] == "Running"): - directory = words[1] - elif len(words)>1: - testcase = words[1] - varient = [] - reason = "" - if testcase.find ('gm2/non-free') == -1: - if words[0]=="PASS:": - if len (words) >= 2: - varient = words[2:] - addPassResult (getName (testcase, directory), varient) - elif words[0]=="FAIL:": - if len (words)>=2: - varient = words[2:] - addFailResult (getName (testcase, directory), varient) - elif words[0]=="UNRESOLVED:": - if len (words) > 2: - start = -1 - if words[-1][-1]==')': - while (-start < len (words)) and (words[start][0] != '('): - start -= 1 - varient = words[2:start] - reason = words[start:] - addUnresolvedResult (getName (testcase, directory), varient, reason) - - -# -# printRow - prints out a table data entry for architecture and option. -# - -def printRow (testcase, arch, option): - if testcase in regressionTests[arch]: - t = regressionTests[arch][testcase] - if option in t.getPasses (): - print('<td bgcolor="green">', string.join (option, ' '), '</td>', end=' ') - elif option in t.getFails(): - print('<td bgcolor="red">', string.join (option, ' '), '</td>', end=' ') - elif option in t.getUnresolved(): - print('<td bgcolor="yellow">', string.join (option, ' '), '</td>', end=' ') - elif option == []: - print('<td></td>', end=' ') - else: - print('<td></td>', end=' ') - else: - print('<td></td>', end=' ') - - -# -# getListOfTests - returns the list of all tests -# - -def getListOfTests (): - global regressionTests - - list = [] - for arch in list(regressionTests.keys ()): - t = regressionTests[arch] - for u in list(t.keys ()): - if not (u in list): - list += [u] - return list - - -# -# getListOfOptions - returns the (total, optlist) for testcase -# in the regressionTests -# - -def getListOfOptions (testcase): - global regressionTests - - optlist = [] - total = 0 - for arch in list(regressionTests.keys ()): - t = regressionTests[arch] - if testcase in t: - u = t[testcase] - for p in u.getPasses () + u.getFails () + u.getUnresolved (): - if not (p in optlist): - optlist += [p] - return len (optlist), optlist - - -# -# getHeading - returns a URL to the testcase. -# - -def getHeading (testcase): - noFiles = ['pimlib/ulm', 'pimlib/pass', 'ulmlib/pass', 'ulmlib/std', - 'ulmlib/sys', 'gm2/examples', 'gm2/non-free'] - for n in noFiles: - if testcase.find (n) != -1: - return testcase - heading = '<a href="http://git.savannah.gnu.org/cgit/gm2.git/tree/gcc-versionno/gcc/%s' % testcase - heading += '">' - heading += testcase + '</a>' - return heading - -# -# printResults - prints the resuls in a html tabular form -# - -def printResults(): - global target, configuration, author, date, regressionTests, noColumns - global passStats, failStats, unresolvedStats - - print("<html><head><title>") - print("GNU Modula-2 regression tests") - print("</title></head>") - print("") - print("<h1>", end=' ') - print("GNU Modula-2 regression tests", end=' ') - print("</h1>") - print("") - - print('<p><table border="1"><tr>') - print('<th colspan="2">Key</th>') - print('<tr><td>Colour</td><td>Meaning</td></tr>') - print('<tr><td bgcolor="green"></td><td>Pass</td></tr>') - print('<tr><td bgcolor="red"></td><td>Fail</td></tr>') - print('<tr><td bgcolor="yellow"></td><td>Unresolved due to a prior error</td></tr>') - print('<tr><td bgcolor="blue"></td><td>Not tested</td></tr>') - print('<tr><td></td><td>Entire testcase not tested on this platform</td></tr>') - print('</table></p>') - print('') - - archList = list(regressionTests.keys ()) - print("<h2>", end=' ') - print("Summary", end=' ') - print("</h2>") - print('<p><table border="1">') - print('<tr>', end=' ') - print('<th colspan="1">Status</th>', end=' ') - for arch in archList: - print('<th colspan="1">', arch, '</th>', end=' ') - print('</tr>') - print('<tr><td bgcolor="green"></td>', end=' ') - for arch in archList: - if arch in passStats: - print('<td bgcolor="green">', passStats[arch], "</td>") - else: - print('<td bgcolor="green">none</td>') - print('</tr>') - print('<tr><td bgcolor="red"></td>', end=' ') - for arch in archList: - if arch in failStats: - print('<td bgcolor="red">', failStats[arch], "</td>") - else: - print('<td bgcolor="red">none</td>') - print('</tr>') - print('<tr><td bgcolor="yellow"></td>', end=' ') - for arch in archList: - if arch in unresolvedStats: - print('<td bgcolor="yellow">', unresolvedStats[arch], "</td>") - else: - print('<td bgcolor="yellow">none</td>') - print('</tr>') - print('</table></p>') - - print("<h1>", end=' ') - print("GNU Modula-2 regression test results", end=' ') - print("</h1>") - - testlist = getListOfTests () - for testcase in testlist: - total, optlist = getListOfOptions (testcase) - if total > 0: - print('<p><table border="1"><tr>') - print('<th colspan="', len (archList) * noColumns, '">', end=' ') - heading = getHeading (testcase) - print(heading, '</th></tr>') - for arch in archList: - print('<th colspan="', noColumns, '">', arch, '</th>', end=' ') - - if total % noColumns != 0: - total = ((total / noColumns) +1) * noColumns - for count in range (0, total, noColumns): - print('<tr>', end=' ') - for arch in archList: - for c in range (count, count+noColumns): - if c < len (optlist): - printRow (testcase, arch, optlist[c]) - else: - printRow (testcase, arch, []) - print('</tr>') - print('</table></p>') - print('</html>') - - -target = "" -configuration = "" -author = "" -date = "" -regressionTests = {} -noColumns = 3 -directory = "" -passStats = {} -failStats = {} -unresolvedStats = {} - - -# -# main - collects the arguments and reads in each summary file -# in turn populating the architecture dictionary in turn. -# - -def main(): - global regressionTests - - filenames = collectArgs () - if filenames==[]: - usage (0) - else: - for file in filenames: - scanner (file, processLine) - printResults () - -main() diff --git a/gcc/m2/tools-src/makeversion b/gcc/m2/tools-src/makeversion deleted file mode 100755 index cabab1470b5..00000000000 --- a/gcc/m2/tools-src/makeversion +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/sh - -# makeversion a script which creates the version modules. - -# Copyright (C) 2000-2022 Free Software Foundation, Inc. - -#This file is part of GCC. - -#GCC 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 3, or (at your option) -#any later version. - -#GCC 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 GCC; see the file COPYING3. If not see -#<http://www.gnu.org/licenses/>. - - -doM2 () { -/bin/rm -f M2Version.mod - -cat << EOF >> ${SUBDIR}/M2Version.mod -IMPLEMENTATION MODULE M2Version ; - -FROM DynamicStrings IMPORT InitString, Mark, Slice ; - - -(* Generated by makeversion - do not edit *) - -PROCEDURE GetGM2Version () : String ; -BEGIN - RETURN InitString('${GM2VERSION}') -END GetGM2Version ; - - -PROCEDURE GetGM2Date () : String ; -BEGIN - RETURN InitString("`date '+%Y%m%d'`") -END GetGM2Date ; - - -PROCEDURE GetGCCVersion () : String ; -BEGIN - RETURN InitString('${GCCVERSION}') -END GetGCCVersion ; - - -PROCEDURE GetYear () : String ; -BEGIN - RETURN Slice(Mark(InitString(__DATE__)), -4, 0) -END GetYear ; - - -END M2Version. -EOF -} - - -doC () { - -cat <<EOF > ${SUBDIR}/gm2version.c -/* Generated by makeversion - do not edit */ -#include "config.h" -#include "system.h" - -void gm2_version (int need_to_exit); - -void gm2_version (int need_to_exit) -{ - printf("GNU Modula-2 ${GM2VERSION} (`date '+%Y%m%d'`)\n"); - printf(" grafted onto GCC ${GCCVERSION}\n"); - printf("Copyright (C) `date '+%Y'` Free Software Foundation, Inc.\n"); - printf("License GPLv2: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n") ; - printf("This is free software: you are free to change and redistribute it.\n") ; - printf("There is NO WARRANTY, to the extent permitted by law.\n") ; - if (need_to_exit) - exit (0); -} -EOF -} - - -doCP () { - -cat <<EOF > ${SUBDIR}/gm2version.c -/* Generated by makeversion - do not edit */ -#include "config.h" -#include "system.h" - -void gm2_version (int need_to_exit); - -void gm2_version (int need_to_exit) -{ - printf("GNU Modula-2 ${GM2VERSION} (`date '+%Y%m%d'`)\n"); - printf(" grafted onto GCC ${GCCVERSION}\n"); - printf("Copyright (C) `date '+%Y'` Free Software Foundation, Inc.\n"); - printf("License GPLv2: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n") ; - printf("This is free software: you are free to change and redistribute it.\n") ; - printf("There is NO WARRANTY, to the extent permitted by law.\n") ; - if (need_to_exit) - exit (0); -} -EOF -} - - -doTexi () { - -cat <<EOF > ${SUBDIR}/version.texi - -@c Generated by makeversion - do not edit - -@set version-GM2 ${GM2VERSION} -@set version-GCC ${GCCVERSION} -@set version-update ${TEXIUPDATE} - -EOF -} - - -progname=$0 - -usage () { - cat <<EOF -Usage: $progname [-m][-c][-t] - -m generates a Modula-2 module M2Version.mod - -c generates a C file gm2version.c - -p generates a C++ file gm2version.c - -t generates a texi file version.texi -EOF - exit 0 -} - -M2=no -C=no -CP=no -TEXI=no - -while getopts ":mchpt" opt; do - case $opt in - - m ) M2=yes ;; - c ) C=yes ;; - p ) CP=yes ;; - t ) TEXI=yes ;; - h ) usage ;; - \\?) usage ;; - esac -done - -shift $(($OPTIND - 1)) - -SRCDIR=$1 -SUBDIR=$2 -GM2VERSION=`cat ${SRCDIR}/m2/version.c | sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/g'` -GCCVERSION=`cat ${SRCDIR}/BASE-VER` - -pos=`grep -n texi ${SRCDIR}/m2/ChangeLog | head -1 | cut -f1 -d':'` -THEDATE=`head -n ${pos} ${SRCDIR}/m2/ChangeLog | grep ^2 | head -1 | cut -f1 -d' ' | cut -f1` - -if date --date=${THEDATE} +'%A %e %B %Y' > /dev/null 2>&1 ; then - # - # GNU date - # - TEXIUPDATE=`date --date=${THEDATE} +'%A %e %B %Y'` -elif date -j -f "%Y-%m-%d" ${THEDATE} +"%d %b %Y" > /dev/null 2>&1 ; then - # - # assuming FreeBSD date - # - TEXIUPDATE=`date -j -f "%Y-%m-%d" ${THEDATE} +"%d %b %Y"` -else - # - # no idea - so we just use the date in ChangeLog format - # - TEXIUPDATE=${THEDATE} -fi - -if [ "${M2}" = "yes" ] ; then - doM2 -elif [ "${C}" = "yes" ] ; then - doC -elif [ "${CP}" = "yes" ] ; then - doCP -elif [ "${TEXI}" = "yes" ] ; then - doTexi -else - usage -fi - -# -# now we test the consistency of the release number in -# $(srcdir)/m2/gm2-libs/config-host.in -# - -if [ "`grep AC_INIT ${SRCDIR}/m2/gm2-libs/config-host.in | grep ${GM2VERSION}`" = "" ] ; then - echo "makeversion has found a consistency error: the ${SRCDIR}/m2/gm2-libs/config-host.in does not match the GNU Modula-2 release number" - exit 1 -fi
reply other threads:[~2022-10-07 19:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221007191039.466603858CDA@sourceware.org \ --to=gaius@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).