You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2012/05/04 10:23:08 UTC
svn commit: r1333806 [6/7] - in /tcl/rivet/branches/apreq-multipart: ./ doc/
doc/examples-sgml/ doc/examples/ doc/xml/ m4/ rivet/
rivet/packages/entities/ rivet/packages/form/ rivet/packages/simpledb/
rivet/packages/tclrivet/ rivet/rivet-tcl/ src/ src/...
Modified: tcl/rivet/branches/apreq-multipart/tclconfig/config.sub
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tclconfig/config.sub?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tclconfig/config.sub (original)
+++ tcl/rivet/branches/apreq-multipart/tclconfig/config.sub Fri May 4 08:23:05 2012
@@ -1,10 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2010-01-22'
+timestamp='2003-07-04'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -22,26 +21,22 @@ timestamp='2010-01-22'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-
# Please send patches to <co...@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -75,9 +70,8 @@ Report bugs and patches to <config-patch
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -89,11 +83,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
+ echo "$timestamp" ; exit 0 ;;
--version | -v )
- echo "$version" ; exit ;;
+ echo "$version" ; exit 0 ;;
--help | --h* | -h )
- echo "$usage"; exit ;;
+ echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -105,7 +99,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
- exit ;;
+ exit 0;;
* )
break ;;
@@ -124,10 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -153,13 +144,10 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis)
os=
basic_machine=$1
;;
- -bluegene*)
- os=-cnk
- ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -181,10 +169,6 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -201,10 +185,6 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -248,71 +228,53 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | bfin \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
+ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | ip2k \
+ | m32r | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | moxie \
- | mt \
| msp430 \
- | nios | nios2 \
| ns16k | ns32k \
- | or32 \
+ | openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
- | ubicom32 \
| v850 | v850e \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k | z80)
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
- ms1)
- basic_machine=mt-unknown
- ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -330,71 +292,56 @@ case $basic_machine in
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | bfin-* | bs2000-* \
+ | avr-* \
+ | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
+ | clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
+ | ip2k-* \
+ | m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
| msp430-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
- | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
| tron-* \
- | ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa*-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
| ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
+ | z8k-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -412,9 +359,6 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
- abacus)
- basic_machine=abacus-unknown
- ;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -432,9 +376,6 @@ case $basic_machine in
amd64)
basic_machine=x86_64-pc
;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -458,10 +399,6 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -470,26 +407,10 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -514,27 +435,12 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16)
- basic_machine=cr16-unknown
- os=-elf
- ;;
crds | unos)
basic_machine=m68k-crds
;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -557,14 +463,6 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@@ -715,14 +613,6 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -734,17 +624,10 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
- basic_machine=microblaze-xilinx
- ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -758,6 +641,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -770,9 +657,6 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -841,6 +725,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -848,12 +736,9 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
- openrisc | openrisc-*)
+ or32 | or32-*)
basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
+ os=-coff
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
@@ -871,14 +756,6 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
pbd)
basic_machine=sparc-tti
;;
@@ -888,12 +765,6 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -950,10 +821,6 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -980,10 +847,6 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -995,9 +858,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -1087,15 +947,6 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
- ;;
- tile*)
- basic_machine=tile-unknown
- os=-linux-gnu
- ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1109,10 +960,6 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -1156,10 +1003,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1171,10 +1014,6 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
none)
basic_machine=none-none
os=-none
@@ -1194,9 +1033,6 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
- mmix)
- basic_machine=mmix-knuth
- ;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1213,10 +1049,13 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1263,9 +1102,6 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1286,30 +1122,25 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
+ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1327,15 +1158,12 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1348,9 +1176,6 @@ case $os in
-opened*)
os=-openedition
;;
- -os400*)
- os=-os400
- ;;
-wince*)
os=-wince
;;
@@ -1372,9 +1197,6 @@ case $os in
-atheos*)
os=-atheos
;;
- -syllable*)
- os=-syllable
- ;;
-386bsd)
os=-bsd
;;
@@ -1397,9 +1219,6 @@ case $os in
-sinix*)
os=-sysv4
;;
- -tpf*)
- os=-tpf
- ;;
-triton*)
os=-sysv3
;;
@@ -1436,14 +1255,6 @@ case $os in
-kaos*)
os=-kaos
;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -nacl*)
- ;;
-none)
;;
*)
@@ -1466,12 +1277,6 @@ else
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
*-acorn)
os=-riscix1.2
;;
@@ -1481,9 +1286,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1509,9 +1314,6 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
- mep-*)
- os=-elf
- ;;
mips*-cisco)
os=-elf
;;
@@ -1530,15 +1332,9 @@ case $basic_machine in
*-be)
os=-beos
;;
- *-haiku)
- os=-haiku
- ;;
*-ibm)
os=-aix
;;
- *-knuth)
- os=-mmixware
- ;;
*-wec)
os=-proelf
;;
@@ -1641,7 +1437,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ -aix*)
vendor=ibm
;;
-beos*)
@@ -1671,15 +1467,9 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
- -os400*)
- vendor=ibm
- ;;
-ptx*)
vendor=sequent
;;
- -tpf*)
- vendor=ibm
- ;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
@@ -1704,7 +1494,7 @@ case $basic_machine in
esac
echo $basic_machine$os
-exit
+exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
Modified: tcl/rivet/branches/apreq-multipart/tclconfig/depcomp
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tclconfig/depcomp?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tclconfig/depcomp (original)
+++ tcl/rivet/branches/apreq-multipart/tclconfig/depcomp Fri May 4 08:23:05 2012
@@ -1,7 +1,10 @@
#! /bin/sh
-
# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +17,7 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -25,13 +26,45 @@
# Originally written by Alexandre Oliva <ol...@dcc.unicamp.br>.
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bu...@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
-# `libtool' can also be set to `yes' or `no'.
-depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@@ -52,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout
fi
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
stat=$?
if test $stat -eq 0; then :
else
@@ -144,14 +199,14 @@ sgi)
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
-' ' ' >> $depfile
- echo >> $depfile
+' ' ' >> "$depfile"
+ echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
+ >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -163,31 +218,43 @@ sgi)
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. This file always lives in the current directory.
- # Also, the AIX compiler puts `$object:' at the start of each line;
- # $object doesn't have directory information.
- stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
- outname="$stripped.o"
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
"$@" -M
fi
-
stat=$?
+
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile"
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -197,37 +264,141 @@ aix)
rm -f "$tmpdepfile"
;;
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
tru64)
- # The Tru64 AIX compiler uses -MD to generate dependencies as a side
+ # The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- tmpdepfile1="$object.d"
- tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile1" "$tmpdepfile2"
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
- if test -f "$tmpdepfile1"; then
- tmpdepfile="$tmpdepfile1"
- else
- tmpdepfile="$tmpdepfile2"
- fi
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a space and a tab in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -240,34 +411,42 @@ tru64)
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- test -z "$dashmflag" && dashmflag=-M
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*) # this is libtool, let us make it quiet
- for arg
- do # cycle over the arguments
- case "$arg" in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
- set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
;;
esac
- "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
@@ -285,36 +464,47 @@ dashXmstdout)
;;
makedepend)
- # X makedepend
- (
- shift
- cleared=no
- for arg in "$@"; do
- case $cleared in no)
- set ""; shift
- cleared=yes
- esac
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift;;
- -*)
- ;;
- *)
- set fnord "$@" "$arg"; shift;;
- esac
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tail +3 "$tmpdepfile" | tr ' ' '
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
@@ -324,35 +514,40 @@ makedepend)
cpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*)
- for arg
- do # cycle over the arguments
- case $arg in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
- set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
;;
esac
- "$@" -E |
- sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -362,42 +557,56 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*)
- for arg
- do # cycle over the arguments
- case $arg in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
- set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
none)
exec "$@"
;;
@@ -409,3 +618,13 @@ none)
esac
exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
Modified: tcl/rivet/branches/apreq-multipart/tclconfig/ltmain.sh
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tclconfig/ltmain.sh?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tclconfig/ltmain.sh (original)
+++ tcl/rivet/branches/apreq-multipart/tclconfig/ltmain.sh Fri May 4 08:23:05 2012
@@ -70,7 +70,7 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1
+# $progname: (GNU libtool) 2.4.2
# automake: $automake_version
# autoconf: $autoconf_version
#
@@ -80,7 +80,7 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1"
+VERSION=2.4.2
TIMESTAMP=""
package_revision=1.3337
@@ -1375,6 +1375,21 @@ func_replace_sysroot ()
func_infer_tag ()
{
$opt_debug
+
+ # FreeBSD-specific: where we install compilers with non-standard names
+ tag_compilers_CC="*cc cc* *gcc gcc* clang"
+ tag_compilers_CXX="*c++ c++* *g++ g++* clang++"
+ base_compiler=`set -- "$@"; echo $1`
+
+ # If $tagname isn't set, then try to infer if the default "CC" tag applies
+ if test -z "$tagname"; then
+ for zp in $tag_compilers_CC; do
+ case $base_compiler in
+ $zp) tagname="CC"; break;;
+ esac
+ done
+ fi
+
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
@@ -1411,7 +1426,22 @@ func_infer_tag ()
break
;;
esac
- fi
+
+ # FreeBSD-specific: try compilers based on inferred tag
+ if test -z "$tagname"; then
+ eval "tag_compilers=\$tag_compilers_${z}"
+ if test -n "$tag_compilers"; then
+ for zp in $tag_compilers; do
+ case $base_compiler in
+ $zp) tagname=$z; break;;
+ esac
+ done
+ if test -n "$tagname"; then
+ break
+ fi
+ fi
+ fi
+ fi
done
# If $tagname still isn't set, then no tagged configuration
# was found and let the user know that the "--tag" command
@@ -3517,6 +3547,9 @@ static const void *lt_preloaded_setup()
;;
esac
;;
+ *-*-freebsd*)
+ # FreeBSD doesn't need this...
+ ;;
*)
func_fatal_error "unknown suffix for \`$my_dlsyms'"
;;
@@ -5595,6 +5628,7 @@ func_mode_link ()
esac
;;
esac
+ deplibs="$deplibs $arg"
continue
;;
@@ -6124,10 +6158,7 @@ func_mode_link ()
case $pass in
dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
if test "$linkmode,$pass" = "lib,dlpreopen"; then
@@ -6170,13 +6201,30 @@ func_mode_link ()
finalize_deplibs="$deplib $finalize_deplibs"
else
func_append compiler_flags " $deplib"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) func_append new_inherited_linker_flags " $deplib" ;;
- esac
- fi
fi
+
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ ;;
+ *)
+ ;;
+ esac # linkmode
+
continue
;;
-l*)
@@ -6447,19 +6495,19 @@ func_mode_link ()
# It is a libtool convenience library, so add in its objects.
func_append convenience " $ladir/$objdir/$old_library"
func_append old_convenience " $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_preserve_dup_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) func_append specialdeplibs " $deplib" ;;
- esac
- fi
- func_append tmp_libs " $deplib"
- done
elif test "$linkmode" != prog && test "$linkmode" != lib; then
func_fatal_error "\`$lib' is not a convenience library"
fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
continue
fi # $pass = conv
@@ -7352,9 +7400,6 @@ func_mode_link ()
revision="$number_minor"
lt_irix_increment=no
;;
- *)
- func_fatal_configuration "$modename: unknown library version type \`$version_type'"
- ;;
esac
;;
no)
Modified: tcl/rivet/branches/apreq-multipart/tclconfig/missing
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tclconfig/missing?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tclconfig/missing (original)
+++ tcl/rivet/branches/apreq-multipart/tclconfig/missing Fri May 4 08:23:05 2012
@@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2003-09-02.23
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pi...@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2003-09-02.23
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,6 +31,8 @@ if test $# -eq 0; then
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +44,7 @@ fi
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -60,11 +60,6 @@ case "$1" in
msg="probably too old"
fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -82,6 +77,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -91,11 +87,16 @@ Supported PROGRAM values:
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
Send bug reports to <bu...@gnu.org>."
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
+ exit $?
;;
-*)
@@ -104,12 +105,49 @@ Send bug reports to <bug-automake@gnu.or
exit 1
;;
- aclocal*)
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
@@ -118,12 +156,7 @@ WARNING: \`$1' is $msg. You should only
touch aclocal.m4
;;
- autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@@ -132,12 +165,7 @@ WARNING: \`$1' is $msg. You should only
touch configure
;;
- autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@@ -147,7 +175,7 @@ WARNING: \`$1' is $msg. You should only
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -157,11 +185,6 @@ WARNING: \`$1' is $msg. You should only
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@@ -172,12 +195,7 @@ WARNING: \`$1' is $msg. You should only
while read f; do touch "$f"; done
;;
- autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@@ -185,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -200,90 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
fi
;;
- bison|yacc)
+ bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
- lex|flex)
+ lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
- help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
- exit 1
+ exit $?
fi
;;
- makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
+ makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -291,20 +297,29 @@ WARNING: \`$1' is $msg. You should only
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
touch $file
;;
- tar)
+ tar*)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -317,13 +332,13 @@ WARNING: \`$1' is $msg. You should only
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
@@ -356,5 +371,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
Modified: tcl/rivet/branches/apreq-multipart/tests/apachetest/apachetest.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/apachetest/apachetest.tcl?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/apachetest/apachetest.tcl (original)
+++ tcl/rivet/branches/apreq-multipart/tests/apachetest/apachetest.tcl Fri May 4 08:23:05 2012
@@ -30,7 +30,7 @@ source [file join [file dirname [info sc
namespace eval apachetest {
- set debug 0
+ set debug 1
# name of the apache binary, such as /usr/sbin/httpd
variable binname ""
@@ -80,13 +80,13 @@ proc apachetest::connect { } {
set diff 0
# We try for 10 seconds.
while { $diff < 10 } {
- if { ! [catch {
- set sk [socket localhost 8081]
- } err]} {
- close $sk
- return
- }
- set diff [expr {[clock seconds] - $starttime}]
+ if { ! [catch {
+ set sk [socket localhost 8081]
+ } err]} {
+ close $sk
+ return
+ }
+ set diff [expr {[clock seconds] - $starttime}]
}
}
@@ -133,10 +133,9 @@ proc apachetest::start { options conftex
if { $debug > 0 } {
puts "Apache started as PID $serverpid"
}
- if { [catch {
- uplevel $code
- } err] } {
- }
+
+ if { [catch { uplevel $code } err] } { }
+
# Kill and wait are the only reasons we need TclX.
# apache2 binary started with -X reacts to SIGQUIT and ignores TERM
kill QUIT $serverpid
@@ -153,14 +152,14 @@ proc apachetest::start { options conftex
proc apachetest::startserver { args } {
variable binname
variable debug
+
if { [catch {
- if { $debug } {
- puts "$binname -X -f [file join [pwd] server.conf] [concat $args]"
- }
- set serverpid [eval exec $binname -X -f \
- "[file join [pwd] server.conf]" [concat $args]]
+ if { $debug } {
+ puts "$binname -X -f [file join [pwd] server.conf] [concat $args]"
+ }
+ set serverpid [eval exec $binname -X -f "[file join [pwd] server.conf]" [concat $args]]
} err] } {
- puts "$err"
+ puts "$err"
}
}
@@ -169,9 +168,10 @@ proc apachetest::startserver { args } {
proc apachetest::getbinname { argv } {
variable binname
+
set binname [lindex $argv 0]
if { $binname == "" || ! [file executable $binname] } {
- error "Please supply the full name and path of the Apache executable on the command line."
+ error "Please supply the full name and path of the Apache executable on the command line."
}
return $binname
}
@@ -182,6 +182,7 @@ proc apachetest::getbinname { argv } {
proc apachetest::getcompiledin { binname } {
variable module_assoc
+
set bin [open [list | "$binname" -l] r]
set compiledin [read $bin]
close $bin
@@ -189,17 +190,17 @@ proc apachetest::getcompiledin { binname
set compiledin [list]
set mod_so_present 0
foreach entry $modlist {
- if { [regexp {(.*)\.c$} $entry match modname] } {
- if { $modname == "mod_so" } {
- set mod_so_present 1
- }
- if { [info exists module_assoc($modname)] } {
- lappend compiledin $module_assoc($modname)
- }
- }
+ if { [regexp {(.*)\.c$} $entry match modname] } {
+ if { $modname == "mod_so" } {
+ set mod_so_present 1
+ }
+ if { [info exists module_assoc($modname)] } {
+ lappend compiledin $module_assoc($modname)
+ }
+ }
}
if { $mod_so_present == 0 } {
- error "We need mod_so in Apache to run these tests"
+ error "We need mod_so in Apache to run these tests"
}
return $compiledin
}
@@ -211,15 +212,19 @@ proc apachetest::gethttpdconf { binname
set options [read $bin]
close $bin
regexp {SERVER_CONFIG_FILE="(.*?)"} "$options" match filename
+
if { ! [file exists $filename] } {
- # see if we can find something by combining HTTP_ROOT + SERVER_CONFIG_FILE
- regexp {HTTPD_ROOT="(.*?)"} "$options" match httpdroot
- set completename [file join $httpdroot $filename]
- if { ! [file exists $completename] } {
- error "neither '$filename' or '$completename' exists"
- }
- return $completename
+
+# see if we can find something by combining HTTP_ROOT + SERVER_CONFIG_FILE
+
+ regexp {HTTPD_ROOT="(.*?)"} "$options" match httpdroot
+ set completename [file join $httpdroot $filename]
+ if { ! [file exists $completename] } {
+ error "neither '$filename' or '$completename' exists"
+ }
+ return $completename
}
+
return $filename
}
@@ -238,7 +243,7 @@ proc apachetest::gethttpdconf { binname
# Text of configuration files.
proc apachetest::getallincludes { conffile } {
- if [file exists $conffile] {
+ if [file exists $conffile] {
set fl [open $conffile r]
set data [read $fl]
close $fl
@@ -246,41 +251,41 @@ proc apachetest::getallincludes { conffi
set newdata {}
foreach line [split $data \n] {
# Look for Include lines.
- if { [regexp -line {^[^\#]*Include +(.*)} $line match file] } {
- puts "including files from $file"
- set file [string trim $file]
-
- # Include directives accept as argument a file, a directory
- # or a glob-style file matching pattern. Patterns usually match
- # many files, but are not directories, so we have to handle
- # all these 3 cases
-
- # we use the glob command to tell whether we are dealing with
- # a pure file expression or a matching pattern
-
- set matched_files [glob -nocomplain $file]
- set matched_files_n [llength $matched_files]
- if {$matched_files_n > 1} {
- foreach fl $matched_files {
- puts "including $fl"
- if [file exists $fl] {
- append newdata [getallincludes $fl]
- }
- }
- } elseif {$matched_files_n == 1} {
- set file $matched_files
- if { [file isdirectory $file] } {
- foreach fl [glob -nocomplain [file join $file *]] {
- puts "including $fl"
- if [file exists $fl] {
- append newdata [getallincludes $fl]
- }
- }
- } else {
- append newdata [getallincludes $file]
- }
- }
- }
+ if { [regexp -line {^[^\#]*Include +(.*)} $line match file] } {
+ puts "including files from $file"
+ set file [string trim $file]
+
+ # Include directives accept as argument a file, a directory
+ # or a glob-style file matching pattern. Patterns usually match
+ # many files, but are not directories, so we have to handle
+ # all these 3 cases
+
+ # we use the glob command to tell whether we are dealing with
+ # a pure file expression or a matching pattern
+
+ set matched_files [glob -nocomplain $file]
+ set matched_files_n [llength $matched_files]
+ if {$matched_files_n > 1} {
+ foreach fl $matched_files {
+ puts "including $fl"
+ if [file exists $fl] {
+ append newdata [getallincludes $fl]
+ }
+ }
+ } elseif {$matched_files_n == 1} {
+ set file $matched_files
+ if { [file isdirectory $file] } {
+ foreach fl [glob -nocomplain [file join $file *]] {
+ puts "including $fl"
+ if [file exists $fl] {
+ append newdata [getallincludes $fl]
+ }
+ }
+ } else {
+ append newdata [getallincludes $file]
+ }
+ }
+ }
}
append data $newdata
return $data
@@ -311,18 +316,19 @@ proc apachetest::getloadmodules { conffi
regexp -line {^[^#]*(ServerRoot[\s]?[\"]?)([^\"]+)()([\"]?)} $confdata \
match sub1 server_root_path sub2
foreach mod $needtoget {
+
# Look for LoadModule lines.
- puts -nonewline "check conf line for $mod module..."
- flush stdout
+ puts -nonewline "check conf line for $mod module..."
+ flush stdout
if { ! [regexp -line "^\[^\#\]*(LoadModule\\s+$mod\\s+.+)\$"\
- $confdata match line] } {
+ $confdata match line] } {
error "No LoadModule line for $mod\!"
} else {
- puts ok
+ puts ok
- set raw_path [join [lrange [split $line { }] 2 end]]
- #trimming leading whitespaces
- set path [string trimleft $raw_path]
+ set raw_path [join [lrange [split $line { }] 2 end]]
+ #trimming leading whitespaces
+ set path [string trimleft $raw_path]
if ![string equal [file pathtype $line] "absolute"] {
set absolute_path [file join $server_root_path $path]
lappend loadline "[join [lrange [split $line " "] 0 1]] $absolute_path"
@@ -342,20 +348,20 @@ proc apachetest::determinemodules { binn
set conffile [gethttpdconf $binname]
foreach {n k} [array get module_assoc] {
- lappend needed $k
+ lappend needed $k
}
set needed [lsort $needed]
set needtoget [list]
foreach mod $needed {
- if { [lsearch $compiledin $mod] == -1 } {
- lappend needtoget $mod
- }
+ if { [lsearch $compiledin $mod] == -1 } {
+ lappend needtoget $mod
+ }
}
if { $needtoget == "" } {
- return ""
+ return ""
} else {
- return [getloadmodules $conffile $needtoget]
+ return [getloadmodules $conffile $needtoget]
}
}
Modified: tcl/rivet/branches/apreq-multipart/tests/binary.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/binary.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/binary.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/binary.rvt Fri May 4 08:23:05 2012
@@ -1,6 +1,6 @@
<?
-headers type "image/jpeg"
-if { [var exists test1] } {
+::rivet::headers type "image/jpeg"
+if { [::rivet::var exists test1] } {
set fl [ open AngeloFish.jpg r ]
fconfigure $fl -encoding binary
fconfigure $fl -translation binary
@@ -11,6 +11,6 @@ if { [var exists test1] } {
puts -nonewline [read $fl]
close $fl
} else {
- include AngeloFish.jpg
+ ::rivet::include AngeloFish.jpg
}
-?>
\ No newline at end of file
+?>
Modified: tcl/rivet/branches/apreq-multipart/tests/binary.test
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/binary.test?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/binary.test (original)
+++ tcl/rivet/branches/apreq-multipart/tests/binary.test Fri May 4 08:23:05 2012
@@ -8,7 +8,7 @@ set binaryfile AngeloFish.jpg
set fl [open $binaryfile r]
fconfigure $fl -translation binary
fconfigure $fl -encoding binary
- set ret [string equal -length 42746 [::http::data $page] [read $fl]]
+ set ret [string equal -length 42747 [::http::data $page] [read $fl]]
close $fl
set ret
} 1
@@ -18,7 +18,7 @@ set binaryfile AngeloFish.jpg
set fl [open $binaryfile r]
fconfigure $fl -translation binary
fconfigure $fl -encoding binary
- set ret [string equal -length 42746 [::http::data $page] [read $fl]]
+ set ret [string equal -length 42747 [::http::data $page] [read $fl]]
close $fl
set ret
} 1
Modified: tcl/rivet/branches/apreq-multipart/tests/broken.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/broken.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/broken.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/broken.rvt Fri May 4 08:23:05 2012
@@ -1,4 +1,4 @@
<?
-# non-existant command
+# non-existent command
broken
?>
Modified: tcl/rivet/branches/apreq-multipart/tests/broken.test
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/broken.test?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/broken.test (original)
+++ tcl/rivet/branches/apreq-multipart/tests/broken.test Fri May 4 08:23:05 2012
@@ -4,10 +4,10 @@ set testfilename1 broken.rvt
::tcltest::test broken-1.1 {error page test} {
apachetest::start {} {} {
- catch {
- set page [::http::geturl "${urlbase}$testfilename1"]
- set match [string trim [::http::data $page]]
- }
+ catch {
+ set page [::http::geturl "${urlbase}$testfilename1"]
+ set match [string trim [::http::data $page]]
+ }
}
set match
} {<PRE>
@@ -19,7 +19,7 @@ set testfilename1 broken.rvt
"namespace eval request {
puts -nonewline ""
-# non-existant command
+# non-existent command
broken
puts -nonewline "
@@ -30,7 +30,7 @@ puts -nonewline "
namespace eval request {
puts -nonewline ""
-# non-existant command
+# non-existent command
broken
puts -nonewline "
Modified: tcl/rivet/branches/apreq-multipart/tests/channel.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/channel.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/channel.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/channel.rvt Fri May 4 08:23:05 2012
@@ -1,6 +1,6 @@
HTML
<?
-no_body
+::rivet::no_body
puts "foo"
?>
MORE HTML
@@ -15,4 +15,4 @@ flush stdout
after 2000
puts stdout baz
?>
-LAST HTML
\ No newline at end of file
+LAST HTML
Modified: tcl/rivet/branches/apreq-multipart/tests/config.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/config.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/config.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/config.rvt Fri May 4 08:23:05 2012
@@ -1,8 +1,8 @@
<?
-if { [var exists brokenpage] } {
+if { [::rivet::var exists brokenpage] } {
# config-1.1
broken
-} elseif { [var exists goodpage] } {
+} elseif { [::rivet::var exists goodpage] } {
puts "Page Body"
}
?>
\ No newline at end of file
Modified: tcl/rivet/branches/apreq-multipart/tests/config.test
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/config.test?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/config.test (original)
+++ tcl/rivet/branches/apreq-multipart/tests/config.test Fri May 4 08:23:05 2012
@@ -4,13 +4,13 @@ set testfilename1 config.rvt
::tcltest::test config-1.1 {ErrorScript config test} {
apachetest::start {
- -c "RivetUserConf ErrorScript 'puts \"Page broken\"'"
+ -c "RivetUserConf ErrorScript 'puts \"Page broken\"'"
} {} {
- catch {
- set page [::http::geturl "${urlbase}$testfilename1?brokenpage"]
- set match [string trim [::http::data $page]]
- ::http::cleanup $page
- }
+ catch {
+ set page [::http::geturl "${urlbase}$testfilename1?brokenpage"]
+ set match [string trim [::http::data $page]]
+ ::http::cleanup $page
+ }
}
set match
} {Page broken}
@@ -19,11 +19,11 @@ set testfilename1 config.rvt
apachetest::start {
-c "RivetUserConf ErrorScript 'puts \"Page broken\"'" -c "AccessFileName test-htaccess"
} {} {
- catch {
- set page [::http::geturl "${urlbase}$testfilename1?brokenpage"]
- set match [string trim [::http::data $page]]
- ::http::cleanup $page
- }
+ catch {
+ set page [::http::geturl "${urlbase}$testfilename1?brokenpage"]
+ set match [string trim [::http::data $page]]
+ ::http::cleanup $page
+ }
}
set match
} {Local Page Header
@@ -34,19 +34,19 @@ this page is BROKEN}
puts $fl {RivetUserConf BeforeScript 'puts "Local Page Header"'}
close $fl
apachetest::start { -c "AccessFileName htaccess2" } {} {
- catch {
- set page [::http::geturl "${urlbase}$testfilename1?goodpage"]
- set match [string trim [::http::data $page]]
- ::http::cleanup $page
- # Now change what's in the ".htaccess" file, and see if it
- # picks it up.
- set fl [open htaccess2 w]
- puts $fl {RivetUserConf BeforeScript 'puts "New Local Page Header"'}
- close $fl
- set page [::http::geturl "${urlbase}$testfilename1?goodpage"]
- append match [string trim [::http::data $page]]
- ::http::cleanup $page
- }
+ catch {
+ set page [::http::geturl "${urlbase}$testfilename1?goodpage"]
+ set match [string trim [::http::data $page]]
+ ::http::cleanup $page
+ # Now change what's in the ".htaccess" file, and see if it
+ # picks it up.
+ set fl [open htaccess2 w]
+ puts $fl {RivetUserConf BeforeScript 'puts "New Local Page Header"'}
+ close $fl
+ set page [::http::geturl "${urlbase}$testfilename1?goodpage"]
+ append match [string trim [::http::data $page]]
+ ::http::cleanup $page
+ }
}
set match
} {Local Page Header
@@ -115,12 +115,12 @@ set i 0
foreach Config $ConfigList {
incr i
::tcltest::test config-auto-${i}.1 {config test} {
- apachetest::start $Config {} {
- catch {
- set page [::http::geturl "${urlbase}$testfilename1?goodpage"]
- set match [string trim [::http::data $page]]
- }
- }
- set match
+ apachetest::start $Config {} {
+ catch {
+ set page [::http::geturl "${urlbase}$testfilename1?goodpage"]
+ set match [string trim [::http::data $page]]
+ }
+ }
+ set match
} [lindex $ResultList [expr $i - 1]]
}
Modified: tcl/rivet/branches/apreq-multipart/tests/cookies.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/cookies.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/cookies.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/cookies.rvt Fri May 4 08:23:05 2012
@@ -1,8 +1,8 @@
<?
-load_cookies
+::rivet::load_cookies
-cookie set mod rivet -expires 01-01-2003
+::rivet::cookie set mod rivet -expires 01-01-2003
if { [ array exists cookies ] } {
foreach { ck } [ array names cookies ] {
@@ -10,4 +10,4 @@ if { [ array exists cookies ] } {
}
}
-?>
\ No newline at end of file
+?>
Modified: tcl/rivet/branches/apreq-multipart/tests/docroot1/afterscript.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/docroot1/afterscript.tcl?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/docroot1/afterscript.tcl (original)
+++ tcl/rivet/branches/apreq-multipart/tests/docroot1/afterscript.tcl Fri May 4 08:23:05 2012
@@ -2,4 +2,4 @@
# $Id$
-puts "afterscript1<br>"
+puts -nonewline "afterscript1"
Modified: tcl/rivet/branches/apreq-multipart/tests/docroot1/beforescript.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/docroot1/beforescript.tcl?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/docroot1/beforescript.tcl (original)
+++ tcl/rivet/branches/apreq-multipart/tests/docroot1/beforescript.tcl Fri May 4 08:23:05 2012
@@ -2,4 +2,5 @@
# $Id$
-puts "beforescript1"
\ No newline at end of file
+set ::beforescript1 1
+puts "beforescript1"
Modified: tcl/rivet/branches/apreq-multipart/tests/docroot1/childinit.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/docroot1/childinit.tcl?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/docroot1/childinit.tcl (original)
+++ tcl/rivet/branches/apreq-multipart/tests/docroot1/childinit.tcl Fri May 4 08:23:05 2012
@@ -2,4 +2,4 @@
# $Id$
-set ::childinit1 1
\ No newline at end of file
+set ::childinit1 1
Modified: tcl/rivet/branches/apreq-multipart/tests/docroot1/vhost1.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/docroot1/vhost1.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/docroot1/vhost1.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/docroot1/vhost1.rvt Fri May 4 08:23:05 2012
@@ -1,15 +1,13 @@
-Virtual Host1 Test
-
<?
-set ::vhost1 1
-puts "vhost1 hello world<br>"
+if {[info exists ::childinit1]} {
+ puts "vhost1 hello world<br>"
+ puts "::childinit1 exists<br>"
-foreach var {
- childinit1 childinit2 vhost1 vhost2
-} {
- if { [info exists ::$var] } {
- puts "$var exists<br>"
- }
-}
+} elseif {[info exists ::beforescript1]} {
+ ?>Virtual Host1 Test<?
+}
+if {[info exists ::childinit2]} {
+ puts "::childinit2 exists<br>"
+}
?>
Modified: tcl/rivet/branches/apreq-multipart/tests/docroot2/afterscript.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/docroot2/afterscript.tcl?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/docroot2/afterscript.tcl (original)
+++ tcl/rivet/branches/apreq-multipart/tests/docroot2/afterscript.tcl Fri May 4 08:23:05 2012
@@ -2,4 +2,4 @@
# $Id$
-puts "afterscript2<br>"
+puts -nonewline "afterscript2"
Modified: tcl/rivet/branches/apreq-multipart/tests/docroot2/beforescript.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/docroot2/beforescript.tcl?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/docroot2/beforescript.tcl (original)
+++ tcl/rivet/branches/apreq-multipart/tests/docroot2/beforescript.tcl Fri May 4 08:23:05 2012
@@ -2,4 +2,5 @@
# $Id$
+set ::beforescript2 1
puts "beforescript2"
Modified: tcl/rivet/branches/apreq-multipart/tests/docroot2/vhost2.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/docroot2/vhost2.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/docroot2/vhost2.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/docroot2/vhost2.rvt Fri May 4 08:23:05 2012
@@ -1,15 +1,13 @@
-Virtual Host2 Test
-
<?
-set ::vhost2 2
-puts "vhost2 hello world"
+if {[info exists ::childinit2]} {
+ puts "vhost2 hello world<br>"
+ puts "::childinit2 exists<br>"
-foreach var {
- childinit1 childinit2 vhost1 vhost2
-} {
- if { [info exists ::$var] } {
- puts "$var exists<br>"
- }
+} elseif {[info exists ::beforescript2]} {
+ ?>Virtual Host2 Test<?
}
+if {[info exists ::childinit1]} {
+ puts "::childinit1 exists<br>"
+}
?>
Modified: tcl/rivet/branches/apreq-multipart/tests/env.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/env.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/env.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/env.rvt Fri May 4 08:23:05 2012
@@ -1,7 +1,7 @@
<?
-load_env
+::rivet::load_env
puts "env(DOCUMENT_NAME) = $env(DOCUMENT_NAME)\n"
-?>
\ No newline at end of file
+?>
Modified: tcl/rivet/branches/apreq-multipart/tests/get.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/get.rvt?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/get.rvt (original)
+++ tcl/rivet/branches/apreq-multipart/tests/get.rvt Fri May 4 08:23:05 2012
@@ -1,26 +1,26 @@
<?
-if { [var number] > 0 } {
- if { [var exists foobar] } {
- puts "\[var get foobar\] = [var get foobar]\n"
- puts "\[var_qs get foobar\] = [var_qs get foobar]\n"
+if { [::rivet::var number] > 0 } {
+ if { [::rivet::var exists foobar] } {
+ puts "\[::rivet::var get foobar\] = [::rivet::var get foobar]\n"
+ puts "\[::rivet::var_qs get foobar\] = [::rivet::var_qs get foobar]\n"
}
- if { [var exists xst] } {
- puts "\[var exists xst\]\[var exists noxst\] = [var exists xst] [var exists noxst]\n"
- puts "\[var_qs exists xst\]\[var_qs exists noxst\] = [var_qs exists xst] [var_qs exists noxst]\n"
+ if { [::rivet::var exists xst] } {
+ puts "\[::rivet::var exists xst\]\[::rivet::var exists noxst\] = [::rivet::var exists xst] [::rivet::var exists noxst]\n"
+ puts "\[::rivet::var_qs exists xst\]\[::rivet::var_qs exists noxst\] = [::rivet::var_qs exists xst] [::rivet::var_qs exists noxst]\n"
}
- if { [var exists Más] } {
- puts "\[var get Más\] = [var get Más]\n"
+ if { [::rivet::var exists Más] } {
+ puts "\[::rivet::var get Más\] = [::rivet::var get Más]\n"
}
- if { [var exists lstvar1] } {
- puts "\[var get lstvar1\] = [var get lstvar1]\n"
+ if { [::rivet::var exists lstvar1] } {
+ puts "\[::rivet::var get lstvar1\] = [::rivet::var get lstvar1]\n"
}
- if { [var exists lstvar2] } {
- puts "\[var list lstvar2\] = [var list lstvar2]\n"
+ if { [::rivet::var exists lstvar2] } {
+ puts "\[::rivet::var list lstvar2\] = [::rivet::var list lstvar2]\n"
}
- puts "\[var get xst foo\] = [var get xst foo]"
+ puts "\[::rivet::var get xst foo\] = [::rivet::var get xst foo]"
} else {
- puts "\[var get xst\] = [var get xst]"
+ puts "\[::rivet::var get xst\] = [::rivet::var get xst]"
}
-?>
\ No newline at end of file
+?>
Modified: tcl/rivet/branches/apreq-multipart/tests/get.test
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/apreq-multipart/tests/get.test?rev=1333806&r1=1333805&r2=1333806&view=diff
==============================================================================
--- tcl/rivet/branches/apreq-multipart/tests/get.test (original)
+++ tcl/rivet/branches/apreq-multipart/tests/get.test Fri May 4 08:23:05 2012
@@ -2,60 +2,60 @@
::tcltest::test getvariables-1.1 {GET variables} {
set page [ ::http::geturl "${urlbase}get.rvt?foobar=goober" ]
- regexp -line {\[var get foobar\] = goober$} [ ::http::data $page ] match
+ regexp -line {\[::rivet::var get foobar\] = goober$} [ ::http::data $page ] match
set match
-} {[var get foobar] = goober}
+} {[::rivet::var get foobar] = goober}
::tcltest::test getvariables-1.2 {GET variables - exists} {
set page [ ::http::geturl "${urlbase}get.rvt?xst=1" ]
- regexp -line {\[var exists xst\]\[var exists noxst\] = 1 0$} [ ::http::data $page ] match
+ regexp -line {\[::rivet::var exists xst\]\[::rivet::var exists noxst\] = 1 0$} [ ::http::data $page ] match
set match
-} {[var exists xst][var exists noxst] = 1 0}
+} {[::rivet::var exists xst][::rivet::var exists noxst] = 1 0}
::tcltest::test getvariables-1.3 {GET variables - doesn't exist} {
set page [ ::http::geturl "${urlbase}get.rvt" ]
- regexp -line {\[var get xst\] = } [ ::http::data $page ] match
+ regexp -line {\[::rivet::var get xst\] = } [ ::http::data $page ] match
set match
-} {[var get xst] = }
+} {[::rivet::var get xst] = }
::tcltest::test getvariables-1.4 {GET variables - default value} {
set page [ ::http::geturl "${urlbase}get.rvt?defaulttest=1" ]
- regexp {^\[var get xst foo\] = foo} [ ::http::data $page ] match
+ regexp {^\[::rivet::var get xst foo\] = foo} [ ::http::data $page ] match
set match
-} {[var get xst foo] = foo}
+} {[::rivet::var get xst foo] = foo}
::tcltest::test getvariables-1.5 {GET variables - var_qs exists} {
set page [ ::http::geturl "${urlbase}get.rvt?xst=1" ]
- regexp -line {\[var_qs exists xst\]\[var_qs exists noxst\] = 1 0$} [ ::http::data $page ] match
+ regexp -line {\[::rivet::var_qs exists xst\]\[::rivet::var_qs exists noxst\] = 1 0$} [ ::http::data $page ] match
set match
-} {[var_qs exists xst][var_qs exists noxst] = 1 0}
+} {[::rivet::var_qs exists xst][::rivet::var_qs exists noxst] = 1 0}
::tcltest::test getvariables-2.1 {GET variables + I18N} {
set page [ ::http::geturl "${urlbase}get.rvt?Más=Tú" ]
- regexp -line {^\[var get Más\] = Tú$} [ ::http::data $page ] match
+ regexp -line {^\[::rivet::var get Más\] = Tú$} [ ::http::data $page ] match
set match
-} {[var get Más] = Tú}
+} {[::rivet::var get Más] = Tú}
::tcltest::test getvariables-2.2 {GET variables + I18N + encoding} {
set page [ ::http::geturl [ format "${urlbase}get.rvt?%s" [ ::http::formatQuery Más Tú ] ] ]
- regexp -line {^\[var get Más\] = Tú$} [ ::http::data $page ] match
+ regexp -line {^\[::rivet::var get Más\] = Tú$} [ ::http::data $page ] match
set match
-} {[var get Más] = Tú}
+} {[::rivet::var get Más] = Tú}
::tcltest::test getvariables-3.1 {GET multi-value variable} {
set page [ ::http::geturl "${urlbase}get.rvt?lstvar1=a&lstvar1=b&lstvar1=c+d" ]
- regexp -line {\[var get lstvar1\] = a b c d$} [ ::http::data $page ] match
+ regexp -line {\[::rivet::var get lstvar1\] = a b c d$} [ ::http::data $page ] match
set match
-} {[var get lstvar1] = a b c d}
+} {[::rivet::var get lstvar1] = a b c d}
::tcltest::test getvariables-3.2 {GET multi-value variable as list} {
set page [ ::http::geturl "${urlbase}get.rvt?lstvar2=a&lstvar2=b&lstvar2=c+d" ]
- regexp -line {\[var list lstvar2\] = a b {c d}$} [ ::http::data $page ] match
+ regexp -line {\[::rivet::var list lstvar2\] = a b {c d}$} [ ::http::data $page ] match
set match
-} {[var list lstvar2] = a b {c d}}
+} {[::rivet::var list lstvar2] = a b {c d}}
::tcltest::test getvariables-4.1 {var_qs} {
set page [ ::http::geturl "${urlbase}get.rvt?foobar=goober" ]
- regexp -line {\[var_qs get foobar\] = goober$} [ ::http::data $page ] match
+ regexp -line {\[::rivet::var_qs get foobar\] = goober$} [::http::data $page] match
set match
-} {[var_qs get foobar] = goober}
+} {[::rivet::var_qs get foobar] = goober}
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org