Paul Eggert <[EMAIL PROTECTED]> writes: > "Mark D. Baushke" <[EMAIL PROTECTED]> writes: > > > ../gnulib/gnulib-tool --update > > > > command from the hello-2.1.91 directory on a Solaris 9 box yeilds a > > syntax error: > > > > ../gnulib/gnulib-tool: syntax error at line 634: `}' unexpected > > The Solaris /bin/sh doesn't conform to POSIX: > > $ /bin/sh -c 'if ! false; then echo good; else echo bad; fi' > /bin/sh: !: not found > bad > > You can work around the problem with /bin/bash or /bin/ksh or > /usr/xpg4/bin/sh. You might also file a bug report with Sun; > there's no good reason for /bin/sh to not support '!'. > > I suspect it's not high priority to port gnulib-tool to hosts that > fail to conform to POSIX in major ways. Though I suppose gnulib-tool > could check for this particular problem and exit right away if it > detects it.
There is apparently only a single shell function in gnulib-tool which makes use of the '!' feature. Is it really so horrible to work around this non-POSIX instance? I suspect the patch after my signature should do the job (I didn't get an error on the Solaris 9 box and the hello CVS tree.) That said, if you would rather have hard tests for ! support and maybe even test for GNU sort in the script (there is a comment that it is needed), I would not complain. The cvs project sanity.sh script does tries to find versions of tools that are on the machine to do the job that needs to be done. So, even if the PATH is /usr/bin:/usr/local/bin and /usr/local/bin has GNU stuff, we have a chance of finding the right thing. Testing that the $SORT supports the -g switch would probably be sufficient which is used to set the autoconf_minversion ... > Your other points about gnulib-tool reflect some problems I've had > with it as well, not that I have solutions. Hmmm... is it worth the effort to try to make GNULIB easier to use? -- Mark 2006-08-21 Mark D. Baushke <[EMAIL PROTECTED]> * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2 /bin/sh understanding of '!' conditional negation. Index: gnulib-tool =================================================================== RCS file: /sources/gnulib/gnulib/gnulib-tool,v retrieving revision 1.137 diff -u -p -r1.137 gnulib-tool --- gnulib-tool 15 Aug 2006 11:52:39 -0000 1.137 +++ gnulib-tool 21 Aug 2006 07:35:26 -0000 @@ -629,7 +629,7 @@ func_all_modules () # verifies a module name func_verify_module () { - if ! { test -f "$gnulib_dir/modules/$module" \ + if { test -f "$gnulib_dir/modules/$module" \ || { test -n "$local_gnulib_dir" && test -d "$local_gnulib_dir/modules" \ && test -f "$local_gnulib_dir/modules/$module"; }; } \ || test "CVS" = "$module" \ @@ -637,7 +637,7 @@ func_verify_module () || test "COPYING" = "$module" \ || test "README" = "$module" \ || test "TEMPLATE" = "$module" \ - || test "TEMPLATE-TESTS" = "$module"; then + || test "TEMPLATE-TESTS" = "$module"; then :; else echo "gnulib-tool: module $module doesn't exist" 1>&2 module= fi