From 59404acfd4f9393c637ca05d71e00349f7c1a73b Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 1 Jun 2018 13:45:13 -0700 Subject: [PATCH] plugins: Copy .crf reports into the build log. --- src/blowfish/Makefile.am | 4 +--- src/blowfish/compile.sh | 40 +++++++++++++++++++++++++++++++++++++++ src/gdbm/Makefile.am | 4 +--- src/gdbm/compile.sh | 40 +++++++++++++++++++++++++++++++++++++++ src/mcrypt/Makefile.am | 4 +--- src/mcrypt/compile.sh | 40 +++++++++++++++++++++++++++++++++++++++ src/mhash/Makefile.am | 4 +--- src/mhash/compile.sh | 40 +++++++++++++++++++++++++++++++++++++++ src/pgsql/Makefile.am | 4 +--- src/pgsql/compile.sh | 40 +++++++++++++++++++++++++++++++++++++++ src/x11-screen/compile.sh | 10 +++++++--- src/x11/compile.sh | 10 +++++++--- 12 files changed, 219 insertions(+), 21 deletions(-) create mode 100755 src/blowfish/compile.sh create mode 100755 src/gdbm/compile.sh create mode 100755 src/mcrypt/compile.sh create mode 100755 src/mhash/compile.sh create mode 100755 src/pgsql/compile.sh diff --git a/src/blowfish/Makefile.am b/src/blowfish/Makefile.am index db32c20b7..17f37cf84 100644 --- a/src/blowfish/Makefile.am +++ b/src/blowfish/Makefile.am @@ -71,9 +71,7 @@ blowfish-const.scm: blowfish-const @MIT_SCHEME_DEPS@ stamp-scheme: stamp-shim $(sources) blowfish.pkg touch stamp-scheme - if ! echo '(load "compile.scm")' \ - | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode; then \ - rm stamp-scheme; exit 1; fi + if ! ./compile.sh; then rm stamp-scheme; exit 1; fi CLEANFILES = blowfish-const* blowfish-shim.c CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd diff --git a/src/blowfish/compile.sh b/src/blowfish/compile.sh new file mode 100755 index 000000000..6b5f9d9df --- /dev/null +++ b/src/blowfish/compile.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, +# 2015, 2016, 2017 Massachusetts Institute of Technology +# +# This file is part of a Blowfish plugin for MIT/GNU Scheme. +# +# This plugin 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 of the License, or +# (at your option) any later version. +# +# This plugin 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 plugin; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# Compile the Blowfish option. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +(load "compile.scm") +EOF +suffix=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +report=blowfish-$suffix.crf +if [ -s "$report" ]; then + echo "$0: warning: $report is not empty" + awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report + exit 1 +fi diff --git a/src/gdbm/Makefile.am b/src/gdbm/Makefile.am index 41dbc370c..20b01cd9e 100644 --- a/src/gdbm/Makefile.am +++ b/src/gdbm/Makefile.am @@ -71,9 +71,7 @@ gdbm-const.scm: gdbm-const @MIT_SCHEME_DEPS@ stamp-scheme: stamp-shim $(sources) gdbm.pkg touch stamp-scheme - if ! echo '(load "compile.scm")' \ - | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode; then \ - rm stamp-scheme; exit 1; fi + if ! ./compile.sh; then rm stamp-scheme; exit 1; fi CLEANFILES = gdbm-const* gdbm-shim.c CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd diff --git a/src/gdbm/compile.sh b/src/gdbm/compile.sh new file mode 100755 index 000000000..04df7ca99 --- /dev/null +++ b/src/gdbm/compile.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, +# 2015, 2016, 2017 Massachusetts Institute of Technology +# +# This file is part of a gdbm plugin for MIT/GNU Scheme. +# +# This plugin 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 of the License, or +# (at your option) any later version. +# +# This plugin 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 plugin; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# Compile the GDBM option. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +(load "compile.scm") +EOF +suffix=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +report=gdbm-$suffix.crf +if [ -s "$report" ]; then + echo "$0: warning: $report is not empty" + awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report + exit 1 +fi diff --git a/src/mcrypt/Makefile.am b/src/mcrypt/Makefile.am index c6e48ee25..d891d6a35 100644 --- a/src/mcrypt/Makefile.am +++ b/src/mcrypt/Makefile.am @@ -71,9 +71,7 @@ mcrypt-const.scm: mcrypt-const @MIT_SCHEME_DEPS@ stamp-scheme: stamp-shim $(sources) mcrypt.pkg touch stamp-scheme - if ! echo '(load "compile.scm")' \ - | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode; then \ - rm stamp-scheme; exit 1; fi + if ! ./compile.sh; then rm stamp-scheme; exit 1; fi CLEANFILES = mcrypt-const* mcrypt-shim.c CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd diff --git a/src/mcrypt/compile.sh b/src/mcrypt/compile.sh new file mode 100755 index 000000000..20003883d --- /dev/null +++ b/src/mcrypt/compile.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, +# 2015, 2016, 2017 Massachusetts Institute of Technology +# +# This file is part of a mcrypt plugin for MIT/GNU Scheme. +# +# This plugin 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 of the License, or +# (at your option) any later version. +# +# This plugin 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 plugin; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# Compile the Mcrypt option. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +(load "compile.scm") +EOF +suffix=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +report=mcrypt-$suffix.crf +if [ -s "$report" ]; then + echo "$0: warning: $report is not empty" + awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report + exit 1 +fi diff --git a/src/mhash/Makefile.am b/src/mhash/Makefile.am index 9f81193cb..5f5245787 100644 --- a/src/mhash/Makefile.am +++ b/src/mhash/Makefile.am @@ -71,9 +71,7 @@ mhash-const.scm: mhash-const @MIT_SCHEME_DEPS@ stamp-scheme: stamp-shim $(sources) mhash.pkg touch stamp-scheme - if ! echo '(load "compile.scm")' \ - | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode; then \ - rm stamp-scheme; exit 1; fi + if ! ./compile.sh; then rm stamp-scheme; exit 1; fi CLEANFILES = mhash-const* mhash-shim.c CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd diff --git a/src/mhash/compile.sh b/src/mhash/compile.sh new file mode 100755 index 000000000..a83758aad --- /dev/null +++ b/src/mhash/compile.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, +# 2015, 2016, 2017 Massachusetts Institute of Technology +# +# This file is part of a mhash plugin for MIT/GNU Scheme. +# +# This plugin 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 of the License, or +# (at your option) any later version. +# +# This plugin 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 plugin; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# Compile the Mhash option. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +(load "compile.scm") +EOF +suffix=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +report=mhash-$suffix.crf +if [ -s "$report" ]; then + echo "$0: warning: $report is not empty" + awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report + exit 1 +fi diff --git a/src/pgsql/Makefile.am b/src/pgsql/Makefile.am index 267f6a33c..06c500ea2 100644 --- a/src/pgsql/Makefile.am +++ b/src/pgsql/Makefile.am @@ -71,9 +71,7 @@ pgsql-const.scm: pgsql-const @MIT_SCHEME_DEPS@ stamp-scheme: stamp-shim $(sources) pgsql.pkg touch stamp-scheme - if ! echo '(load "compile.scm")' \ - | $(MIT_SCHEME_EXE) --prepend-library . --batch-mode; then \ - rm stamp-scheme; exit 1; fi + if ! ./compile.sh; then rm stamp-scheme; exit 1; fi CLEANFILES = pgsql-const* pgsql-shim.c CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd diff --git a/src/pgsql/compile.sh b/src/pgsql/compile.sh new file mode 100755 index 000000000..c6abb7523 --- /dev/null +++ b/src/pgsql/compile.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, +# 2015, 2016, 2017 Massachusetts Institute of Technology +# +# This file is part of a PostgreSQL plugin for MIT/GNU Scheme. +# +# This plugin 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 of the License, or +# (at your option) any later version. +# +# This plugin 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 plugin; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# Compile the PostgreSQL option. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +(load "compile.scm") +EOF +suffix=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +report=pgsql-$suffix.crf +if [ -s "$report" ]; then + echo "$0: warning: $report is not empty" + awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report + exit 1 +fi diff --git a/src/x11-screen/compile.sh b/src/x11-screen/compile.sh index 40381c41e..775ab8586 100755 --- a/src/x11-screen/compile.sh +++ b/src/x11-screen/compile.sh @@ -49,7 +49,11 @@ ${MIT_SCHEME_EXE} --batch-mode <<\EOF (cref/generate-constructors "x11-screen") ) EOF -SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ +suffix=`echo "(display (microcode-id/operating-system-suffix))" \ | ${MIT_SCHEME_EXE} --batch-mode` -REPORT=x11-screen-$SUFFIX.crf -if [ -s "$REPORT" ]; then echo "$REPORT:1: error: not empty"; exit 1; fi +report=x11-screen-$suffix.crf +if [ -s "$report" ]; then + echo "$0: warning: $report is not empty" + awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report + exit 1 +fi diff --git a/src/x11/compile.sh b/src/x11/compile.sh index e50bf9ab8..ed575d1d3 100755 --- a/src/x11/compile.sh +++ b/src/x11/compile.sh @@ -43,7 +43,11 @@ ${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF (cref/generate-constructors "x11") ) EOF -SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ +suffix=`echo "(display (microcode-id/operating-system-suffix))" \ | ${MIT_SCHEME_EXE} --batch-mode` -REPORT=x11-$SUFFIX.crf -if [ -s "$REPORT" ]; then echo "$REPORT:1: error: not empty"; exit 1; fi +report=x11-$suffix.crf +if [ -s "$report" ]; then + echo "$0: warning: $report is not empty" + awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report + exit 1 +fi -- 2.25.1