changeset 7244:5a9561046b89

[project @ 2007-12-04 02:27:27 by jwe]
author jwe
date Tue, 04 Dec 2007 02:27:27 +0000
parents e8d7eed42935
children d65670971cbc
files ChangeLog Makeconf.in aclocal.m4 configure.in run-octave.in scripts/testfun/test.m
diffstat 6 files changed, 34 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Dec 04 02:10:18 2007 +0000
+++ b/ChangeLog	Tue Dec 04 02:27:27 2007 +0000
@@ -1,3 +1,10 @@
+2007-12-03  Moritz Borgmann  <octave@moriborg.de>
+
+	* Makeconf.in, aclocal.m4, configure.in: Check for find program,
+	preferably gfind (on non-GNU systems).  Need a sane find for
+	run-octave script.
+	* run-octave.in: Use FIND and AWK as determined by configure.
+
 2007-12-03  John W. Eaton  <jwe@octave.org>
 
 	* configure.in: If available, include <sys/types.h> in test for
--- a/Makeconf.in	Tue Dec 04 02:10:18 2007 +0000
+++ b/Makeconf.in	Tue Dec 04 02:27:27 2007 +0000
@@ -29,6 +29,9 @@
 SED = @SED@
 export SED
 
+FIND = @FIND@
+export FIND
+
 PERL = @PERL@
 PYTHON = @PYTHON@
 
@@ -586,6 +589,8 @@
 define do-subst-script-vals
 echo "making $@ from $<"
 $(SED) < $< \
+  -e "s|%AWK%|${AWK}|g" \
+  -e "s|%FIND%|${FIND}|g" \
   -e "s|%library_path_var%|${library_path_var}|g" \
   -e "s|%liboctinterp%|${LIBPRE}octinterp.${SHLEXT}|g" \
   -e "s|%liboctave%|${LIBPRE}octave.${SHLEXT}|g" \
--- a/aclocal.m4	Tue Dec 04 02:10:18 2007 +0000
+++ b/aclocal.m4	Tue Dec 04 02:27:27 2007 +0000
@@ -817,8 +817,18 @@
   AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.])
 fi
 ])
-# OCTAVE_PROG_SED
-# --------------
+dnl
+dnl Find find.
+dnl
+# Prefer GNU find if found.
+AN_MAKEVAR([FIND],  [OCTAVE_PROG_FIND])
+AN_PROGRAM([gfind], [OCTAVE_PROG_FIND])
+AN_PROGRAM([find],  [OCTAVE_PROG_FIND])
+AC_DEFUN([OCTAVE_PROG_FIND],
+[AC_CHECK_PROGS(FIND, gfind find, )])
+dnl
+dnl Find sed.
+dnl
 # Check for a fully-functional sed program, that truncates
 # as few characters as possible and that supports "\(X\|Y\)"
 # style regular expression alternation.  Prefer GNU sed if found.
--- a/configure.in	Tue Dec 04 02:10:18 2007 +0000
+++ b/configure.in	Tue Dec 04 02:27:27 2007 +0000
@@ -29,7 +29,7 @@
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
 AC_INIT
-AC_REVISION($Revision: 1.598 $)
+AC_REVISION($Revision: 1.599 $)
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -1596,6 +1596,7 @@
 ### and running Octave.
 
 AC_PROG_AWK
+OCTAVE_PROG_FIND
 OCTAVE_PROG_SED
 OCTAVE_PROG_PERL
 OCTAVE_PROG_PYTHON
--- a/run-octave.in	Tue Dec 04 02:10:18 2007 +0000
+++ b/run-octave.in	Tue Dec 04 02:27:27 2007 +0000
@@ -20,7 +20,8 @@
 ## along with Octave; see the file COPYING.  If not, see
 ## <http://www.gnu.org/licenses/>.
 
-AWK=${AWK:-'awk'}
+AWK=%AWK%
+FIND=%FIND%
 
 # FIXME -- is there a better way to handle the possibility of spaces
 # in these names? 
@@ -37,10 +38,10 @@
 d3="$builddir/scripts"
 d4="$builddir/src"
 
-d1_list=`find "$d1" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
-d2_list=`find "$d2" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
-d3_list=`find "$d3" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
-d4_list=`find "$d4" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
+d1_list=`$FIND "$d1" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
+d2_list=`$FIND "$d2" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
+d3_list=`$FIND "$d3" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
+d4_list=`$FIND "$d4" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`
 
 d1_path=`echo "$d1_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
 d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
--- a/scripts/testfun/test.m	Tue Dec 04 02:10:18 2007 +0000
+++ b/scripts/testfun/test.m	Tue Dec 04 02:27:27 2007 +0000
@@ -480,8 +480,8 @@
       fputs (__fid, __msg);
       fflush (__fid);
       ## show the variable context
-      if (! strcmp (__type, "error") && ! strcmp (__type, "testif") &&
-	  ! all (__shared == " "))
+      if (! strcmp (__type, "error") && ! strcmp (__type, "testif")
+	  && ! all (__shared == " "))
 	fputs (__fid, "shared variables ");
 	eval (sprintf ("fdisp(__fid,bundle(%s));", __shared)); 
 	fflush (__fid);