git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: ./configure script prototype

From
Linus Torvalds <torvalds@osdl.org>
Date
Nov 14, 2005, 18:39 UTC
Message-ID
<Pine.LNX.4.64.0511141027380.3263@g5.osdl.org>
In-Reply-To
<20051114181958.GD20749@ca-server1.us.oracle.com>
On Mon, 14 Nov 2005, Joel Becker wrote:
Show 7 quoted lines
> On Mon, Nov 14, 2005 at 02:29:56PM +0100, Petr Baudis wrote:
> > Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
> > where Andreas Ericsson <ae@op5.se> said that...
> > > 		--prefix=*)
> > > 			prefix=${1##*=}
> 
> 	${i# and ${i% are POSIX, iirc.
They may be in POSIX, but they sure as h*ll aren't portable.

There's a _lot_ of machines out there that don't do POSIX, just because those "newfangled" things are so complicated.

Also, even in POSIX, there's tons of different substandards, and you might follow one but not the other.

Finally, even if somebody is certified, they can very well be certified with "exceptions", so if they claim POSIX it doesn't necessarily mean that they follow all of it.

If you want to do a "configure" script (and I'm not sure it's worth it), you should cater to the lowest common denominator for it to be meaningful. What the hell that would be, I have no idea, since if you ever want to run on native Windows, it won't even be traditional shell. But traditional shell is at least a lot closer to that lowest common denominator than POSIX shell is.

That said, most of those ${var...} sequences definitely _are_ very traditional, and for all I know, ## may be too.

			Linus
Previous: Joel BeckerNext: Joel Becker
Message 10 of 13 in “./configure script prototype”
  1. Andreas EricssonNov 14, 2005
  2. Andreas EricssonNov 14, 2005
  3. Petr BaudisNov 14, 2005
  4. Andreas EricssonNov 14, 2005
  5. Chris WedgwoodNov 14, 2005
  6. Andreas EricssonNov 14, 2005
  7. Chris WedgwoodNov 14, 2005
  8. Fernando J. PeredaNov 14, 2005
  9. Joel BeckerNov 14, 2005
  10. Linus TorvaldsNov 14, 2005
  11. Joel BeckerNov 14, 2005
  12. Andreas EricssonNov 14, 2005
  13. Junio C HamanoNov 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.