aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-05-07 19:41:44 +0000
committerdos-reis <gdr@axiomatics.org>2010-05-07 19:41:44 +0000
commit75e606946370e97837e697e5f5070ddff4627952 (patch)
tree6a51f09fc2c32104ddb7eb328cc2270045f0b5bc
parentc9c4d89aa7cc261a19ac29c7d74a43f1369f1773 (diff)
downloadopen-axiom-75e606946370e97837e697e5f5070ddff4627952.tar.gz
* configure.ac.pamphlet: Add new option: --enable-int-file-retention.
src/ * lisp/core.lisp.in ($FilesToRetain): New. Export. * lisp/Makefile.in: Tidy. * boot/translator.boot (retainFile?): New. (compileBootHandler): Use it.
-rw-r--r--ChangeLog4
-rwxr-xr-xconfigure57
-rw-r--r--configure.ac10
-rw-r--r--configure.ac.pamphlet10
-rw-r--r--src/ChangeLog7
-rw-r--r--src/boot/initial-env.lisp2
-rw-r--r--src/boot/translator.boot10
-rw-r--r--src/lisp/Makefile.in7
-rw-r--r--src/lisp/core.lisp.in5
9 files changed, 89 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 928cfebd..f5fec7ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-07 Gabriel Dos Reis <gdr@cse.tamu.edu>
+
+ * configure.ac.pamphlet: Add new option: --enable-int-file-retention.
+
2010-02-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
* configure.ac.pamphlet: Check for ccl and ccl64 too.
diff --git a/configure b/configure
index eca88168..ac64efae 100755
--- a/configure
+++ b/configure
@@ -814,6 +814,7 @@ axiom_optimize_options
axiom_enable_checking
axiom_all_prerequisites
oa_enable_threads
+oa_keep_files
axiom_fasl_type
oa_use_dynamic_lib
axiom_eval_flags
@@ -940,6 +941,7 @@ with_gnu_ld
enable_libtool_lock
with_lisp
enable_gcl
+enable_keep_files
enable_threads
enable_checking
enable_profiling
@@ -1595,6 +1597,7 @@ Optional Features:
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-gcl build GCL from OpenAxiom source
+ --enable-keep-files=<kind> keep intermediary files
--enable-threads turn on threads support
--enable-checking turn runtime checking on
--enable-profiling turn profiling on
@@ -5082,13 +5085,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5085: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5088: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5088: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5091: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5091: output\"" >&5)
+ (eval echo "\"\$as_me:5094: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6290,7 +6293,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6293 "configure"' > conftest.$ac_ext
+ echo '#line 6296 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8561,11 +8564,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8564: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8567: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8568: \$? = $ac_status" >&5
+ echo "$as_me:8571: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8900,11 +8903,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8903: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8906: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8907: \$? = $ac_status" >&5
+ echo "$as_me:8910: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9005,11 +9008,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9008: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9011: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9012: \$? = $ac_status" >&5
+ echo "$as_me:9015: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9060,11 +9063,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9063: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9066: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9067: \$? = $ac_status" >&5
+ echo "$as_me:9070: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11860,7 +11863,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11863 "configure"
+#line 11866 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11956,7 +11959,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11959 "configure"
+#line 11962 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13976,11 +13979,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13979: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13982: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13983: \$? = $ac_status" >&5
+ echo "$as_me:13986: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14075,11 +14078,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14078: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14081: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14082: \$? = $ac_status" >&5
+ echo "$as_me:14085: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14127,11 +14130,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14130: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14133: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14134: \$? = $ac_status" >&5
+ echo "$as_me:14137: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16186,6 +16189,20 @@ $as_echo "$axiom_fasl_type" >&6; }
fi
+## Occaionally, we may want to keep intermediary files.
+oa_keep_files=
+# Check whether --enable-keep-files was given.
+if test "${enable_keep_files+set}" = set; then
+ enableval=$enable_keep_files; case $enableval in
+ yes|no|all) oa_keep_files=$enableval ;;
+ *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-keep-files" >&5
+$as_echo "$as_me: error: erroneous value for --enable-keep-files" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+fi
+
+
+
## Does it make sense to pretend that we support multithreading?
oa_enable_threads=no
# Check whether --enable-threads was given.
diff --git a/configure.ac b/configure.ac
index a1ec4cab..826456bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -358,6 +358,16 @@ if test -z $axiom_fasl_type; then
fi
AC_SUBST(axiom_fasl_type)
+## Occaionally, we may want to keep intermediary files.
+oa_keep_files=
+AC_ARG_ENABLE([keep-files],
+ [ --enable-keep-files=<kind> keep intermediary files],
+ [case $enableval in
+ yes|no|all) oa_keep_files=$enableval ;;
+ *) AC_MSG_ERROR([erroneous value for --enable-keep-files]) ;;
+ esac])
+AC_SUBST(oa_keep_files)
+
## Does it make sense to pretend that we support multithreading?
oa_enable_threads=no
AC_ARG_ENABLE([threads], [ --enable-threads turn on threads support],
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index edc237c0..b7fa6087 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -645,6 +645,16 @@ axiom_all_prerequisites=
<<lisp options>>
<<compiled lisp extension>>
+## Occaionally, we may want to keep intermediary files.
+oa_keep_files=
+AC_ARG_ENABLE([int-file-retension],
+ [ --enable-int-file-retention keep intermediary files],
+ [case $enableval in
+ yes|no) oa_keep_files=$enableval ;;
+ *) AC_MSG_ERROR([erroneous value for --enable-int-file-retention]) ;;
+ esac])
+AC_SUBST(oa_keep_files)
+
## Does it make sense to pretend that we support multithreading?
oa_enable_threads=no
AC_ARG_ENABLE([threads], [ --enable-threads turn on threads support],
diff --git a/src/ChangeLog b/src/ChangeLog
index ba5b34b1..f1db0f63 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2010-05-07 Gabriel Dos Reis <gdr@cse.tamu.edu>
+ * lisp/core.lisp.in ($FilesToRetain): New. Export.
+ * lisp/Makefile.in: Tidy.
+ * boot/translator.boot (retainFile?): New.
+ (compileBootHandler): Use it.
+
+2010-05-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/as.boot: Miscellaneous cleanup.
* interp/ax.boot: Likewise.
* interp/br-con.boot: Likewise.
diff --git a/src/boot/initial-env.lisp b/src/boot/initial-env.lisp
index dd67e0c4..34a4efc4 100644
--- a/src/boot/initial-env.lisp
+++ b/src/boot/initial-env.lisp
@@ -1,6 +1,6 @@
;; Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
;; All rights reserved.
-;; Copyright (C) 2007-2009, Gabriel Dos Reis.
+;; Copyright (C) 2007-2010, Gabriel Dos Reis.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index ebedbe56..ff996f23 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -745,12 +745,20 @@ translateBootFile(progname, options, file) ==
outFile := getOutputPathname options or defaultBootToLispFile file
BOOTTOCL(file, ENOUGH_-NAMESTRING outFile)
+retainFile? ext ==
+ Option 'all in $FilesToRetain or Option 'yes in $FilesToRetain => true
+ Option 'no in $FilesToRetain => false
+ Option ext in $FilesToRetain
+
+TRACE retainFile?
+
compileBootHandler(progname, options, file) ==
intFile := BOOTTOCL(file, getIntermediateLispFile(file,options))
errorCount() ~= 0 => nil
intFile =>
objFile := compileLispHandler(progname, options, intFile)
- DELETE_-FILE intFile
+ if not retainFile? 'lisp then
+ DELETE_-FILE intFile
objFile
nil
diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in
index 4933e90b..c1685b47 100644
--- a/src/lisp/Makefile.in
+++ b/src/lisp/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2009, Gabriel Dos Reis.
+# Copyright (C) 2007-2010, Gabriel Dos Reis.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -137,10 +137,15 @@ float_type = @float_type@
double_type = @double_type@
string_type = @string_type@
+oa_comma =,
+
+oa_keep_files = $(patsubst %,|%|,$(subst $(oa_comma), ,@oa_keep_files@))
+
edit = sed \
-e 's|@open_axiom_installdir[@]|$(open_axiom_installdir)|g' \
-e 's|@axiom_optimize_options[@]|$(axiom_optimize_options)|g' \
-e 's|@oa_editor[@]|$(oa_editor)|g' \
+ -e 's/@oa_keep_files[@]/$(oa_keep_files)/g' \
-e 's|@host[@]|$(host)|g' \
-e 's|@build[@]|$(build)|g' \
-e 's|@target[@]|$(target)|g' \
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 5078b47a..94e8823c 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -91,6 +91,7 @@
"$LispOptimizeOptions"
"$StandardLinking"
"$ECLVersionNumber"
+ "$FilesToRetain"
"getOptionValue"
"getCommandLineArguments"
@@ -136,6 +137,10 @@
(defconstant |$systemInstallationDirectory|
"@open_axiom_installdir@/")
+;; File kinds to retain.
+(defconstant |$FilesToRetain|
+ '(@oa_keep_files@))
+
;; Lisp compiler optimization settings.
(defconstant |$LispOptimizeOptions|
'(@axiom_optimize_options@))