Diff for /embedaddon/ipsec-tools/ylwrap between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 22:39:10 version 1.1.1.2, 2014/06/15 16:37:11
Line 1 Line 1
 #! /bin/sh  #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.  # ylwrap - wrapper for lex/yacc invocations.
   
scriptversion=2009-04-28.21; # UTCscriptversion=2011-08-25.18; # UTC
   
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,  # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
# 2007, 2009 Free Software Foundation, Inc.# 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
 #  #
 # Written by Tom Tromey <tromey@cygnus.com>.  # Written by Tom Tromey <tromey@cygnus.com>.
 #  #
Line 99  esac Line 99  esac
 # FIXME: add hostname here for parallel makes that run commands on  # FIXME: add hostname here for parallel makes that run commands on
 # other machines.  But that might take us over the 14-char limit.  # other machines.  But that might take us over the 14-char limit.
 dirname=ylwrap$$  dirname=ylwrap$$
trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
 trap "ret=129; $do_exit" 1
 trap "ret=130; $do_exit" 2
 trap "ret=141; $do_exit" 13
 trap "ret=143; $do_exit" 15
 mkdir $dirname || exit 1  mkdir $dirname || exit 1
   
 cd $dirname  cd $dirname
Line 133  if test $ret -eq 0; then Line 137  if test $ret -eq 0; then
     # Handle y_tab.c and y_tab.h output by DOS      # Handle y_tab.c and y_tab.h output by DOS
     if test $y_tab_nodot = "yes"; then      if test $y_tab_nodot = "yes"; then
       if test $from = "y.tab.c"; then        if test $from = "y.tab.c"; then
        from="y_tab.c"        from="y_tab.c"
       else        else
        if test $from = "y.tab.h"; then        if test $from = "y.tab.h"; then
          from="y_tab.h"          from="y_tab.h"
        fi        fi
       fi        fi
     fi      fi
     if test -f "$from"; then      if test -f "$from"; then
       # If $2 is an absolute path name, then just use that,        # If $2 is an absolute path name, then just use that,
       # otherwise prepend `../'.        # otherwise prepend `../'.
       case "$2" in        case "$2" in
        [\\/]* | ?:[\\/]*) target="$2";;        [\\/]* | ?:[\\/]*) target="$2";;
        *) target="../$2";;        *) target="../$2";;
       esac        esac
   
       # We do not want to overwrite a header file if it hasn't        # We do not want to overwrite a header file if it hasn't
Line 155  if test $ret -eq 0; then Line 159  if test $ret -eq 0; then
       # Makefile.  Divert the output of all other files to a temporary        # Makefile.  Divert the output of all other files to a temporary
       # file so we can compare them to existing versions.        # file so we can compare them to existing versions.
       if test $first = no; then        if test $first = no; then
        realtarget="$target"        realtarget="$target"
        target="tmp-`echo $target | sed s/.*[\\/]//g`"        target="tmp-`echo $target | sed s/.*[\\/]//g`"
       fi        fi
       # Edit out `#line' or `#' directives.        # Edit out `#line' or `#' directives.
       #        #
Line 180  if test $ret -eq 0; then Line 184  if test $ret -eq 0; then
   
       # Check whether header files must be updated.        # Check whether header files must be updated.
       if test $first = no; then        if test $first = no; then
        if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then        if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
          echo "$2" is unchanged          echo "$2" is unchanged
          rm -f "$target"          rm -f "$target"
        else        else
           echo updating "$2"            echo updating "$2"
           mv -f "$target" "$realtarget"            mv -f "$target" "$realtarget"
         fi          fi

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>