From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1499) id 466603858CDA; Fri, 7 Oct 2022 19:10:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 466603858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665169839; bh=2b8+InoQY0wlPrkHHby2m3gywZ3d0e0Ck80VOffALwE=; h=From:To:Subject:Date:From; b=quQtcUB13CdMH2m0QceivfKWnpJEjFVNEP2iFoU0YA+9pFePL83bzpXckzUGgIHHh B+oP7xsVYEoeKGin7FD00nlqMHne33GaK4R2nZw5uDUbzbaJgJKpNETiAAkwfO53HG /6KNWcg3e1bezZKqAWrilbDi1CaR+iOLKmjlN7Zo= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Gaius Mulley To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/modula-2] Remove unnecessary scripts and scaffold files. X-Act-Checkin: gcc X-Git-Author: Gaius Mulley X-Git-Refname: refs/heads/devel/modula-2 X-Git-Oldrev: 2cd0f1de97a22c9eff85b88f6fb4a7cae64f2a9f X-Git-Newrev: b8bcd40cae5c18030f1adcd365eb875364d9ea76 Message-Id: <20221007191039.466603858CDA@sourceware.org> Date: Fri, 7 Oct 2022 19:10:39 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b8bcd40cae5c18030f1adcd365eb875364d9ea76 commit b8bcd40cae5c18030f1adcd365eb875364d9ea76 Author: Gaius Mulley 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 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 -# . -# -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 -# . -# -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 . -# -# 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 -# . -# -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('', string.join (option, ' '), '', end=' ') - elif option in t.getFails(): - print('', string.join (option, ' '), '', end=' ') - elif option in t.getUnresolved(): - print('', string.join (option, ' '), '', end=' ') - elif option == []: - print('', end=' ') - else: - print('', end=' ') - else: - print('', 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 = '' - heading += testcase + '' - 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("") - print("GNU Modula-2 regression tests") - print("") - print("") - print("

", end=' ') - print("GNU Modula-2 regression tests", end=' ') - print("

") - print("") - - print('

') - print('') - print('') - print('') - print('') - print('') - print('') - print('') - print('
Key
ColourMeaning
Pass
Fail
Unresolved due to a prior error
Not tested
Entire testcase not tested on this platform

') - print('') - - archList = list(regressionTests.keys ()) - print("

", end=' ') - print("Summary", end=' ') - print("

") - print('

') - print('', end=' ') - print('', end=' ') - for arch in archList: - print('', end=' ') - print('') - print('', end=' ') - for arch in archList: - if arch in passStats: - print('") - else: - print('') - print('') - print('', end=' ') - for arch in archList: - if arch in failStats: - print('") - else: - print('') - print('') - print('', end=' ') - for arch in archList: - if arch in unresolvedStats: - print('") - else: - print('') - print('') - print('
Status', arch, '
', passStats[arch], "none
', failStats[arch], "none
', unresolvedStats[arch], "none

') - - print("

", end=' ') - print("GNU Modula-2 regression test results", end=' ') - print("

") - - testlist = getListOfTests () - for testcase in testlist: - total, optlist = getListOfOptions (testcase) - if total > 0: - print('

') - print('') - for arch in archList: - print('', end=' ') - - if total % noColumns != 0: - total = ((total / noColumns) +1) * noColumns - for count in range (0, total, noColumns): - print('', 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('') - print('
', end=' ') - heading = getHeading (testcase) - print(heading, '
', arch, '

') - print('') - - -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 -#. - - -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 < ${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 \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 < ${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 \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 < ${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 < /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