Build fixes for FreeBSD

Robert Ransom <[email protected]> Thu, 21 Jun 2012 21:05:19 +0000
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <CABqy+srGD0nnVQA1RBvjDjc3SAD+MjujqJaEE7ormrQLn2i4Rg@mail.gmail.com>
See attached.

I still need to ‘export MAKE=gmake’ before running autogen.sh, but at
least now autogen.sh can be made to work at all.


Robert Ransom
0001-Use-sh-e-option-to-exit-on-errors-in-autogen.sh.patch (text/x-patch, 1.4 KB)
From 3d46b3701f73a96d4d4efdea96467b4a6fbfbc23 Mon Sep 17 00:00:00 2001
From: Robert Ransom <[email protected]>
Date: Thu, 21 Jun 2012 20:56:39 +0000
Subject: [PATCH 1/2] Use sh -e option to exit on errors in autogen.sh

---
 autogen.sh |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 5b4a8e5..ab8d17f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,4 @@
-#! /bin/sh 
+#!/bin/sh -e
 
 # Part of Scheme 48 1.9.  See file COPYING for notices and license.
 #
@@ -6,14 +6,14 @@
 #
 
 echo "This script requires an installed scheme48 executable in the path."
-echo "The executable should be Scheme 48 1.6 or later." &&
-sleep 3 &&
-ACLOCAL="aclocal -I m4" autoreconf -v -i &&
-./configure &&
-rm -rf autom4te.cache &&
-rm -f scheme48.image build/initial.image-32 build/initial.image-64 c/scheme48.h &&
-make build/filenames.make &&
-make i-know-what-i-am-doing &&
-make c/scheme48.h &&
-make build/initial.image-32 build/initial.image-64 &&
+echo "The executable should be Scheme 48 1.6 or later."
+sleep 3
+ACLOCAL="aclocal -I m4" autoreconf -v -i
+./configure
+rm -rf autom4te.cache
+rm -f scheme48.image build/initial.image-32 build/initial.image-64 c/scheme48.h
+make build/filenames.make
+make i-know-what-i-am-doing
+make c/scheme48.h
+make build/initial.image-32 build/initial.image-64
 make distclean
-- 
1.7.9.6
0002-Use-MAKE-environment-variable-instead-of-make-in-aut.patch (text/x-patch, 1.3 KB)
From 2b34169ac8544b0950286a6f076ded317cbd2824 Mon Sep 17 00:00:00 2001
From: Robert Ransom <[email protected]>
Date: Thu, 21 Jun 2012 20:58:49 +0000
Subject: [PATCH 2/2] Use $MAKE environment variable instead of make in
 autogen.sh

Needed for FreeBSD.
---
 autogen.sh |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index ab8d17f..d219746 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,6 +5,11 @@
 # Authors: Martin Gasbichler, Marcus Crestani
 #
 
+# Ensure that $MAKE is set.
+# FreeBSD users likely need to set MAKE=gmake or MAKE=bmake
+# in their environment before running ./autogen.sh .
+echo "${MAKE:=make}" >/dev/null
+
 echo "This script requires an installed scheme48 executable in the path."
 echo "The executable should be Scheme 48 1.6 or later."
 sleep 3
@@ -12,8 +17,8 @@ ACLOCAL="aclocal -I m4" autoreconf -v -i
 ./configure
 rm -rf autom4te.cache
 rm -f scheme48.image build/initial.image-32 build/initial.image-64 c/scheme48.h
-make build/filenames.make
-make i-know-what-i-am-doing
-make c/scheme48.h
-make build/initial.image-32 build/initial.image-64
-make distclean
+${MAKE} build/filenames.make
+${MAKE} i-know-what-i-am-doing
+${MAKE} c/scheme48.h
+${MAKE} build/initial.image-32 build/initial.image-64
+${MAKE} distclean
-- 
1.7.9.6