From a70eb8e9342a2c886105b7105c401686b2878ac1 Mon Sep 17 00:00:00 2001
From: Robert P. Goldman <rpgoldman@real-time.com>
Date: Sun, 23 Oct 2011 12:17:44 -0500
Subject: [PATCH] Improvements to Makefile.

Makefile now gets lisp path from envars.
Don't load userinit in test-upgrade.
Added test-all-noupgrade make target.
---
 Makefile |   69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 61 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index b50448c..99b2299 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,52 @@ endif
 
 lisp ?= sbcl
 
+ifdef CCL
+ccl = ${CCL}
+else
+ccl = ccl
+endif
+ifdef CLISP
+clisp = ${CLISP}
+else
+clisp = clisp
+endif
+ifdef SBCL
+sbcl = ${SBCL}
+else
+sbcl = sbcl
+endif
+ifdef ECL
+ecl = ${ECL}
+else
+ecl = ecl
+endif
+ifdef CMUCL
+cmucl = ${CMUCL}
+else
+cmucl = cmucl
+endif
+ifdef ABCL
+abcl = ${ABCL}
+else
+abcl = abcl
+endif
+ifdef SCL
+scl = ${SCL}
+else
+scl = scl
+endif
+ifdef ALLEGRO
+allegro = ${ALLEGRO}
+else
+allegro = alisp
+endif
+ifdef ALLEGROMODERN
+allegromodern = ${ALLEGROMODERN}
+else
+allegromodern = mlisp
+endif
+
 # website, tag, install
 
 install: archive-copy
@@ -76,14 +122,15 @@ test-upgrade:
 	cf="(handler-bind ((warning #'muffle-warning)) (format t \"cf~%\") (compile-file \"asdf.lisp\" :output-file \"$$fa\" :verbose t :print t))" ; \
 	lf="(handler-bind (#+sbcl (sb-kernel:redefinition-warning #'muffle-warning)) (format t \"lf\") (load \"$$fa\" :verbose t :print t))" ; \
 	te="(quit-on-error $$l (push #p\"${sourceDirectory}/test/\" asdf:*central-registry*) (princ \"te\") (asdf:oos 'asdf:load-op :test-module-depend :verbose t))" ; \
-	use_ccl () { li="ccl --quiet --load test/script-support" ; ev="--eval" ; } ; \
-	use_clisp () { li="/usr/bin/clisp --quiet --quiet -i test/script-support" ; ev="-x" ; } ; \
-	use_sbcl () { li="sbcl --noinform --load test/script-support" ; ev="--eval" ; } ; \
-	use_ecl () { li="ecl -load test/script-support" ; ev="-eval" ; } ; \
-	use_cmucl () { li="cmucl -load test/script-support" ; ev="-eval" ; } ; \
-	use_abcl () { li="abcl --noinform --load test/script-support" ; ev="--eval" ; } ; \
-	use_scl () { li="scl -load test/script-support" ; ev="-eval" ; } ; \
-	use_allegro () { li="alisp -L test/script-support" ; ev="-e" ; } ; \
+	use_ccl () { li="${ccl} --no-init --quiet --load test/script-support" ; ev="--eval" ; } ; \
+	use_clisp () { li="${clisp} -norc -ansi --quiet --quiet -i test/script-support" ; ev="-x" ; } ; \
+	use_sbcl () { li="${sbcl} --noinform --userinit /dev/null --load test/script-support" ; ev="--eval" ; } ; \
+	use_ecl () { li="${ecl} -norc -load test/script-support" ; ev="-eval" ; } ; \
+	use_cmucl () { li="${cmucl} -noinit -load test/script-support" ; ev="-eval" ; } ; \
+	use_abcl () { li="${abcl} --noinit --noinform --load test/script-support" ; ev="--eval" ; } ; \
+	use_scl () { li="${scl} -noinit -load test/script-support" ; ev="-eval" ; } ; \
+	use_allegromodern () { li="${allegromodern} -q -L test/script-support" ; ev="-e" ; } ; \
+	use_allegro () { li="${allegro} -q -L test/script-support" ; ev="-e" ; } ; \
 	for tag in 1.37 1.97 1.369 `git tag -l '2.0??'` ; do \
 	  use_${lisp} ; \
 	  lo="(handler-bind ((warning #'muffle-warning)) (load \"tmp/asdf-$${tag}.lisp\"))" ; \
@@ -112,6 +159,12 @@ test-all-lisps:
 		${MAKE} test-lisp test-upgrade lisp=$$lisp || exit 1 ; \
 	done
 
+# test upgrade is a very long run... This does just the regression tests
+test-all-noupgrade:
+	@for lisp in ${lisps} ; do \
+		${MAKE} test-lisp lisp=$$lisp || exit 1 ; \
+	done
+
 test-all: test-forward-references doc test-all-lisps
 
 # Note that the debian git at git://git.debian.org/git/pkg-common-lisp/cl-asdf.git is stale,
-- 
1.7.3.5

