bug-gnu-utils
[Top][All Lists]
Advanced

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

Bug in gettextize or related components


From: fmouse
Subject: Bug in gettextize or related components
Date: Tue, 16 Mar 2004 11:20:17 -0600
User-agent: Mutt/1.5.6i

I'm running into a bit of a problem with anjuta which looks as if it has its
genesis in gettextize.  I can't trace down the precise source of the problem
code, but perhaps someone more familiar with the (very complex!) structure
of the m4/automake/autoconf files and structures can do so.  Here's the
bottom line.

In a project autogenerated with anjuta, the directory <project root>/po
contains the following in Makefile.in.in, installed by gettextize:

  # These two variables depend on the location of this directory.
  subdir = po
  top_builddir = ..
  
  SHELL = /bin/sh
  @SET_MAKE@
  
  srcdir = @srcdir@
  top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  
  prefix = @prefix@
  exec_prefix = @exec_prefix@
  datadir = @datadir@
  localedir = $(datadir)/locale
  gettextsrcdir = $(datadir)/gettext/po
  
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  MKINSTALLDIRS = @MKINSTALLDIRS@
  mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo 
"$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`

After running ./configure, Makefile.in contains the following:

  # These two variables depend on the location of this directory.
  subdir = po
  top_builddir = ..
  
  SHELL = /bin/sh
  
  
  srcdir = .
  top_srcdir = ..
  
  
  prefix = /usr/local
  exec_prefix = ${prefix}
  datadir = ${prefix}/share
  localedir = $(datadir)/locale
  gettextsrcdir = $(datadir)/gettext/po
  
  INSTALL = /bin/install -c
  INSTALL_DATA = ${INSTALL} -m 644
  MKINSTALLDIRS = $(top_builddir)/./mkinstalldirs
  mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo 
"$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`

There's a logic error in the last line which trips up a make install.  The
shell case falls through to the default, since top_builddir is a relative
reference ("..") to the parent directory.  The value of mkinstalldirs is
therefore set by the code to 

  $(top_builddir)/$(MKINSTALLDIRS)

which substitutes out to

  $(top_builddir)/$(top_builddir)/./mkinstalldirs

or, resolving it fully,

  ../.././mkinstalldirs"  

This references a file two levels down in the directory tree, rather than
(the correct) one level down, which throws an error and causes a make abort.

If I'm using an absolute path for srcdir the problem goes away since the
shell case doesn't fall through to the default.

I don't know where this comes from.  I'm just beginning to learn how this
stuff works.  It's all layered deeper than a West Texas stockyard!  I spent
a couple of hours trying to locate the source of the probelm code, which
doesn't appear to be in any of the versions of Makefile.in.in on this system
(gentoo Linux).  All copies of Makefile.in.in which I could find explicitly
declared 'mkinstalldirs = $(MKINSTALLDIRS)', which works, and I can fix the
problem in a build by manually making this substitution.

It may (or may not) be worth noting that the shell case line which appears
to cause the problem is in the context referenced in the file
/usr/share/intltool/intltool-po-Makefile.in.in-patch-5, part of the gentoo
intltool v0.30 build, and apparently untouched by gentoo.  This isn't a
patched line, but only part of the identifying context in a unified output
diff, so it's apparently identifying a line already present, although I'll
be damned if I can find where it comes from.

-- 
Lindsay Haisley       | "Everything works    |     PGP public key
FMP Computer Services |       if you let it" |      available at
512-259-1190          |    (The Roadie)      | <http://www.fmp.com/pubkeys>
http://www.fmp.com    |                      |




reply via email to

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