cvs commit: jakarta-tomcat-connectors/webapp/support wa_exec.m4

2002-05-03 Thread pier

pier02/05/03 05:06:34

  Modified:webapp/support wa_exec.m4
  Log:
  Get back to the original directory before exiting (configure will complain
  it can't find a file otherwise)
  
  Revision  ChangesPath
  1.3   +2 -1  jakarta-tomcat-connectors/webapp/support/wa_exec.m4
  
  Index: wa_exec.m4
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/wa_exec.m4,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wa_exec.m41 May 2002 18:12:47 -   1.2
  +++ wa_exec.m43 May 2002 12:06:34 -   1.3
  @@ -57,7 +57,7 @@
   
   dnl --
   dnl Author Pier Fumagalli [EMAIL PROTECTED]
  -dnl Version $Id: wa_exec.m4,v 1.2 2002/05/01 18:12:47 pier Exp $
  +dnl Version $Id: wa_exec.m4,v 1.3 2002/05/03 12:06:34 pier Exp $
   dnl --
   
   dnl --
  @@ -87,6 +87,7 @@
   set $2
   wa_exec_file=[$]1
   if test ! -x ${wa_exec_file} ; then
  +  cd ${wa_exec_curdir}
 AC_MSG_ERROR([cannot find or execute \${wa_exec_file}\ in \$4\])
 exit 1
   fi
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/webapp/support wa_exec.m4

2002-05-03 Thread pier

pier02/05/03 05:13:57

  Modified:webapp/support wa_exec.m4
  Log:
  Aesthetics change (report the value of the return code, not the name of its
  variable)
  
  Revision  ChangesPath
  1.4   +2 -2  jakarta-tomcat-connectors/webapp/support/wa_exec.m4
  
  Index: wa_exec.m4
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/wa_exec.m4,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- wa_exec.m43 May 2002 12:06:34 -   1.3
  +++ wa_exec.m43 May 2002 12:13:57 -   1.4
  @@ -57,7 +57,7 @@
   
   dnl --
   dnl Author Pier Fumagalli [EMAIL PROTECTED]
  -dnl Version $Id: wa_exec.m4,v 1.3 2002/05/03 12:06:34 pier Exp $
  +dnl Version $Id: wa_exec.m4,v 1.4 2002/05/03 12:13:57 pier Exp $
   dnl --
   
   dnl --
  @@ -121,7 +121,7 @@
   $1=`cat retvalue.tmp`
   rm -f retvalue.tmp
   echo   execution of \$2\
  -echo   returned with value \$1\
  +echo   returned with value \${$1}\
   
   cd ${wa_exec_curdir}
   unset wa_exec_curdir
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/webapp/support wa_exec.m4

2002-05-01 Thread pier

pier02/05/01 11:12:48

  Modified:webapp/support wa_exec.m4
  Log:
  More M4 variable localization madness.
  
  Revision  ChangesPath
  1.2   +19 -19jakarta-tomcat-connectors/webapp/support/wa_exec.m4
  
  Index: wa_exec.m4
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/wa_exec.m4,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa_exec.m41 May 2002 00:22:28 -   1.1
  +++ wa_exec.m41 May 2002 18:12:47 -   1.2
  @@ -57,7 +57,7 @@
   
   dnl --
   dnl Author Pier Fumagalli [EMAIL PROTECTED]
  -dnl Version $Id: wa_exec.m4,v 1.1 2002/05/01 00:22:28 pier Exp $
  +dnl Version $Id: wa_exec.m4,v 1.2 2002/05/01 18:12:47 pier Exp $
   dnl --
   
   dnl --
  @@ -73,7 +73,7 @@
   AC_DEFUN(
 [WA_EXEC],
 [
  -local_curdir=`pwd`
  +wa_exec_curdir=`pwd`
   if test -d $4 ; then
 cd $4
   else
  @@ -85,36 +85,36 @@
   echo -1  retvalue.tmp
   
   set $2
  -local_file=[$]1
  -if test ! -x ${local_file} ; then
  -  AC_MSG_ERROR([cannot find or execute \${local_file}\ in \$4\])
  +wa_exec_file=[$]1
  +if test ! -x ${wa_exec_file} ; then
  +  AC_MSG_ERROR([cannot find or execute \${wa_exec_file}\ in \$4\])
 exit 1
   fi
  -unset local_file
  +unset wa_exec_file
   
   {
 $2
  -  echo _retvalue_ $?
  +  echo wa_exec_retvalue $?
   } | {
  -  ret=0
  +  wa_exec_ret=0
 while true ; do
  -read first line
  +read wa_exec_first wa_exec_line
   if test ! $? -eq 0 ; then
 break
   else
  -  if test ${first} = _retvalue_ ; then
  -ret=${line}
  +  if test ${wa_exec_first} = wa_exec_retvalue ; then
  +wa_exec_ret=${wa_exec_line}
 else
  -if test -n ${line} ; then
  - echo $3: ${first} ${line}
  +if test -n ${wa_exec_line} ; then
  + echo $3: ${wa_exec_first} ${wa_exec_line}
   fi
 fi
   fi
 done
  -  echo ${ret}  retvalue.tmp
  -  unset first
  -  unset line
  -  unset ret
  +  echo ${wa_exec_ret}  retvalue.tmp
  +  unset wa_exec_first
  +  unset wa_exec_line
  +  unset wa_exec_ret
   }
   
   $1=`cat retvalue.tmp`
  @@ -122,6 +122,6 @@
   echo   execution of \$2\
   echo   returned with value \$1\
   
  -cd ${local_curdir}
  -unset local_curdir
  +cd ${wa_exec_curdir}
  +unset wa_exec_curdir
 ])
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/webapp/support wa_exec.m4

2002-04-30 Thread pier

pier02/04/30 17:22:29

  Added:   webapp/support wa_exec.m4
  Log:
  Pretty printing of a command execution.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/webapp/support/wa_exec.m4
  
  Index: wa_exec.m4
  ===
  dnl  =
  dnl
  dnl  The Apache Software License,  Version 1.1
  dnl
  dnl   Copyright (c) 1999-2001 The Apache Software Foundation.
  dnlAll rights reserved.
  dnl
  dnl  =
  dnl
  dnl  Redistribution and use in source and binary forms,  with or without modi-
  dnl  fication, are permitted provided that the following conditions are met:
  dnl
  dnl  1. Redistributions of source code  must retain the above copyright notice
  dnl notice, this list of conditions and the following disclaimer.
  dnl
  dnl  2. Redistributions  in binary  form  must  reproduce the  above copyright
  dnl notice,  this list of conditions  and the following  disclaimer in the
  dnl documentation and/or other materials provided with the distribution.
  dnl
  dnl  3. The end-user documentation  included with the redistribution,  if any,
  dnl must include the following acknowlegement:
  dnl
  dnlThis product includes  software developed  by the Apache  Software
  dnl Foundation http://www.apache.org/.
  dnl
  dnl Alternately, this acknowlegement may appear in the software itself, if
  dnl and wherever such third-party acknowlegements normally appear.
  dnl
  dnl  4. The names The Jakarta Project,  Apache WebApp Module,  and Apache
  dnl Software Foundation  must not be used to endorse or promote  products
  dnl derived  from this  software  without  prior  written  permission. For
  dnl written permission, please contact [EMAIL PROTECTED].
  dnl
  dnl  5. Products derived from this software may not be called Apache nor may
  dnl Apache appear in their names without prior written permission of the
  dnl Apache Software Foundation.
  dnl
  dnl  THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESSED OR IMPLIED WARRANTIES
  dnl  INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY
  dnl  AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL
  dnl  THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY
  dnl  DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL
  dnl  DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS
  dnl  OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION)
  dnl  HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT,
  dnl  STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  dnl  ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE
  dnl  POSSIBILITY OF SUCH DAMAGE.
  dnl
  dnl  =
  dnl
  dnl  This software  consists of voluntary  contributions made  by many indivi-
  dnl  duals on behalf of the  Apache Software Foundation.  For more information
  dnl  on the Apache Software Foundation, please see http://www.apache.org/.
  dnl
  dnl  =
  
  dnl --
  dnl Author Pier Fumagalli [EMAIL PROTECTED]
  dnl Version $Id: wa_exec.m4,v 1.1 2002/05/01 00:22:28 pier Exp $
  dnl --
  
  dnl --
  dnl WA_EXEC
  dnl   Execute a program filtering its output (pretty printing).
  dnl
  dnl   Parameters:
  dnl $1 = name of the variable containing the return value (error code).
  dnl $2 = name of the binary/script to invoke
  dnl $3 = message used for pretty printing output
  dnl $4 = the directory where the command must be executed
  dnl --
  AC_DEFUN(
[WA_EXEC],
[
  local_curdir=`pwd`
  if test -d $4 ; then
cd $4
  else
AC_MSG_ERROR([can't switch to directory $4]) 
  fi
  
  echo   invoking \$2\
  echo   in directory \$4\
  echo -1  retvalue.tmp
  
  set $2
  local_file=[$]1
  if test ! -x ${local_file} ; then
AC_MSG_ERROR([cannot find or execute \${local_file}\ in \$4\])
exit 1
  fi
  unset local_file
  
  {
$2
echo _retvalue_ $?
  } | {
ret=0
while true ; do
  read first line
  if test ! $? -eq 0 ; then
break
  else
if test ${first} = _retvalue_ ; then