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

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

Re: CVS gettext: many test failures


From: Ralf Wildenhues
Subject: Re: CVS gettext: many test failures
Date: Wed, 20 Dec 2006 00:17:10 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* Bruno Haible wrote on Tue, Dec 19, 2006 at 06:29:44PM CET:
> 
> That's clear, thanks. The reason is thus that some source files which do
>   #include "po-gram-gen.h"
> got the one in the source dir, wherease the compilation of
> po-gram-gen.c used the results of the Bison invocation on 2006-12-16 18:42:42.
> 
> po-gram-gen2.h is not the problem, since it occurs only once. The problem is
> with po-gram-gen.h and po-gram-gen.c. gettext-tools/src/Makefile.am relies
> on automake to DTRT, but it DTWT: it creates the new files in the build
> directory. I know the reason why: if a source distribution is installed in a
> read-only location, the build in a VPATH should not touch any file in the
> source directory.

That's not what I'd say.  You can only expect compiling from a read-only
location to work right if that read-only location happens to contain up
to date files.  If a bison input file is updated there, then one can
rightly expect other files to need updated there as well.

> Say the automake theorists.

I'm sure you can back up this claim by some citation?

> The result are inconsistent compiles, as you see.

I'm not trying to say that there isn't an Automake bug, but it uses an
inference rule for .y.c, and the VPATH target lookup rules of GNU make
(and other make implementations) are simply not simple:
<http://www.gnu.org/software/autoconf/manual/html_node/Make-Target-Lookup.html>

> Are you are going to report this to the automake people?

Not quite.  How about this patch to force updates in srcdir?
(Some BSD make cannot infer that file and $(srcdir)/file are
the same target with VPATH = $(srcdir).)

Cheers,
Ralf

gettext-tools/src/ChangeLog:
2006-12-20  Ralf Wildenhues  <address@hidden>

        * Makefile.am: Prefix all of po-gram-gen.h, po-gram-gen2.h,
        po-gram-gen.y, and po-gram-gen.c with $(srcdir) to force updates
        in the source tree and at the same time not confuse BSD make.

Index: gettext-tools/src/Makefile.am
===================================================================
RCS file: /cvsroot/gettext/gettext/gettext-tools/src/Makefile.am,v
retrieving revision 1.79
diff -u -r1.79 Makefile.am
--- gettext-tools/src/Makefile.am       15 Dec 2006 12:57:56 -0000      1.79
+++ gettext-tools/src/Makefile.am       19 Dec 2006 23:12:20 -0000
@@ -39,7 +39,7 @@
 read-po.h read-properties.h read-stringtable.h \
 str-list.h \
 color.h write-catalog.h write-po.h write-properties.h write-stringtable.h \
-dir-list.h file-list.h po-gram-gen.h po-gram-gen2.h \
+dir-list.h file-list.h $(srcdir)/po-gram-gen.h $(srcdir)/po-gram-gen2.h \
 msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-cat.h \
 msgl-english.h msgl-check.h msgl-fsearch.h msgfmt.h msgunfmt.h \
 plural-count.h plural-eval.h \
@@ -99,7 +99,7 @@
 # (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> po-charset.c.
 # (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> message.c -> 
str-list.c.
 COMMON_SOURCE = message.c po-error.c po-xerror.c \
-read-catalog-abstract.c po-lex.c po-gram-gen.y po-charset.c \
+read-catalog-abstract.c po-lex.c $(srcdir)/po-gram-gen.y po-charset.c \
 read-po.c read-properties.c read-stringtable.c open-catalog.c \
 dir-list.c str-list.c
 
@@ -392,10 +392,10 @@
 # Special rules for bison and flex generated files.
 
 BUILT_SOURCES = \
-  po-gram-gen.c po-gram-gen.h po-gram-gen2.h
+  $(srcdir)/po-gram-gen.c $(srcdir)/po-gram-gen.h $(srcdir)/po-gram-gen2.h
 
-po-lex.o po-lex.lo: po-gram-gen2.h
-po-gram-gen2.h: po-gram-gen.h
+po-lex.o po-lex.lo: $(srcdir)/po-gram-gen2.h
+$(srcdir)/po-gram-gen2.h: $(srcdir)/po-gram-gen.h
        $(SED) -e 's/yy/po_gram_/g' -e 's/extern /extern DLL_VARIABLE /' 
$(srcdir)/po-gram-gen.h > address@hidden
        mv address@hidden $@
 




reply via email to

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