view autogen.sh @ 15236:44d6ffdf9479

Disallow new variables in nested functions (bug #36271) * src/ov-usr-fcn.cc (octave_user_function::bind_automatic_vars): Use force_varref. * src/variables.cc (bind_ans): Use force_varref. * src/pt-id.cc (tree_identifier::rvalue, tree_identifier::lvalue): Identify static workspace errors. * src/pt-id.h (tree_identifier::static_workspace_error): New function. * src/symtab.cc (symbol_table::do_update_nest): Mark static workspaces. * src/symtab.h (symbol_table::symbol_record::symbol_record_rep::is_added_static, symbol_table::symbol_record::symbol_record_rep::mark_added_static, symbol_table::symbol_record::symbol_record_rep::unmark_added_static, symbol_table::symbol_record::is_added_static, symbol_table::symbol_record::mark_added_static, symbol_table::symbol_record::unmark_added_static, symbol_table::force_varref): New functions. (symbol_table::symbol_table): Initialize static_workspace to false. (symbol_table::do_insert): Added force_add parameter. Mark records as added_static. (symbol_table::do_varref): Added force_add parameter. * test/nest/test_nest.m: Added nest_eval tests. * test/nest/module.mk: Added nest/nest_eval.m. * test/nest/nest_eval.m: New file.
author Max Brister <max@2bass.com>
date Tue, 17 Apr 2012 21:24:20 -0600
parents 2fc554ffbc28
children 648dabbb4c6b
line wrap: on
line source

#! /bin/sh
# autogen.sh
# Run this to generate all the initial makefiles, etc.

set -e

## Use --foreign since we auto-generate the AUTHORS file and the default
## --gnu strictness level doesn't like it if the AUTHORS file is missing.

AUTOMAKE="automake --foreign --warnings=no-portability"
export AUTOMAKE

## Check for files that automake --gnu would normally look for, except
## AUTHORS, which we autogenerate from the documentation files along with
## building the rest of Octave, and INSTALL, which is linked from
## gnulib/doc/INSTALL by the bootstrap script.

for f in NEWS README COPYING; do
  if ! test -f $f; then
    echo "required file $f is missing" 2>&1
    exit 1
  fi
done

echo "generating source lists for liboctave/Makefile..."

(cd liboctave; ./config-ops.sh)

echo "generating doc/interpreter/images.mk..."

(cd doc/interpreter; ./config-images.sh)

echo "generating libinterp/dldfcn/module.mk..."

(cd libinterp/dldfcn; ./config-module.sh)

echo "bootstrapping..."

build-aux/bootstrap "$@"

## G77 is obsolete, but it is still the first option in the autoconf Fortran
## macros.  We should avoid it, because mixing old versions of g77 with modern
## gcc and g++ causes trouble.  The following will make it harder (but not
## impossible) for users to make this mistake.
##
## FIXME -- we should really work to fix autoconf so that it prefers gfortran
## over g77 even when searching for a Fortran 77 compiler.

echo "replacing all occurrences of g77 with gfortran in configure script..."

sed 's/g77/gfortran/g' configure > configure.t
mv configure.t configure
chmod 755 configure