cvs commit: apache-1.3/src/helpers PrintPath PrintPathOS2 TestCompile

1998-08-03 Thread jim
jim 98/08/03 14:51:41

  Modified:src  CHANGES
   src/helpers PrintPath PrintPathOS2 TestCompile
  Log:
  Update PrintPath family...
  
  Revision  ChangesPath
  1.1001+5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1000
  retrieving revision 1.1001
  diff -u -r1.1000 -r1.1001
  --- CHANGES   1998/08/03 19:59:55 1.1000
  +++ CHANGES   1998/08/03 21:51:37 1.1001
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.2
   
  +  *) Cleanup of the PrintPath/PrintPathOS2 helper functions. Avoid
  + the ugly use of an env. variable and use command-line args for
  + alternate $PATH. Make more like advanced 'type's as well.
  + [Jim Jagielski]
  +
 *) The IRIXN32 Rule was being ignored. Configure now correctly adds
-n32 only if IRIXN32 says to. [Jim Jagielski, Alain St-Denis
[EMAIL PROTECTED]] PR#2736
  
  
  
  1.11  +44 -26apache-1.3/src/helpers/PrintPath
  
  Index: PrintPath
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/PrintPath,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PrintPath 1998/04/11 15:45:59 1.10
  +++ PrintPath 1998/08/03 21:51:40 1.11
  @@ -1,18 +1,43 @@
   #!/bin/sh
  -# Look for $1 somewhere in $PATH. As an extra bonus,
  -#  if $AP_PPSEARCHPATH is set, this will look for $i
  -#  in there instead. Will print out the full pathname unless
  -#  called with the '-s' option
  +# Look for program[s] somewhere in $PATH.
   #
  +# Options:
  +#  -s
  +#Do not print out full pathname. (silent)
  +#  -pPATHNAME
  +#Look in PATHNAME instead of $PATH
  +#
  +# Usage:
  +#  PrintPath [-s] [-pPATHNAME] program [program ...]
  +#
  +##
  +# Some constants
  +##
  +pathname=$PATH
  +echo=yes
  +
  +##
  +# Parse command line
  +##
  +for args in $*
  +do
  +case $args in
  + -s  ) echo=no ;;
  + -p* ) pathname=`echo $args | sed 's/^..//'` ;;
  + *   ) programs=$programs $args ;;
  +esac
  +done
  +
  +##
   # We do some funny stuff to check to see
   # if test/[] knows about -x
  -#
  +##
   testfile=pp.t.$$
   
   cat  $testfile ENDTEST
   #!/bin/sh
   if [ -x / ] || [ -x /bin ] || [ -x /bin/ls ]; then
  - exit 0
  +exit 0
   fi
   exit 1
   ENDTEST
  @@ -23,29 +48,22 @@
   test_exec_flag=-r
   fi
   rm -f $testfile
  -
  -if [ x$1 = x-s ]; then
  -shift
  -else
  -echo=yes
  -fi
  -
  -if [ x$AP_PPSEARCHPATH = x ] ; then
  -AP_PPSEARCHPATH=$PATH
  -fi
   
  -for path in `echo $AP_PPSEARCHPATH |
  - sed 's/^:/.:/
  -  s/::/:.:/g
  -  s/:$/:./
  -  s/:/ /g' `
  +for program in $programs
   do
  -if [ $test_exec_flag $path/$1 ]  [ ! -d $path/$1 ]; then
  -if [ $echo = yes ]; then
  - echo $path/$1
  +for path in `echo $pathname |
  + sed 's/^:/.:/
  +   s/::/:.:/g
  +   s/:$/:./
  +   s/:/ /g' `
  +do
  + if [ $test_exec_flag $path/$program ]  [ ! -d $path/$program ]; then
  + if [ $echo = yes ]; then
  + echo $path/$program
  + fi
  + exit 0
fi
  - exit 0
  -fi
  +done
   done
   exit 1
   
  
  
  
  1.4   +40 -24apache-1.3/src/helpers/PrintPathOS2
  
  Index: PrintPathOS2
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/PrintPathOS2,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PrintPathOS2  1998/04/11 15:45:59 1.3
  +++ PrintPathOS2  1998/08/03 21:51:40 1.4
  @@ -1,33 +1,49 @@
   #!/bin/sh
  -# Look for $1 somewhere in $PATH. As an extra bonus,
  -#  if $AP_PPSEARCHPATH is set, this will look for $i
  -#  in there instead. Will print out the full pathname unless
  -#  called with the '-s' option
  +# Look for program[s] somewhere in $PATH.
   #
  -
  -if [ x$1 = x-s ]; then
  -shift
  -else
  -echo=yes
  -fi
  +# Options:
  +#  -s
  +#Do not print out full pathname. (silent)
  +#  -pPATHNAME
  +#Look in PATHNAME instead of $PATH
  +#
  +# Usage:
  +#  PrintPath [-s] [-pPATHNAME] program [program ...]
  +#
  +##
  +# Some constants
  +##
  +pathname=$PATH
  +echo=yes
   
  -if [ x$AP_PPSEARCHPATH = x ] ; then
  -AP_PPSEARCHPATH=$PATH
  -fi
  +##
  +# Parse command line
  +##
  +for args in $*
  +do
  +case $args in
  + -s  ) echo=no ;;
  + -p* ) pathname=`echo $args | sed 's/^..//'` ;;
  + *   ) programs=$programs $args ;;
  +esac
  +done
   
  -for path in `echo $AP_PPSEARCHPATH |
  - sed 's/^;/.;/
  -  s/;;/;.;/g
  -  s/;$/;./
  -  s/;/ /g
  -  s//\\//g' `
  +for program in $programs
   do
  -if [ -r $path/$1.exe ]  [ ! -d $path/$1.exe ]; then
  -if [ $echo = yes ]; then
  - echo 

cvs commit: apache-1.3/src/helpers PrintPath PrintPathOS2 TestCompile

1998-04-11 Thread jim
jim 98/04/11 08:46:00

  Modified:src/helpers PrintPath PrintPathOS2 TestCompile
  Log:
  Submitted by: Jim Jagielski
  Hmmm... well, it looks like some people would like the capability
  of having PrintPath look not only in PATH for an executable (makes
  sense) so I've allowed PrintPath to look somewhere else. With this,
  TestCompile becomes a bit simpler, and faster when TestCompile
  fails since it now longer needs to muck around with the whole PATH.
  
  Revision  ChangesPath
  1.10  +8 -3  apache-1.3/src/helpers/PrintPath
  
  Index: PrintPath
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/PrintPath,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PrintPath 1997/01/30 00:07:54 1.9
  +++ PrintPath 1998/04/11 15:45:59 1.10
  @@ -1,6 +1,7 @@
   #!/bin/sh
  -# Look for $1 somewhere in $PATH
  -#  will print out the full pathname unless
  +# Look for $1 somewhere in $PATH. As an extra bonus,
  +#  if $AP_PPSEARCHPATH is set, this will look for $i
  +#  in there instead. Will print out the full pathname unless
   #  called with the '-s' option
   #
   # We do some funny stuff to check to see
  @@ -29,7 +30,11 @@
   echo=yes
   fi
   
  -for path in `echo $PATH |
  +if [ x$AP_PPSEARCHPATH = x ] ; then
  +AP_PPSEARCHPATH=$PATH
  +fi
  +
  +for path in `echo $AP_PPSEARCHPATH |
sed 's/^:/.:/
 s/::/:.:/g
 s/:$/:./
  
  
  
  1.3   +8 -3  apache-1.3/src/helpers/PrintPathOS2
  
  Index: PrintPathOS2
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/PrintPathOS2,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PrintPathOS2  1997/11/06 21:59:36 1.2
  +++ PrintPathOS2  1998/04/11 15:45:59 1.3
  @@ -1,6 +1,7 @@
   #!/bin/sh
  -# Look for $1 somewhere in $PATH
  -#  will print out the full pathname unless
  +# Look for $1 somewhere in $PATH. As an extra bonus,
  +#  if $AP_PPSEARCHPATH is set, this will look for $i
  +#  in there instead. Will print out the full pathname unless
   #  called with the '-s' option
   #
   
  @@ -10,7 +11,11 @@
   echo=yes
   fi
   
  -for path in `echo $PATH |
  +if [ x$AP_PPSEARCHPATH = x ] ; then
  +AP_PPSEARCHPATH=$PATH
  +fi
  +
  +for path in `echo $AP_PPSEARCHPATH |
sed 's/^;/.;/
 s/;;/;.;/g
 s/;$/;./
  
  
  
  1.11  +5 -3  apache-1.3/src/helpers/TestCompile
  
  Index: TestCompile
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/TestCompile,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestCompile   1998/04/11 14:30:33 1.10
  +++ TestCompile   1998/04/11 15:45:59 1.11
  @@ -125,12 +125,14 @@
   #
   # Use our PrintPath helper script, knowing that we have
   # 2 versions of it though... Configure should set AP_PRINTPATH
  -# but if not, just assume we use our generic version
  +# but if not, just assume we use our generic version. We
  +# also use the AP_PPSEARCHPATH hack to have PrintPath
  +# just search this directory.
  +
   if [ x$AP_PRINTPATH = x ] ; then
   AP_PRINTPATH=PrintPath
   fi
   
  -TESTTARG=`PATH=.:$PATH ./$AP_PRINTPATH $TARGET`
  -if [ x$TESTTARG = x./$TARGET ] ; then
  +if AP_PPSEARCHPATH=`pwd` ./$AP_PRINTPATH -s $TARGET ; then
   exstat=0
   fi