Re: [Solaris bindist] ANNOUNCE: GHC 7.8.1 Release Candidate 1

2014-02-13 Thread Christian Maeder

Am 06.02.2014 15:27, schrieb Páli Gábor János:

On Thu, Feb 6, 2014 at 1:39 PM, Merijn Verstraaten
mer...@inconsistent.nl wrote:


On Feb 6, 2014, at 10:33 , Christian Maeder wrote:

or (as I've seen elsewhere) better (?)

#!/usr/bin/env bash


Definitely use this, FreeBSD (for example) does not ship with bash so /bin/bash 
will *not* exist.


Please, do not introduce dependency on bash unless it is really necessary.


In fact ./configure detects /bin/bash as SHELL under Solaris, so this 
setting could be used (instead of hard coding bin/sh)!


(Under FreeBSD a proper other SHELL might be found by ./configure.)

Many configure files of libraries also set SHELL this way.

Yet, for this ghc-pwd-bindist script it is easier to make the script 
(Bourne) /bin/sh compatible. Yet, I have not found out, how this script 
is created!


utils/ghc-pwd/ghc.mk contains
utils/ghc-pwd_dist-install_WANT_BINDIST_WRAPPER = YES
but then I'm lost what build-prog does from rules/build-prog.mk.

Maybe somehow the code in
libraries/Cabal/Cabal/Distribution/Simple/Program/Script.hs is called, 
then the second line should be changed from:


setEnv (var, Nothing)  = [unset  ++ var, export  ++ var]
setEnv (var, Just val) = [export  ++ var ++ = ++ quote val]
to:
setEnv (var, Nothing)  = [unset  ++ var, export  ++ var]
setEnv (var, Just val) = [var ++ = ++ quote val, export  ++ var]

I guess that is still POSIX compliant.

Cheers Christian

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Solaris bindist] ANNOUNCE: GHC 7.8.1 Release Candidate 1

2014-02-06 Thread Merijn Verstraaten

On Feb 6, 2014, at 10:33 , Christian Maeder wrote:
 or (as I've seen elsewhere) better (?)
 
 #!/usr/bin/env bash

Definitely use this, FreeBSD (for example) does not ship with bash so /bin/bash 
will *not* exist.

Cheers,
Merijn


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Solaris bindist] ANNOUNCE: GHC 7.8.1 Release Candidate 1

2014-02-06 Thread Páli Gábor János
On Thu, Feb 6, 2014 at 1:39 PM, Merijn Verstraaten
mer...@inconsistent.nl wrote:

 On Feb 6, 2014, at 10:33 , Christian Maeder wrote:
 or (as I've seen elsewhere) better (?)

 #!/usr/bin/env bash

 Definitely use this, FreeBSD (for example) does not ship with bash so 
 /bin/bash will *not* exist.

Please, do not introduce dependency on bash unless it is really necessary.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users