groff
[Top][All Lists]
Advanced

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

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


From: Bertrand Garrigues
Subject: Re: [Groff] calling all automake'ers ...
Date: Sat, 18 Apr 2015 00:03:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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



reply via email to

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