]> 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:23 +0000 (13:50 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 28 Dec 2004 13:50:23 +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 ac8f1ae299e2b956af9b89608b6fcabee5c16c75..ca691ac0121058929e79735671c3c3e1b0a16efb 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 f18fefb7af9ac387dd5a7522d9e607ce96eba457..ccef2726d365abed968bd99c32691c5aca8dc16b 100644 (file)
@@ -46,7 +46,7 @@ edit = sed \
        -e 's,@prefix\@,$(prefix),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="" ;; \
@@ -101,7 +101,7 @@ pkgvmacro_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)
@@ -124,7 +124,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 7ec22b9eee03d056185cfb5eef9eae09489210b9..3c5c002a63f44f900cc46b95c23266b19b4f20c9 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
 
 # Whip up some dirty Makefiles:
 makefiles=
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 16ed1b3f66673d8157ad1779ff9b661dc1956023..ef80b4a5bd632adea2343858c33844cf51f8e3b8 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
 
@@ -492,21 +492,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 023b35908d13de226933cb99a889f6da24459a76..aefee473f6cac9c826711b246d80034b1c75e944 100644 (file)
@@ -161,14 +161,16 @@ configure_ac=configure.in
       --*=*)
                        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