Commit ffc8d7da authored by Robert Ricci's avatar Robert Ricci

New configure vairable: DISABLE_NSE . If set, the pareser won't call

nse to syntax check simulated portions of the NS file. Note that this
only disables NSE syntax checking, not use of NSE on nodes.

It's safe to leave this variable out of a defs file.
parent f84b120d
...@@ -834,6 +834,7 @@ fi ...@@ -834,6 +834,7 @@ fi
# #
...@@ -1124,7 +1125,7 @@ fi ...@@ -1124,7 +1125,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1128: checking for a BSD compatible install" >&5 echo "configure:1129: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -1425,6 +1426,7 @@ s%@FSDIR_USERS@%$FSDIR_USERS%g ...@@ -1425,6 +1426,7 @@ s%@FSDIR_USERS@%$FSDIR_USERS%g
s%@TRACK_INTERSWITCH_BANDWIDTH@%$TRACK_INTERSWITCH_BANDWIDTH%g s%@TRACK_INTERSWITCH_BANDWIDTH@%$TRACK_INTERSWITCH_BANDWIDTH%g
s%@TIMESTAMPS@%$TIMESTAMPS%g s%@TIMESTAMPS@%$TIMESTAMPS%g
s%@UNIFIED_BOSS_AND_OPS@%$UNIFIED_BOSS_AND_OPS%g s%@UNIFIED_BOSS_AND_OPS@%$UNIFIED_BOSS_AND_OPS%g
s%@DISABLE_NSE@%$DISABLE_NSE%g
s%@LEDA@%$LEDA%g s%@LEDA@%$LEDA%g
s%@ASSIGN@%$ASSIGN%g s%@ASSIGN@%$ASSIGN%g
s%@SSH_ARGS@%$SSH_ARGS%g s%@SSH_ARGS@%$SSH_ARGS%g
......
...@@ -40,6 +40,7 @@ AC_SUBST(FSDIR_USERS) ...@@ -40,6 +40,7 @@ AC_SUBST(FSDIR_USERS)
AC_SUBST(TRACK_INTERSWITCH_BANDWIDTH) AC_SUBST(TRACK_INTERSWITCH_BANDWIDTH)
AC_SUBST(TIMESTAMPS) AC_SUBST(TIMESTAMPS)
AC_SUBST(UNIFIED_BOSS_AND_OPS) AC_SUBST(UNIFIED_BOSS_AND_OPS)
AC_SUBST(DISABLE_NSE)
# #
# Defaults for for above variables. # Defaults for for above variables.
......
...@@ -23,3 +23,4 @@ FSDIR_GROUPS=/z/groups ...@@ -23,3 +23,4 @@ FSDIR_GROUPS=/z/groups
FSDIR_PROJ=/z/proj FSDIR_PROJ=/z/proj
FSDIR_USERS=/z/users FSDIR_USERS=/z/users
UNIFIED_BOSS_AND_OPS=1 UNIFIED_BOSS_AND_OPS=1
DISABLE_NSE=1
...@@ -160,6 +160,7 @@ namespace eval GLOBALS { ...@@ -160,6 +160,7 @@ namespace eval GLOBALS {
# Some settings taken from configure. # Some settings taken from configure.
variable tbroot @prefix@ variable tbroot @prefix@
variable libdir @prefix@/lib/ns2ir variable libdir @prefix@/lib/ns2ir
variable disablense {@DISABLE_NSE@}
# This is the location of the tb_compat.tcl file. It is copied # This is the location of the tb_compat.tcl file. It is copied
# into the same directory is the ns file so that the initial # into the same directory is the ns file so that the initial
...@@ -409,9 +410,11 @@ proc parse_delay {dspec} { ...@@ -409,9 +410,11 @@ proc parse_delay {dspec} {
# the NS file. # the NS file.
# We first run the script through NSE to check syntax errors # We first run the script through NSE to check syntax errors
file copy -force ${GLOBALS::nstbcompat} tb_compat.tcl if { ${GLOBALS::disablense} != 1 } {
if { [catch {exec nse ${GLOBALS::nsfile}} errMsg] == 1 } { file copy -force ${GLOBALS::nstbcompat} tb_compat.tcl
perror "Syntax check with NS failed\nerrorcode: $errorCode\n error msg: $errMsg" if { [catch {exec nse ${GLOBALS::nsfile}} errMsg] == 1 } {
perror "Syntax check with NS failed\nerrorcode: $errorCode\n error msg: $errMsg"
}
} }
if { ${GLOBALS::errors} != 1 } { if { ${GLOBALS::errors} != 1 } {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment