diff options
author | Po Lu <luangruo@yahoo.com> | 2023-04-26 04:57:31 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-04-26 04:57:31 +0200 |
commit | 3ef794d11bcbea3b8ae57767772a3255b669b8ce (patch) | |
tree | 8a9c6350de418fd421083955d4be7c3e538ff797 | |
parent | 446cbd49a361d875b602d68979c8983d3b32c512 (diff) | |
download | gnulib-3ef794d11bcbea3b8ae57767772a3255b669b8ce.tar.gz |
gnulib-tool: For conditional dependencies, generate portable sh code.
* gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax
'if ! variable', that does not work with Solaris /bin/sh.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | gnulib-tool | 2 | ||||
-rw-r--r-- | pygnulib/GLEmiter.py | 2 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2023-04-26 Po Lu <luangruo@yahoo.com> (tiny change) + Bruno Haible <bruno@clisp.org> + + gnulib-tool: For conditional dependencies, generate portable sh code. + * gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax + 'if ! variable', that does not work with Solaris /bin/sh. + * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise. + 2023-04-25 Bruno Haible <bruno@clisp.org> expm1 tests: Avoid test failure on 32-bit mingw. diff --git a/gnulib-tool b/gnulib-tool index 5373333f74..74c395d9a4 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -4731,7 +4731,7 @@ func_emit_autoconf_snippets () func_module_shellvar_name "$module" echo " $shellfunc ()" echo ' {' - echo " if ! \$$shellvar; then" + echo " if \$$shellvar; then :; else" func_emit_autoconf_snippet " " echo " $shellvar=true" deps=`func_get_dependencies $module | sed -e "$sed_dependencies_without_conditions"` diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index 93f50b728c..dc46ba89e9 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -283,7 +283,7 @@ class GLEmiter(object): shellvar = module.getShellVar() emit += ' %s ()\n' % shellfunc emit += ' {\n' - emit += ' if ! $%s; then\n' % shellvar + emit += ' if $%s; then :; else\n' % shellvar emit += self.autoconfSnippet(module, toplevel, disable_libtool, disable_gettext, replace_auxdir, ' ') emit += ' %s=true\n' % shellvar |