public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: John Dallaway <john@dallaway.org.uk>
To: Jonathan Larmour <jifl@eCosCentric.com>, Gary Thomas <gary@mlbassoc.com>
Cc: ecos-devel@ecos.sourceware.org
Subject: Re: #! magic for finding Cygwin Tcl shell
Date: Wed, 07 Jan 2009 09:44:00 -0000	[thread overview]
Message-ID: <49647969.5060206@dallaway.org.uk> (raw)
In-Reply-To: <4963B47A.8040400@eCosCentric.com>

Jonathan Larmour wrote:

> Gary Thomas wrote:
>> Jonathan Larmour wrote:
>>> John Dallaway wrote:
>>>> Rather than increase the complexity of the #! magic still further, I
>>>> think it now makes sense to revert to a simple "#! /usr/bin/tclsh"
>>>> within our Tcl scripts. However, this would break compatibility with old
>>>> Cygwin installations providing only tclsh8*.exe or cygtclsh80.exe.
>>>>
>>>> Any objections?
>>> Yes, it may not be in /usr/bin. I don't mind the cygwin-specific cygpath
>>> bits being dropped, but I'd still want it to be found from the PATH by some
>>> means.
>> Does CygWin have '/usr/bin/env'?  This is the "modern" way
>> to handle this:
>>
>>  #! /usr/bin/env tclsh
>>  ...
> 
> I'd forgotten about that because I'm a bit wary of it in general as you
> can't pass arguments to it, e.g. this doesn't work as you'd expect:
> #! /usr/bin/env echo "$@"
> 
> But that problem probably doesn't apply to most if not all our cases - the
> arguments are passed as-is, so yes this should probably work.

"#! /usr/bin/env tclsh" will work for modern Cygwin, but are we able to
guarantee the availability and location of "env" any more than that of
"tclsh" for some arbitrary UNIX-like OS?

There has been no objection to dropping support for tclsh83 and
cygtclsh80 so, for the time being, I will take the robust and minimally
invasive approach of tweaking the CDL make rule to call "tclsh
heapgen.tcl ..." directly. Clearly we don't need the convenience of #!
magic in this particular context.

John Dallaway

  reply	other threads:[~2009-01-07  9:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-06 18:02 John Dallaway
2009-01-06 18:51 ` Jonathan Larmour
2009-01-06 19:10   ` Gary Thomas
2009-01-06 19:44     ` Jonathan Larmour
2009-01-07  9:44       ` John Dallaway [this message]
2009-01-07 13:39         ` Jonathan Larmour
2009-01-07 17:06           ` John Dallaway
2009-01-06 19:13   ` John Dallaway
2009-01-06 19:37     ` Jonathan Larmour
2009-01-06 20:04       ` Sergei Gavrikov
2009-01-06 20:01 ` Bart Veer
2009-01-07 11:10 ` Tarmo Kuuse
2009-01-07 11:53   ` Gary Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49647969.5060206@dallaway.org.uk \
    --to=john@dallaway.org.uk \
    --cc=ecos-devel@ecos.sourceware.org \
    --cc=gary@mlbassoc.com \
    --cc=jifl@eCosCentric.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).