summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-01-21 00:59:38 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-01-21 00:59:38 -0800
commitb7bdc308cd6ce4dd4d3dd68c16eec792652f8c39 (patch)
tree07c7ebb1f183b60d2e838981fe2eaa6b307eebff /configure
parent3315a83172c4178176d1cf7634dfc69a8fd29edc (diff)
downloadtxr-b7bdc308cd6ce4dd4d3dd68c16eec792652f8c39.tar.gz
txr-b7bdc308cd6ce4dd4d3dd68c16eec792652f8c39.tar.bz2
txr-b7bdc308cd6ce4dd4d3dd68c16eec792652f8c39.zip
Improved debugging. Debug nesting depth counter maintained
and used for next/step/finish stepping. * Makefile (OBJS): debug.o moved to OBJS-y or OBJS-. (OBJS-y, OBJS-): New variables. $(PROG): Depends on OBJS-y also. clean: clean $(OBJS-y). depend: include $(OBJS-y) in dependency generation. * configure: Underscores and dashes are interchangeable in configure variables. (yaccname_given, yacc_given): Default value is y, not yes. (debug_support): New config variable. (CONFIG_DEBUG_SUPPORT): New config.h symbol. * debug.c (debug_depth): New global variable. (debug_block_s): New symbol variable. (next_depth): New static variable. (debug): Renamed some commands. Introduced separate next, step and finish. (debug_init): debug_block_s initialized. * debug.h (debug_depth, debug_block_s): Declared. (debug_enter, debug_leave, debug_return): New macros. (debug_check, debug_init): Conditionally defined based on if this is a debug build. * dep.mk: Regenerated. * eval.c (eval): Instrumented with debug_enter, debug_leave, debug_return. * match.c (match_line, v_fun, match_files): Likewise. * txr.c (txr_main): Bail if -d or --debug used in build that lacks debug support.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 21 insertions, 5 deletions
diff --git a/configure b/configure
index c7f66d73..46ca4aa5 100755
--- a/configure
+++ b/configure
@@ -51,8 +51,8 @@ done
#
while [ $# -gt 0 ] ; do
case $1 in
- --no-* )
- var=${1#--no-}
+ --no-* | --no_* )
+ var=${1#--no?}
val=
;;
--*=* )
@@ -82,7 +82,9 @@ while [ $# -gt 0 ] ; do
exit 1
esac
- if ! printf $var | grep -q -E '^[A-Za-z_][A-Za-z0-9_]*$' ; then
+ var=$(echo "$var" | tr - _)
+
+ if ! echo $var | grep -q -E '^[A-Za-z_][A-Za-z0-9_]*$' ; then
printf "$0: '$var' isn't a proper configuration variable name\n"
exit 1
fi
@@ -119,9 +121,9 @@ intptr=${intptr-}
tool_prefix=${tool_prefix-}
lex=${lex-'$(cross)$(tool_prefix)flex'}
lexlib=${lexlib--lfl}
-yaccname_given=${yaccname+yes}
+yaccname_given=${yaccname+y}
yaccname=${yaccname-}
-yacc_given=${yacc+yes}
+yacc_given=${yacc+y}
yacc=${yacc-'$(cross)$(tool_prefix)$(yaccname)'}
nm=${nm-'$(cross)$(tool_prefix)nm'}
opt_flags=${opt_flags--O2}
@@ -136,6 +138,7 @@ txr_dbg_opts=${txr_dbg_opts---gc-debug}
valgrind=${valgrind-}
lit_align=${lit_align-}
extra_debugging=${extra_debugging-}
+debug_support=${debug_support-y}
mpi_version=1.8.6
have_quilt=
have_patch=
@@ -187,6 +190,8 @@ After running $0, check that the config.make contents are sane.
The following variables are supported. Note that make variable syntax may
be used in paths. Default values are shown in [square brackets].
+Variables are case-sensitive, but underscores and dashes are interchangeable.
+
prefix [$prefix]
Specifies root directory where the software will ultimately be installed and
@@ -530,6 +535,9 @@ compiler_prefix := $compiler_prefix
# prefix for non-compiler toolchain commands
tool_prefix := $tool_prefix
+# do we compile in debug support?
+debug_support := $debug_support
+
# MPI version
mpi_version := $mpi_version
@@ -1104,6 +1112,14 @@ else
fi
#
+# Some final blurbs into config.h
+#
+
+if [ -n "$debug_support" ] ; then
+ printf "#define CONFIG_DEBUG_SUPPORT 1\n" >> config.h
+fi
+
+#
# Regenerate config.make
#