From 4f6d5efb68774b1b6a7aa5d222381062ab7090d3 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 18 Jul 2019 14:43:01 -0400 Subject: [PATCH] Make sure that host-adapter is loaded when compiling external modules. This is necessary now because it modifies SF. --- src/Makefile.in | 18 ++++++++++-------- src/blowfish/compile.sh | 5 +++-- src/edwin/compile.sh | 9 +++++---- src/gdbm/compile.sh | 5 +++-- src/imail/compile.sh | 5 +++-- src/mcrypt/compile.sh | 5 +++-- src/pgsql/compile.sh | 5 +++-- src/x11-screen/compile.sh | 5 +++-- src/x11/compile.sh | 5 +++-- 9 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index 369b8cc94..65ee47c9a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -91,6 +91,8 @@ HOST_SF_ONLY = '$(MIT_SCHEME_EXE)' --batch-mode $(HOST_COMPILER_HEAP) \ --band runtime.com --no-init-file --eval '(load-option (quote sf))' \ --load runtime/host-adapter.scm +MODULE_SCHEME_FLAGS = --load ../runtime/host-adapter.scm + # This rule is for LIARC. .SUFFIXES: .bld .pkd .c .pkd.c .bld.c: @@ -405,7 +407,7 @@ all-blowfish: compile-blowfish .PHONY: compile-blowfish compile-blowfish: compile-runtime compile-ffi - (cd blowfish && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd blowfish && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) .PHONY: compile-blowfish-c compile-blowfish-c: @@ -423,7 +425,7 @@ compile-edwin: compile-runtime compile-xml @IF_BLOWFISH@compile-edwin: compile-blowfish @IF_GDBM@compile-edwin: compile-gdbm @IF_X11@compile-edwin: compile-x11 - (cd edwin && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd edwin && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) ################ # gdbm @@ -434,7 +436,7 @@ all-gdbm: compile-gdbm .PHONY: compile-gdbm compile-gdbm: compile-runtime compile-ffi - (cd gdbm && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd gdbm && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) .PHONY: compile-gdbm-c compile-gdbm-c: @@ -449,7 +451,7 @@ all-imail: compile-imail .PHONY: compile-imail compile-imail: compile-runtime compile-sos compile-edwin compile-star-parser - (cd imail && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd imail && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) ################ # mcrypt @@ -460,7 +462,7 @@ all-mcrypt: compile-mcrypt .PHONY: compile-mcrypt compile-mcrypt: compile-runtime compile-ffi - (cd mcrypt && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd mcrypt && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) .PHONY: compile-mcrypt-c compile-mcrypt-c: @@ -475,7 +477,7 @@ all-pgsql: compile-pgsql .PHONY: compile-pgsql compile-pgsql: compile-runtime compile-ffi - (cd pgsql && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd pgsql && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) .PHONY: compile-pgsql-c compile-pgsql-c: @@ -490,7 +492,7 @@ all-x11: compile-x11 .PHONY: compile-x11 compile-x11: compile-runtime compile-ffi - (cd x11 && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd x11 && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) .PHONY: compile-x11-c compile-x11-c: @@ -505,7 +507,7 @@ all-x11-screen: compile-x11-screen .PHONY: compile-x11-screen compile-x11-screen: compile-runtime compile-x11 compile-edwin - (cd x11-screen && MIT_SCHEME_EXE=$(MIT_SCHEME_EXE) $(MAKE)) + (cd x11-screen && MIT_SCHEME_EXE='$(MIT_SCHEME_EXE)' MIT_SCHEME_FLAGS='$(MODULE_SCHEME_FLAGS)' $(MAKE)) ##################### ### Cross compilation diff --git a/src/blowfish/compile.sh b/src/blowfish/compile.sh index a7f8e870b..0291a7732 100755 --- a/src/blowfish/compile.sh +++ b/src/blowfish/compile.sh @@ -28,11 +28,12 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (load "compile.scm") EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=blowfish-$suffix.crf if [ -s "$report" ]; then echo "$0: warning: $report is not empty" diff --git a/src/edwin/compile.sh b/src/edwin/compile.sh index a5ddd7dc3..f7da3a21d 100755 --- a/src/edwin/compile.sh +++ b/src/edwin/compile.sh @@ -13,12 +13,12 @@ # 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. -# +# # MIT/GNU Scheme 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 MIT/GNU Scheme; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, @@ -28,14 +28,15 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (begin (load "edwin.sf") (load "edwin.cbf")) EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=edwin-$suffix.crf if [ -s "$report" ]; then awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report diff --git a/src/gdbm/compile.sh b/src/gdbm/compile.sh index 03f2cdcab..19f3f5c66 100755 --- a/src/gdbm/compile.sh +++ b/src/gdbm/compile.sh @@ -28,11 +28,12 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (load "compile.scm") EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=gdbm-$suffix.crf if [ -s "$report" ]; then echo "$0: warning: $report is not empty" diff --git a/src/imail/compile.sh b/src/imail/compile.sh index 2416325d8..ed64298c1 100755 --- a/src/imail/compile.sh +++ b/src/imail/compile.sh @@ -28,11 +28,12 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (load "compile.scm") EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=imail-$suffix.crf if [ -s "$report" ]; then awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report diff --git a/src/mcrypt/compile.sh b/src/mcrypt/compile.sh index 53efa0ede..82fbb5020 100755 --- a/src/mcrypt/compile.sh +++ b/src/mcrypt/compile.sh @@ -28,11 +28,12 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (load "compile.scm") EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=mcrypt-$suffix.crf if [ -s "$report" ]; then echo "$0: warning: $report is not empty" diff --git a/src/pgsql/compile.sh b/src/pgsql/compile.sh index 8c70dcb53..3f5ca5671 100755 --- a/src/pgsql/compile.sh +++ b/src/pgsql/compile.sh @@ -28,11 +28,12 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (load "compile.scm") EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=pgsql-$suffix.crf if [ -s "$report" ]; then echo "$0: warning: $report is not empty" diff --git a/src/x11-screen/compile.sh b/src/x11-screen/compile.sh index 6b1cf5be7..79feaf2ed 100755 --- a/src/x11-screen/compile.sh +++ b/src/x11-screen/compile.sh @@ -28,11 +28,12 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (load "compile.scm") EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=x11-screen-$suffix.crf if [ -s "$report" ]; then echo "$0: warning: $report is not empty" diff --git a/src/x11/compile.sh b/src/x11/compile.sh index 544c0ce06..4be7b070f 100755 --- a/src/x11/compile.sh +++ b/src/x11/compile.sh @@ -28,11 +28,12 @@ set -e : ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF +: ${MIT_SCHEME_FLAGS=} +${MIT_SCHEME_EXE} --prepend-library . --batch-mode --no-init-file ${MIT_SCHEME_FLAGS} <<\EOF (load "compile.scm") EOF suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` + | ${MIT_SCHEME_EXE} --batch-mode --no-init-file` report=x11-$suffix.crf if [ -s "$report" ]; then echo "$0: warning: $report is not empty" -- 2.25.1