ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/releases/8.1.0beta5/ylwrap
(Generate patch)

Comparing:
ircd-hybrid-7.2/ylwrap (file contents), Revision 912 by michael, Wed Nov 7 22:47:44 2007 UTC vs.
ircd-hybrid-8/ylwrap (file contents), Revision 1375 by michael, Fri Apr 27 08:01:46 2012 UTC

# Line 1 | Line 1
1   #! /bin/sh
2   # ylwrap - wrapper for lex/yacc invocations.
3  
4 < scriptversion=2005-05-14.22
4 > scriptversion=2011-08-25.18; # UTC
5  
6 < # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
7 < #   Free Software Foundation, Inc.
6 > # Copyright (C) 1996-2012 Free Software Foundation, Inc.
7   #
8   # Written by Tom Tromey <tromey@cygnus.com>.
9   #
# Line 19 | Line 18 | scriptversion=2005-05-14.22
18   # GNU General Public License for more details.
19   #
20   # You should have received a copy of the GNU General Public License
21 < # along with this program; if not, write to the Free Software
23 < # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 < # 02110-1301, USA.
21 > # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22  
23   # As a special exception to the GNU General Public License, if you
24   # distribute this file as part of a program that contains a
# Line 34 | Line 31 | scriptversion=2005-05-14.22
31  
32   case "$1" in
33    '')
34 <    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
34 >    echo "$0: No files given.  Try '$0 --help' for more information." 1>&2
35      exit 1
36      ;;
37    --basedir)
# Line 101 | Line 98 | esac
98   # FIXME: add hostname here for parallel makes that run commands on
99   # other machines.  But that might take us over the 14-char limit.
100   dirname=ylwrap$$
101 < trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
101 > do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
102 > trap "ret=129; $do_exit" 1
103 > trap "ret=130; $do_exit" 2
104 > trap "ret=141; $do_exit" 13
105 > trap "ret=143; $do_exit" 15
106   mkdir $dirname || exit 1
107  
108   cd $dirname
109  
110   case $# in
111 <  0) $prog "$input" ;;
112 <  *) $prog "$@" "$input" ;;
111 >  0) "$prog" "$input" ;;
112 >  *) "$prog" "$@" "$input" ;;
113   esac
114   ret=$?
115  
# Line 127 | Line 128 | if test $ret -eq 0; then
128    # The directory holding the input.
129    input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
130    # Quote $INPUT_DIR so we can use it in a regexp.
131 <  # FIXME: really we should care about more than `.' and `\'.
131 >  # FIXME: really we should care about more than '.' and '\'.
132    input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
133  
134    while test "$#" -ne 0; do
# Line 135 | Line 136 | if test $ret -eq 0; then
136      # Handle y_tab.c and y_tab.h output by DOS
137      if test $y_tab_nodot = "yes"; then
138        if test $from = "y.tab.c"; then
139 <        from="y_tab.c"
139 >        from="y_tab.c"
140        else
141 <        if test $from = "y.tab.h"; then
142 <          from="y_tab.h"
143 <        fi
141 >        if test $from = "y.tab.h"; then
142 >          from="y_tab.h"
143 >        fi
144        fi
145      fi
146      if test -f "$from"; then
147        # If $2 is an absolute path name, then just use that,
148 <      # otherwise prepend `../'.
148 >      # otherwise prepend '../'.
149        case "$2" in
150 <        [\\/]* | ?:[\\/]*) target="$2";;
151 <        *) target="../$2";;
150 >        [\\/]* | ?:[\\/]*) target="$2";;
151 >        *) target="../$2";;
152        esac
153  
154        # We do not want to overwrite a header file if it hasn't
# Line 157 | Line 158 | if test $ret -eq 0; then
158        # Makefile.  Divert the output of all other files to a temporary
159        # file so we can compare them to existing versions.
160        if test $first = no; then
161 <        realtarget="$target"
162 <        target="tmp-`echo $target | sed s/.*[\\/]//g`"
161 >        realtarget="$target"
162 >        target="tmp-`echo $target | sed s/.*[\\/]//g`"
163        fi
164 <      # Edit out `#line' or `#' directives.
164 >      # Edit out '#line' or '#' directives.
165        #
166        # We don't want the resulting debug information to point at
167        # an absolute srcdir; it is better for it to just mention the
# Line 182 | Line 183 | if test $ret -eq 0; then
183  
184        # Check whether header files must be updated.
185        if test $first = no; then
186 <        if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
187 <          echo "$2" is unchanged
188 <          rm -f "$target"
189 <        else
186 >        if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
187 >          echo "$2" is unchanged
188 >          rm -f "$target"
189 >        else
190            echo updating "$2"
191            mv -f "$target" "$realtarget"
192          fi
# Line 219 | Line 220 | exit $ret
220   # eval: (add-hook 'write-file-hooks 'time-stamp)
221   # time-stamp-start: "scriptversion="
222   # time-stamp-format: "%:y-%02m-%02d.%02H"
223 < # time-stamp-end: "$"
223 > # time-stamp-time-zone: "UTC"
224 > # time-stamp-end: "; # UTC"
225   # End:

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)