autoconf
[Top][All Lists]
Advanced

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

Re: Broken makefile given Autoconf version mismatch


From: Stepan Kasal
Subject: Re: Broken makefile given Autoconf version mismatch
Date: Wed, 12 Apr 2006 21:47:36 +0200
User-agent: Mutt/1.4.1i

Hello,

On Wed, Apr 12, 2006 at 08:45:04PM +0200, Ralf Wildenhues wrote:
> here's a patch that I think does more or less what Bruno's patch
> intends to do, against current CVS.

I worked on the same issue.  We both use the same pattern
        `sed -n '/@datadir@/p;/@docdir@/p;/@infodir@/p...' ...`

We both decided not to touch the normal AC_SUBST's for these variables.
For the sake of Automake < 1.10, which traces AC_SUBST, these calls
cannotbe removed.  And it would be tricky to remove them from
_AC_SUBST_VARS, so it's best to leave the redundant substitutions
in the main sed scripts.

But this means that

> +  ac_datadir='$datadir'
> +  ac_docdir='$docdir'
...

is not necessary; we can just omit the whole part of the sed program.

Another idea: there is no need to expand ${datarootdir} in the
variables' values; it can be done by the very same sed program:

  s&@datadir@&${datarootdir}&g
  s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
  s&@infodir@&${datarootdir}/info&g
  s&@localedir@&${datarootdir}/locale&g
  s&@mandir@&${datarootdir}/man&g

  s&\${datarootdir}&${prefix}/share&g

(Remember we know the templates cannot contain ${datarootdir}.
And the probablity that this string would be created as a concatenation
from something in the template and something from @datadir@, @docdir@,
and such is very low.)

BTW: if someone does
  AC_SUBST([mydatadir], [$datadir/my])
then our hack won't help him.  But:
1) It would be too dangerous to add
     s&\${datarootdir}&${prefix}/share&g
   after all other substitutions.
2) He is guilty, he should have written
     AC_SUBST([mydatadir], ['${datadir}/my'])
3) And I hope this is not done so often.

Attached please find the consolidated version of the patch.
[CCing to autoconf-patches, too.]

Have a nice day,
        Stepan Kasal

Attachment: autoconf-20060412-datarootdir.patch
Description: Text document


reply via email to

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