Use 'case' statement to work around ${1+"$@"} problem with Zsh.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Apr 2002 20:54:45 +0000 (20:54 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Apr 2002 20:54:45 +0000 (20:54 +0000)
aclocal.in
automake.in
lib/ylwrap

index 89e7c5a..b19e185 100644 (file)
@@ -2,12 +2,12 @@
 # -*- perl -*-
 # @configure_input@
 
-eval 'exec @PERL@ -S $0 ${1+"$@"}'
+eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
     if 0;
 
 # aclocal - create aclocal.m4 by scanning configure.ac
 
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 #           Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
index 86bd189..d8a73e3 100755 (executable)
@@ -2,11 +2,11 @@
 # -*- perl -*-
 # @configure_input@
 
-eval 'exec @PERL@ -S $0 ${1+"$@"}'
+eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
     if 0;
 
 # automake - create Makefile.in from Makefile.am
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
index e8abf82..71e5225 100755 (executable)
@@ -1,6 +1,9 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
-# Copyright 1996, 1997, 1998, 1999, 2001  Free Software Foundation, Inc.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002 Free Software
+# Foundation, Inc.
+#
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -71,7 +74,10 @@ mkdir $dirname || exit 1
 
 cd $dirname
 
-$prog ${1+"$@"} "$input"
+case $# in
+ 0) $prog "$input" ;;
+ *) $prog "$@" "$input" ;;
+esac
 status=$?
 
 if test $status -eq 0; then