groff
[Top][All Lists]
Advanced

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

Re: [Groff] calling all automake'ers ...


From: Mike Bianchi
Subject: Re: [Groff] calling all automake'ers ...
Date: Sat, 18 Apr 2015 09:45:41 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Bertrand Garrigues wrote:
> What exactly is the problem with Solaris' `sed' and `diff'?

I don't know about sed.  Peter Bray says there is a problem with sed.
        Solaris sed(1) is not up to the task of showing deletions but GNU
        sed(1) is.

I know the current code uses  diff -Dname  option which is not universal.

(forgive the rant please)
And I don't have the interest nor time to figure those things out.
To my mind the answer is (from the Discussion) ...
        Until there is a /bin/posix_sh from Gnu, this is going to remain a
        mess.  M4sh illustrates that point, I claim.

        In my opinion, /bin/bash should be portable, a standard GNU offering,
        and therefore a reasonable requirement for shell scripts. 

Likewise, GNU groff insisting on GNU diff and GNU sed is a reasonable
requirement.

It is also my opinion that backward compatibility, while desirable and a virtue
is another way of say "all bugs and limitations are preserved."
(rant off)

The proposed solution is to aways reference GNU sed and diff, and the suspicion
is that is what autoconf and automake are all about.  Again, I have no
knowledge, let alone expertise, of those tools.

I could use help, iff the suspicion is true.
Otherwise, I'll just document the lack of universality and commit what I have.

                                                                Mike

On Sat, Apr 18, 2015 at 12:03:48AM +0200, Bertrand Garrigues wrote:
> Hi Mike,
> 
> On Thu, Apr 16 2015 at 08:23:21 PM, Mike Bianchi <address@hidden> wrote:
> > I've been dealing with updates to  contrib/gmkdiff  within groff, and there
> > is an issue that I could use some help with ...
> >
> > Over the years, the bash-isms of the original shell script have been 
> > removed,
> > but the basic algorithm depends of Gnu's  sed(1)  and  diff(1) .  As I
> > understand it, it _might_ be possible to have  autoconf/automake  apply the
> > appropriate changes to the script to use the appropriate version of those
> > commands when it shows up on non-Gnu environments.  Solaris is the 
> > problematic
> > OS of the moment, but my head swims when I ponder  Makefile.am ,  
> > Makefile.in ,
> > etc.
> >
> >     Is there any  autoconf/automake  guru out there
> >     willing to help me get this right?
> >
> > Discussion can be found at
> >       http://savannah.gnu.org/bugs/?44768
> 
> I've just read the discussion but I'm not sure to understand: do you
> absolutely need the GNU's variant of `sed' and `diff' programs or do you
> have a possible substitute for `sed' and `diff' (for example using
> Solaris' `sed' and `diff' with different options) ? What exactly is the
> problem with Solaris' `sed' and `diff'? Currently, how do you make work
> the gdiffmk script on your system, you use -x and -s option with GNU
> programs or something else?
> 
> Werner has already given some explanations on how solve this problem:
> 
> "1. In configure.ac (or in m4/groff.m4) a test for the `diff' program
>    is needed, probably using AC_CHECK_PROGS; autoconf doesn't provide
>    something in advance – note that the `configure' script itself
>    already needs the `diff' program, but it doesn't provide a macro;
>    it simply assumes that it is available in the path.  `sed' is
>    covered by AC_PROG_SED.
> 
> 2. In gdiffmk.sh, use @SED@ and @DIFF@ (or whatever symbols are
>    actually used in configure.ac) instead of `sed' and `diff'.
> 
> 3. In the sub-makefile `contrib/gdiffmk/gdiffmk.am' you have to extend
>    the `gdiffmk' rule to substitute @SED@ and @DIFF@ with its real
>    values."
> 
> The only thing is that AC_PROG_SED, according to autoconf's
> documentation, "Set output variable SED to a Sed implementation that
> conforms to Posix and does not have arbitrary length limits. Report an
> error if no acceptable Sed is found".  If Solaris's `sed' complies to
> that configure will be happy to use it.  So we might need to write macro
> that tests the system's `sed' (provoking the problem you see in gdiffmk
> on your system) and then make the appropriate substitution.
> 
> Could you please describe what are the problematic `diff' and `sed'
> commands on your system?
> 
> Regards,
> 
> --
> Bertrand Garrigues

-- 
 Mike Bianchi
 Foveal Systems

 973 822-2085

 address@hidden
 http://www.AutoAuditorium.com
 http://www.FovealMounts.com



reply via email to

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