bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep make Solaris 2.8 glitch


From: Pascal Bourguignon
Subject: Re: GNUstep make Solaris 2.8 glitch
Date: Fri, 28 Jun 2002 01:21:24 +0200 (CEST)

> From: Chris B.Vetter <chrisv@web4inc.com>
> Date: Thu, 27 Jun 2002 11:06:41 -0700
> 
> On Thu, 27 Jun 2002 19:25:28 +0200
> Marcus Müller <znek@mulle-kybernetik.com> wrote:
> > > Both, actually, if not quite up-to-date... (haven't tested Sol9 yet)
> > Same here (Sol 8).
> 
> That's what I'm using ;-)
> 
> > >> Objections anyone ? Is such an approach going to make someone unhappy ?
> > > Certainly not me.
> > Nope. But what exactly would you replace #!/bin/sh in the GNUstep 
> > scripts with? A current FreeBSD still ships with:
> 
> No need, if you use zsh. Using 'emulate csh' you could use zsh to,
> well, emulate csh behaviour (see 'man zshall').
> 
> I don't think it's possible to write one script that can be interpreted
> by every shell variant, but since /bin/sh exist on every system...

Yes, it's easy enough. For example  the following file can be run by a
C compiler or interpreter, a  Fortran compiler or interpreter, or a sh
or csh interterpreter.

----------(happy.source)-----------------
cat /*dev/null; echo "Happy New Year"\!
cat <<c*/ /*dev/null | cat > /dev/null
c */ () {} /*
c */ main() { cat(); printf("Happy New Year!\n"); } /*
17      format('Happy New Year!')
        write (6,17)
        stop
        end
c*/
-----------(Makefile)-------------------
all: happy-c happy-f happy-sh happy-csh
        @ echo -n '(C)      '
        @ ./happy-c || true
        @ echo -n '(FORTRAN)      '
        @ ./happy-f
        @ echo -n '(Bourne Shell) '
        @ sh ./happy-sh
        @ echo -n '(C Shell)      '
        @ csh ./happy-csh
    
happy-c:happy.source Makefile
        @ cp happy.source happy-c.c
        @ gcc -o happy-c happy-c.c

happy-f:happy.source Makefile
        @ cp happy.source happy-f.f
        @ f77 -o happy-f  happy-f.f 2> /dev/null

happy-sh:happy.source Makefile
        @ cp happy.source happy-sh
        @ chmod 755 happy-sh

happy-csh:happy.source Makefile
        @ cp happy.source happy-csh
        @ chmod 755 happy-csh

clean:
        -rm -f *.o *~ happy-csh happy-sh happy-f happy-f.f happy-c happy-c.c
----------------------------------------




> The problem would be to find a common denominator, since some
> systems link /bin/sh to /bin/bash, others to /bin/csh or /bin/ksh.
> 
> Come to think of, osh(1) probably is the 'purest' shell, implementing
> just the standard commands of UNIX up to edition 7.
> See
>   http://omnibus.ruf.uni-freiburg.de/~gritter/man/osh.html
> 
> -- 
> Chris
 


-- 
__Pascal_Bourguignon__                   http://www.informatimago.com/
----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]