* bug#15769: building on OpenBSD fails because of a shell pattern problem
@ 2013-10-31 13:41 Han Boetes
2013-10-31 17:27 ` Glenn Morris
0 siblings, 1 reply; 8+ messages in thread
From: Han Boetes @ 2013-10-31 13:41 UTC (permalink / raw)
To: 15769
I really don't know why the old version fails on a directory without any
non ascii chars but this patch fixes it. If this is acceptable for
everyone then please apply this patch.
diff --git a/configure.ac b/configure.ac
index 9263d39..87df628 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,7 +92,7 @@ for var in "`pwd`" "$temp_srcdir" "$prefix" "$exec_prefix" \
dnl configure sets LC_ALL=C early on, so this range should work.
case "$var" in
- *[[^\ -~]]*) AC_MSG_ERROR([Emacs cannot be built or installed in a directory whose name contains non-ASCII characters: $var]) ;;
+ *[[^\ ~-]]*) AC_MSG_ERROR([Emacs cannot be built or installed in a directory whose name contains non-ASCII characters: $var]) ;;
esac
done
# Han
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#15769: building on OpenBSD fails because of a shell pattern problem
2013-10-31 13:41 bug#15769: building on OpenBSD fails because of a shell pattern problem Han Boetes
@ 2013-10-31 17:27 ` Glenn Morris
2013-10-31 17:30 ` Glenn Morris
2013-10-31 18:06 ` Glenn Morris
0 siblings, 2 replies; 8+ messages in thread
From: Glenn Morris @ 2013-10-31 17:27 UTC (permalink / raw)
To: Han Boetes; +Cc: 15769
This will become irrelevant if http://debbugs.gnu.org/15260 gets fixed,
but in the meantime, please give details of:
exactly what version of OpenBSD this is
what shell /bin/sh is
and send the config.log as attachment
Han Boetes wrote:
> - *[[^\ -~]]*) AC_MSG_ERROR([Emacs cannot be built or installed in a directory whose name contains non-ASCII characters: $var]) ;;
> + *[[^\ ~-]]*) AC_MSG_ERROR([Emacs cannot be built or installed in a directory whose name contains non-ASCII characters: $var]) ;;
These are not the same thing.
[^\ -~] is supposed to match any character not in the range " " to "~",
which, under LC_ALL=C, should be the range of ASCII characters, AFAIK.
Maybe someone knows a better, portable way to test for non-ASCII?
I'd rather not do: [^a-zA-Z0-9...] if at all possible.
Yours, [^\ ~-], should match any character that is not " " , "~", or "-".
I have no idea how this can work for you...
Maybe "^" does not work as negation in your shell?
The autoconf manual does say that [^...] is not portable (apparently we
should use [!...] instead), but [^...] is extensively used elsewhere in
the Emacs build rules, and [!...] not at all.
Does it work for you if you use:
*[[!\ ~-]]*) AC_MSG_ERROR ...
?
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#15769: building on OpenBSD fails because of a shell pattern problem
2013-10-31 17:27 ` Glenn Morris
@ 2013-10-31 17:30 ` Glenn Morris
2013-10-31 21:11 ` Han Boetes
2013-10-31 18:06 ` Glenn Morris
1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2013-10-31 17:30 UTC (permalink / raw)
To: Han Boetes; +Cc: 15769
Glenn Morris wrote:
> Does it work for you if you use:
>
> *[[!\ ~-]]*) AC_MSG_ERROR ...
Argh, I meant to say
*[[!\ -~]]*) AC_MSG_ERROR ...
Ie, just swap "^" for "!".
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#15769: building on OpenBSD fails because of a shell pattern problem
2013-10-31 17:30 ` Glenn Morris
@ 2013-10-31 21:11 ` Han Boetes
2013-10-31 21:42 ` Glenn Morris
0 siblings, 1 reply; 8+ messages in thread
From: Han Boetes @ 2013-10-31 21:11 UTC (permalink / raw)
To: 15769
Glenn Morris wrote:
> Argh, I meant to say
>
> *[[!\ -~]]*) AC_MSG_ERROR ...
>
> Ie, just swap "^" for "!".
I just got a portability hint from Thorsten Glaser:
"mirabilos| in shell moet je ! ipv ^ gebruiken voor inverted match"
So yes indeed, we have to use ! and not ^ in the shell. :-)
# Han
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#15769: building on OpenBSD fails because of a shell pattern problem
2013-10-31 21:11 ` Han Boetes
@ 2013-10-31 21:42 ` Glenn Morris
2013-10-31 21:51 ` Han Boetes
0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2013-10-31 21:42 UTC (permalink / raw)
To: 15769-done
Version: 24.4
>> Ie, just swap "^" for "!".
Well, you live and learn. Bash and zsh allow either [^...] or [!...],
but ksh only the latter. I guess every other instance of [^...] in the
Emacs build rules must be in sed rather than the shell.
So I changed ^ for !, but the whole check is likely to get removed soon
anyway.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#15769: building on OpenBSD fails because of a shell pattern problem
2013-10-31 21:42 ` Glenn Morris
@ 2013-10-31 21:51 ` Han Boetes
0 siblings, 0 replies; 8+ messages in thread
From: Han Boetes @ 2013-10-31 21:51 UTC (permalink / raw)
To: Glenn Morris; +Cc: 15769-done
Glenn Morris wrote:
> Well, you live and learn. Bash and zsh allow either [^...] or [!...],
> but ksh only the latter. I guess every other instance of [^...] in the
> Emacs build rules must be in sed rather than the shell.
>
> So I changed ^ for !, but the whole check is likely to get removed soon
> anyway.
Incase you run debian I can recommend installing mksh and use it for
testing.
mksh is a clone of this ksh version. They both try to be as POSIX
compliant as possible. It's great for finding bashisms.
# Han
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#15769: building on OpenBSD fails because of a shell pattern problem
2013-10-31 17:27 ` Glenn Morris
2013-10-31 17:30 ` Glenn Morris
@ 2013-10-31 18:06 ` Glenn Morris
2013-10-31 20:51 ` Han Boetes
1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2013-10-31 18:06 UTC (permalink / raw)
To: Han Boetes; +Cc: 15769
Or maybe sed will work better than the shell?
*** configure.ac 2013-10-27 18:57:20 +0000
--- configure.ac 2013-10-31 18:02:36 +0000
***************
*** 91,99 ****
"$datarootdir" "$bindir" "$datadir" "$sharedstatedir" "$libexecdir"; do
dnl configure sets LC_ALL=C early on, so this range should work.
! case "$var" in
! *[[^\ -~]]*) AC_MSG_ERROR([Emacs cannot be built or installed in a directory whose name contains non-ASCII characters: $var]) ;;
! esac
done
--- 91,100 ----
"$datarootdir" "$bindir" "$datadir" "$sharedstatedir" "$libexecdir"; do
dnl configure sets LC_ALL=C early on, so this range should work.
! dnl This seems more portable than using a case statement with *[[^\ -~]]*)
! var=`echo "$var" | sed 's/[[ -~]]//g'`
!
! test -n "$var" && AC_MSG_ERROR([Emacs cannot be built or installed in a directory whose name contains non-ASCII characters: $var])
done
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-31 21:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31 13:41 bug#15769: building on OpenBSD fails because of a shell pattern problem Han Boetes
2013-10-31 17:27 ` Glenn Morris
2013-10-31 17:30 ` Glenn Morris
2013-10-31 21:11 ` Han Boetes
2013-10-31 21:42 ` Glenn Morris
2013-10-31 21:51 ` Han Boetes
2013-10-31 18:06 ` Glenn Morris
2013-10-31 20:51 ` Han Boetes
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).