]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* Makefile.am, bootstrap, clcommit.m4sh, libtoolize.m4sh,
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 28 Dec 2004 13:50:58 +0000 (13:50 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 28 Dec 2004 13:50:58 +0000 (13:50 +0000)
config/ltmain.m4sh: Replace `set --' with `set dummy [...]; shift'
for portability.  tests/sh.test: Test for this.

ChangeLog
Makefile.am
bootstrap
clcommit.m4sh
config/ltmain.m4sh
libtoolize.m4sh
tests/sh.test

index 5edc2b135aa5ebc2e3d2fecadbd7d33a97ae6a3f..2b7c213381f765e3e74d1d6cf33d87b126570269 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>,
+           Gary V. Vaughan <gary@gnu.org>
+
+       * Makefile.am, bootstrap, clcommit.m4sh, libtoolize.m4sh,
+       config/ltmain.m4sh: Replace `set --' with `set dummy [...]; shift'
+       for portability.  tests/sh.test: Test for this.
+
 2004-12-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * libtoolize.m4sh, config/ltmain.m4sh (most functions):
index 80308c62744d35517514f96a921562407b4f0ef9..5d3307ca38807c1fcd3e2e8000abbe0a439d2414 100644 (file)
@@ -35,7 +35,7 @@ edit = sed \
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
 
-timestamp = set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
+timestamp = set dummy `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; shift; \
        case $(VERSION) in \
          *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2 $$3" ;; \
          *) TIMESTAMP="" ;; \
@@ -74,7 +74,7 @@ aclocal_DATA = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
 MKSTAMP = $(SHELL) $(top_srcdir)/config/mkstamp
 $(top_srcdir)/stamp-vcl: vcl-tmp clean-ltmain-sh ChangeLog
 vcl-tmp:
-       @set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
+       @set dummy `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; shift; \
        echo "$$1" > vcl.tmp; \
        cmp -s vcl.tmp $(top_srcdir)/stamp-vcl \
          || (echo "Updating stamp-vcl"; cp vcl.tmp $(top_srcdir)/stamp-vcl)
@@ -97,7 +97,7 @@ clean-ltmain-sh:
 # how ltversion.m4 appears in our dependencies.
 EXTRA_DIST += m4/ltversion.in m4/ltversion.m4
 $(top_srcdir)/m4/ltversion.m4: m4/ltversion.in configure.ac $(top_srcdir)/stamp-vcl
-       set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
+       set dummy `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; shift; \
        cd $(top_srcdir); \
        rm -f m4/ltversion.tmp; \
        serial=`echo $$1 | sed 's,^1[.],,g'`; \
index 26fb4eb79842dba64df1f2e1f3e2b63ab4bd22b6..a164041a083375c00a60f682c855017306c6a380 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -49,7 +49,8 @@ if test -z "$reconfdirs"; then
 fi
 
 # Extract the package name and version number from configure.ac:
-set -- `sed '/AC_INIT/{s/[][,()]/ /g; p;};d' configure.ac`
+set dummy `sed '/AC_INIT/{s/[][,()]/ /g; p;};d' configure.ac`
+shift
 
 # Building distributed files from configure is bad for automake, so we
 # generate them here, and have Makefile rules to keep them up to date.
index ae2cb801e71882ae42fa4b664e2ba3f9b9503485..dfd33881347ad4093d50e72085508d3032844963 100644 (file)
@@ -130,7 +130,7 @@ set -e
                        set -x
                        ;;
 
-      --fast)          set -- --force --first ${1+"$@"}        ;;
+      --fast)          set dummy --force --first ${1+"$@"}; shift      ;;
 
       -f|--force)      opt_update=false; PAGER=cat             ;;
 
@@ -200,7 +200,8 @@ set -e
                        fi
                        # The funny quoting allows keeping one option per
                        # line in $rc_file:
-                       eval set -- `echo \`cat $rc_file\` \\\${1+\"\\\$@\"}`
+                       eval set dummy `echo \`cat $rc_file\` \\\${1+\"\\\$@\"}`
+                       shift
                        ;;
 
       -s|--sendmail)   test $# = 0 && func_missing_arg $opt && break
@@ -246,21 +247,24 @@ set -e
       --*=*)
                        arg=`echo "$opt" | $SED "$my_sed_long_arg"`
                        opt=`echo "$opt" | $SED "$my_sed_long_opt"`
-                       set -- "$opt" "$arg" ${1+"$@"}
+                       set dummy "$opt" "$arg" ${1+"$@"}
+                       shift
                        ;;
 
       # Separate optargs to short options:
       -m*|-F*|-C*|-S*|-s*|-z*)
                        arg=`echo "$opt" |$SED "$my_sed_single_rest"`
                        opt=`echo "$opt" |$SED "$my_sed_single_opt"`
-                       set -- "$opt" "$arg" ${1+"$@"}
+                       set dummy "$opt" "$arg" ${1+"$@"}
+                       shift
                        ;;
 
       # Separate non-argument short options:
       -f*|-1*|-n*|-q*)
                        rest=`echo "$opt" |$SED "$my_sed_single_rest"`
                        opt=`echo "$opt" |$SED "$my_sed_single_opt"`
-                       set -- "$opt" "-$rest" ${1+"$@"}
+                       set dummy "$opt" "-$rest" ${1+"$@"}
+                       shift
                        ;;
 
       -\?|-h)          func_usage                                      ;;
@@ -268,7 +272,7 @@ set -e
       --version)       func_version                                    ;;
       --)              break                                           ;;
       -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
-      *)               set -- "$opt" ${1+"$@"};        break           ;;
+      *)               set dummy "$opt" ${1+"$@"};     shift; break            ;;
     esac
   done
 
index 8313ede418b27b24cd52d40a245369fcb601a92a..008b96abdd09b33b28dc3b7a7e21915eb3341001 100644 (file)
@@ -407,25 +407,25 @@ Otherwise, only FILE itself is deleted using RM."
   # Shorthand for --mode=foo, only valid as the first argument
   case $1 in
   clean|clea|cle|cl)
-    shift; set -- --mode clean ${1+"$@"}
+    shift; set dummy --mode clean ${1+"$@"}; shift
     ;;
   compile|compil|compi|comp|com|co|c)
-    shift; set -- --mode compile ${1+"$@"}
+    shift; set dummy --mode compile ${1+"$@"}; shift
     ;;
   execute|execut|execu|exec|exe|ex|e)
-    shift; set -- --mode execute ${1+"$@"}
+    shift; set dummy --mode execute ${1+"$@"}; shift
     ;;
   finish|finis|fini|fin|fi|f)
-    shift; set -- --mode finish ${1+"$@"}
+    shift; set dummy --mode finish ${1+"$@"}; shift
     ;;
   install|instal|insta|inst|ins|in|i)
-    shift; set -- --mode install ${1+"$@"}
+    shift; set dummy --mode install ${1+"$@"}; shift
     ;;
   link|lin|li|l)
-    shift; set -- --mode link ${1+"$@"}
+    shift; set dummy --mode link ${1+"$@"}; shift
     ;;
   uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-    shift; set -- --mode uninstall ${1+"$@"}
+    shift; set dummy --mode uninstall ${1+"$@"}; shift
     ;;
   esac
 
@@ -495,21 +495,24 @@ Otherwise, only FILE itself is deleted using RM."
       -dlopen=*|--mode=*|--tag=*)
                        arg=`$ECHO "X$opt" | $Xsed -e "$my_sed_long_arg"`
                        opt=`$ECHO "X$opt" | $Xsed -e "$my_sed_long_opt"`
-                       set -- "$opt" "$arg" ${1+"$@"}
+                       set dummy "$opt" "$arg" ${1+"$@"}
+                       shift
                        ;;
 
       # Separate optargs to short options:
 #      -x*|-y*)
 #                      arg=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_rest"`
 #                      opt=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_opt"`
-#                      set -- "$opt" "$arg" ${1+"$@"}
+#                      set dummy "$opt" "$arg" ${1+"$@"}
+#                      shift
 #                      ;;
 
       # Separate non-argument short options:
 #      -z*|-z*|-y*)
 #                      rest=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_rest"`
 #                      opt=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_opt"`
-#                      set -- "$opt" "-$rest" ${1+"$@"}
+#                      set dummy "$opt" "-$rest" ${1+"$@"}
+#                      shift
 #                      ;;
 
       -\?|-h)          func_usage                                      ;;
index 578ddc6b2499f195bbab74c1f396454908ded416..edd4820872cfdc0ff51db0a27a84e9453a289918 100644 (file)
@@ -150,14 +150,16 @@ configure_ac=configure.in
       --ltdl=*)
                        arg=`$ECHO "X$opt" | $Xsed -e "$my_sed_long_arg"`
                        opt=`$ECHO "X$opt" | $Xsed -e "$my_sed_long_opt"`
-                       set -- "$opt" "$arg" ${1+"$@"}
+                       set dummy "$opt" "$arg" ${1+"$@"}
+                       shift
                        ;;
 
       # Separate non-argument short options:
       -c*|-i*|-f*|-n*|-q*|-v*)
                        rest=`$ECHO "X$opt" | $Xsed -e "$my_sed_single_rest"`
                        opt=`$ECHO "X$opt" | $Xsed -e "$my_sed_single_opt"`
-                       set -- "$opt" "-$rest" ${1+"$@"}
+                       set dummy "$opt" "-$rest" ${1+"$@"}
+                       shift
                        ;;
 
       -\?|-h)          func_usage                                      ;;
index 7ef94a3542aa40036bc98f1dfe9c4c1b9fae34e8..0b5be69f94b1c13288f40c636c80698deee9d031 100755 (executable)
@@ -75,4 +75,10 @@ if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \
   status=$EXIT_FAILURE
 fi
 
+# Check for using set -- instead of set dummy
+if $EGREP -n -e 'set[  ]+--[   ]+' $scripts; then
+  echo "use \`set dummy ...' instead of \`set -- ...'"
+  status=$EXIT_FAILURE
+fi
+
 exit $status