groff
[Top][All Lists]
Advanced

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

Re: [Groff] CVS Build Problem


From: Keith MARSHALL
Subject: Re: [Groff] CVS Build Problem
Date: Tue, 3 May 2005 17:00:52 +0100

Larry Jones wrote, quoting me:
>> Really?  I didn't know that, sorry.  I used `type' to check that all of 
the
>> necessary prerequisite programs are installed, because I understood 
that it
>> *was* standard in Bourne shell; I've never come across one that didn't 
have
>> it, but my experience has been exclusively with System V, (since SVR2), 
and
>> more recently with GNU/Linux.
> 
> To my knowledge, it has *never* been in the Bourne shell, it is the Korn
> shell's (ksh) answer to the C shell's "which" command.  On SysV, it is
> fairly common to have sh be a link to ksh rather than being the real
> Bourne shell (that's how David Korn "proved" that ksh was completely
> upward compatible with sh -- he replaced sh with ksh on many of AT&T's
> systems and no one noticed), which is probably the source of your
> confusion.

Well, I'm sorry to dispute this, but that has not been my experience.  My
first exposure to UNIX was with VentureCom's VENIX implementation, back in
1989.  That was essentially a SVR2 implementation, and didn't have a Korn
shell -- just a basic Bourne shell, which *did* have `type' as a builtin.
I've subsequently replaced that system with a SPARC running SunOS 5.5.1 --
this has both Bourne and Korn shells, both of which are unique ELF
binaries, (/bin/sh is 89512 bytes, /bin/ksh is 180932 bytes), and *both*
have `type' as a builtin, as they *should* have, because, according to the
Waite Group's "UNIX System V Bible", it became standard in System V Bourne
shell, as of SVR2.  No, any confusion on my part is most likely due to a
complete absence of experience of BSD systems, which I understand do lack
some features taken for granted in System V :-(

> The current more-or-less definitive specification of the shell command
> language is that specified by the Single UNIX Specification/POSIX:

Thanks for the links [snipped], Larry.  I'll take a look, when I have 
time.

>> 3) For each test currently implemented using `type', reproduce the 
program
>>    file location strategy used by Autoconf; this is likely to result in 
the
>>    most portable solution, but is rather long winded.
>> 
>> 4) Implement `type' as a shell function, based on the Autoconf 
strategy,
>>    within `pdfroff.sh'; this would appear to be the most attractive 
option,
>>    *but* the Autoconf documentation says not to use shell functions.
>
> I agree with your analysis.  For what it's worth, CVS (which is also GNU
> software and widely portable) has the same problem in its test suite
> (although not in the core product) and uses a shell function to solve
> it.  In fact, the test suite makes extensive use of shell functions.  So
> I suggest going with 4: it's inifinitely better than using "type" and it
> seems to be "portable enough".

And thanks again, for this.  Unless there are any objections from others,
I'll investigate a solution based on option 4.

Best regards,
Keith.




reply via email to

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