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

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

Re: gettext-0.12.1 msgfmt (built with bison 1.875) cannot read .po files


From: Bruno Haible
Subject: Re: gettext-0.12.1 msgfmt (built with bison 1.875) cannot read .po files
Date: Mon, 15 Sep 2003 21:54:59 +0200
User-agent: KMail/1.5

Alexander Dupuy wrote:
> The problem is that I am using a subdirectory build (implicit
> --srcdir=..), so the generated po-gram-gen.h and po-gram-gen2.h end up
> in ./$ARCH/gettext-tools/src/ but the only file that includes it is in
> the source directory:
> ./gettext-tools/src/po-lex.c:49:#include "po-gram-gen2.h"
> ...
> actually puts the directory (.) where the generated po-gram-gen2.h
> exists pretty early in the include search path, but because the file is
> included with #include "" rather than #include <>, the directory
> containing the po-lex.c file is searched *before* the -I directories.

OK, that explains it.

> I suppose that changing line 49 of po-lex.c to use <> instead of "" for
> the po-gram-gen2.h include would fix this problem

Yes it would, but I won't apply this fix because it is a custom idiom
to use #include <> for system headers and #include "" for headers provided
by the package. Breaking this idiom would confuse many people.

The real problem is the existence of two copies of the generated file,
and this comes from the use of a VPATH build on a source tree that was
not generated with "make dist". This is generally unwise; besides the
problem you noticed it can also lead to the following symptoms:

  - If you remove the info files from the doc/ directory of the source,
    then do "make" in a VPATH build, then it will generate the .info
    file in the build directory's doc/ subdir, and "make distclean"
    will not remove it.

  - "make distcheck" can fail if the source package is on a read-only
    filesystem.

In summary: Use VPATH only for distributed tarballs that were made with
"make dist".

Bruno





reply via email to

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