~ubuntu-branches/ubuntu/maverick/libxml2/maverick

« back to all changes in this revision

Viewing changes to doc/examples/xpath1

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-12-05 19:50:33 UTC
  • Revision ID: james.westby@ubuntu.com-20071205195033-ti05mbo96lfyuhfe
Tags: 2.6.30.dfsg-3ubuntu1
* Merge with Debian; remaining changes:
  - debian/rules: create a udeb for debian-installer, correct libxml2-dev
    Depends to include zlib1g-dev.
  - Build a python-libxml2-dbg package.
  - Fix a regression using XSLT copy element. LP: #147144.
* Link using -Bsymbolic-functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
 
 
3
# xpath1 - temporary wrapper script for .libs/xpath1
 
4
# Generated by ltmain.sh - GNU libtool 1.5.24 Debian 1.5.24-1 (1.1220.2.456 2007/06/24 02:25:32)
 
5
#
 
6
# The xpath1 program cannot be directly executed until all the libtool
 
7
# libraries that it depends on are installed.
 
8
#
 
9
# This wrapper script should never be moved out of the build directory.
 
10
# If it is, it will not operate correctly.
 
11
 
 
12
# Sed substitution that helps us do robust quoting.  It backslashifies
 
13
# metacharacters that are still active within double-quoted strings.
 
14
Xsed='/bin/sed -e 1s/^X//'
 
15
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
 
16
 
 
17
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
 
18
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 
19
  emulate sh
 
20
  NULLCMD=:
 
21
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
 
22
  # is contrary to our usage.  Disable this feature.
 
23
  alias -g '${1+"$@"}'='"$@"'
 
24
  setopt NO_GLOB_SUBST
 
25
else
 
26
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 
27
fi
 
28
BIN_SH=xpg4; export BIN_SH # for Tru64
 
29
DUALCASE=1; export DUALCASE # for MKS sh
 
30
 
 
31
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
32
# if CDPATH is set.
 
33
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
34
 
 
35
relink_command="(cd /home/packages/u/tmp/libxml2-2.6.30.dfsg/doc/examples; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=\"/home/doko/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games\"; export PATH; gcc -Wall -g -O2 -fno-strict-aliasing -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wl,--as-needed -Wl,-Bsymbolic-functions -o \$progdir/\$file xpath1.o  -lreadline -lhistory -lncurses ../../.libs/libxml2.so -lz -lm  -Wl,--rpath -Wl,/home/packages/u/tmp/libxml2-2.6.30.dfsg/.libs ) "
 
36
 
 
37
# This environment variable determines our operation mode.
 
38
if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
 
39
  # install mode needs the following variable:
 
40
  notinst_deplibs=' ../../libxml2.la'
 
41
else
 
42
  # When we are sourced in execute mode, $file and $echo are already set.
 
43
  if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
 
44
    echo="echo"
 
45
    file="$0"
 
46
    # Make sure echo works.
 
47
    if test "X$1" = X--no-reexec; then
 
48
      # Discard the --no-reexec flag, and continue.
 
49
      shift
 
50
    elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
51
      # Yippee, $echo works!
 
52
      :
 
53
    else
 
54
      # Restart under the correct shell, and then maybe $echo will work.
 
55
      exec /bin/bash "$0" --no-reexec ${1+"$@"}
 
56
    fi
 
57
  fi
 
58
 
 
59
  # Find the directory that this script lives in.
 
60
  thisdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
 
61
  test "x$thisdir" = "x$file" && thisdir=.
 
62
 
 
63
  # Follow symbolic links until we get to the real thisdir.
 
64
  file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
 
65
  while test -n "$file"; do
 
66
    destdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
 
67
 
 
68
    # If there was a directory component, then change thisdir.
 
69
    if test "x$destdir" != "x$file"; then
 
70
      case "$destdir" in
 
71
      [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
 
72
      *) thisdir="$thisdir/$destdir" ;;
 
73
      esac
 
74
    fi
 
75
 
 
76
    file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
 
77
    file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
 
78
  done
 
79
 
 
80
  # Try to get the absolute directory name.
 
81
  absdir=`cd "$thisdir" && pwd`
 
82
  test -n "$absdir" && thisdir="$absdir"
 
83
 
 
84
  program=lt-'xpath1'
 
85
  progdir="$thisdir/.libs"
 
86
 
 
87
  if test ! -f "$progdir/$program" || \
 
88
     { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
 
89
       test "X$file" != "X$progdir/$program"; }; then
 
90
 
 
91
    file="$$-$program"
 
92
 
 
93
    if test ! -d "$progdir"; then
 
94
      mkdir "$progdir"
 
95
    else
 
96
      rm -f "$progdir/$file"
 
97
    fi
 
98
 
 
99
    # relink executable if necessary
 
100
    if test -n "$relink_command"; then
 
101
      if relink_command_output=`eval $relink_command 2>&1`; then :
 
102
      else
 
103
        echo "$relink_command_output" >&2
 
104
        rm -f "$progdir/$file"
 
105
        exit 1
 
106
      fi
 
107
    fi
 
108
 
 
109
    mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
 
110
    { rm -f "$progdir/$program";
 
111
      mv -f "$progdir/$file" "$progdir/$program"; }
 
112
    rm -f "$progdir/$file"
 
113
  fi
 
114
 
 
115
  if test -f "$progdir/$program"; then
 
116
    if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
 
117
      # Run the actual program with our arguments.
 
118
 
 
119
      exec "$progdir/$program" ${1+"$@"}
 
120
 
 
121
      $echo "$0: cannot exec $program $*"
 
122
      exit 1
 
123
    fi
 
124
  else
 
125
    # The program doesn't exist.
 
126
    $echo "$0: error: \`$progdir/$program' does not exist" 1>&2
 
127
    $echo "This script is just a wrapper for $program." 1>&2
 
128
    echo "See the libtool documentation for more information." 1>&2
 
129
    exit 1
 
130
  fi
 
131
fi