Re: Question on compile test / automake version 1.9.6 / test yacc6.test

2006-11-27 Thread Ralf Wildenhues
Hello Dieter,

* Jurzitza, Dieter wrote on Wed, Nov 22, 2006 at 11:53:34AM CET:
 The point is:
 I cannot compile successfully (or, better to say, I cannot run
 yacc6.test successfully) if I am using
 
 make -j3
 
 The message that comes is foo.h and / or bar.h not found. The
 reason (I guess) is the fact that the parallel processing starts
 compiling the main.c file (out of yacc6.test) *before* the header
 files have been created.

Bingo! Thanks for the bug report.  The test is wrong: it should put the
headers into BUILT_SOURCES, as documented in
http://sources.redhat.com/automake/automake.html#Yacc-and-Lex.

Does the patch below fix the failure for you?  OK to apply?

Cheers,
Ralf

* tests/yacc6.test: Add the generated headers to `BUILT_SOURCES'
as documented in the manual.  Fixes parallel make failure.
Report by Dieter Jurzitza.
* THANKS: Update.

Index: THANKS
===
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.297
diff -u -r1.297 THANKS
--- THANKS  28 Oct 2006 09:51:57 -  1.297
+++ THANKS  27 Nov 2006 20:25:21 -
@@ -64,6 +64,7 @@
 Diab Jerius[EMAIL PROTECTED]
 Didier Cassirame   [EMAIL PROTECTED]
 Dieter Baron   [EMAIL PROTECTED]
+Dieter Jurzitza[EMAIL PROTECTED]
 Dmitry Mikhin  [EMAIL PROTECTED]
 Doug Evans [EMAIL PROTECTED]
 Duncan Gibson  [EMAIL PROTECTED]
Index: tests/yacc6.test
===
RCS file: /cvs/automake/automake/tests/yacc6.test,v
retrieving revision 1.12
diff -u -r1.12 yacc6.test
--- tests/yacc6.test6 Jun 2006 20:42:36 -   1.12
+++ tests/yacc6.test27 Nov 2006 20:25:21 -
@@ -57,6 +57,7 @@
 foo_SOURCES = foo.y main.c
 foo_CPPFLAGS = -DFOO
 bar_SOURCES = bar.y main.c
+BUILT_SOURCES = foo.h bar.h
 END
 
 cat  sub/foo.y  'END'




Re: Circular dependency

2006-11-27 Thread Guillaume Rousse
Ralf Wildenhues wrote:
 Hello Guillaume,
 
 * Guillaume Rousse wrote on Thu, Nov 23, 2006 at 04:46:50PM CET:
 I'm using this rule to substitute values in a sourcefile:
 corelib/camlimages.ml: Makefile corelib/camlimages.ml.in
 [...]
 
 As detailed in autoconf documentation
 http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html#SEC24
 
 FWIW, 2.57 is an old version, 2.61 is current.  The version to the
 current manual should be found here:
 http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables
 (We still have to update it, as it's showing 2.60.  But that's where the
 new one will end up as well, so please update your bookmarks.)
Done, thanks.

 However, make keep complaining about a circular dependency issue:
 make[1]: Circular corelib/camlimages.ml - Makefile dependency dropped.

 I guess it's because generated makefile has itself a rule triggering
 configure again, but I can't find where it's related to
 corelib/camlimages.ml, neither how to break the loop.
 
 You're providing too little information for me to be able to deduce the
 loop.  Can you post the whole Makefile.am (and whatever changes you made
 to Automake, if any)?
Here it is. I did no special modification tu automake.

#*#
# #
#  Caml Images#
# #
#François Pessaux, projet Cristal, INRIA Rocquencourt #
#Pierre Weis, projet Cristal, INRIA Rocquencourt  #
#Jun Furuse, projet Cristal, INRIA Rocquencourt   #
# #
#  Copyright 1999-2004,   #
#  Institut National de Recherche en Informatique et en Automatique.  #
#  Distributed only by permission.#
# #
#*#

#(* $Id: Makefile,v 1.84 2006/11/16 13:02:23 rousse Exp $ *)

#SUBDIRS = examples

ocamlsitelibdir = $(OCAMLLIB)/site-lib/camlimages
ocamlsitelib_DATA = camlimages.cma \
camlimages.cmxa \
camlimages.a \
libcamlimages.a \
$(OCAMLINTERFACES) \
META
ocamlstublibdir = $(OCAMLLIB)/stublibs
ocamlstublib_DATA = dllcamlimages.so

BUILT_SOURCES = corelib/camlimages.ml

COMPFLAGS   = -warn-error A
LINKFLAGS   =
LOCAL_COMPFLAGS = -I corelib -I graphics -I bmp -I ppm -I xvthumb
LOCAL_CFLAGS=

OCAMLSOURCES = corelib/camlimages.ml \
   corelib/mstring.ml \
   corelib/color.ml \
   corelib/region.ml \
   corelib/tmpfile.ml \
   corelib/bitmap.ml \
   corelib/genimage.ml \
   corelib/rgba32.ml \
   corelib/rgb24.ml \
   corelib/index8.ml \
   corelib/index16.ml \
   corelib/cmyk32.ml \
   corelib/images.ml \
   corelib/oColor.ml \
   corelib/oImages.ml \
   corelib/reduce.ml \
   corelib/geometry.ml \
   corelib/colorhist.ml \
   corelib/blend.ml \
   graphics/graphic_image.ml \
   graphics/oGraphic.ml \
   bmp/bmp.ml \
   bmp/oBmp.ml \
   ppm/ppm.ml \
   ppm/oPpm.ml \
   xvthumb/xvthumb.ml \
   xvthumb/oXvthumb.ml

OCAMLINTERFACES = corelib/mstring.mli \
  corelib/color.mli \
  corelib/region.mli \
  corelib/tmpfile.mli \
  corelib/bitmap.mli \
  corelib/genimage.mli \
  corelib/rgba32.mli \
  corelib/rgb24.mli \
  corelib/index8.mli \
  corelib/index16.mli \
  corelib/cmyk32.mli \
  corelib/images.mli \
  corelib/oColor.mli \
  corelib/oImages.mli \
  corelib/reduce.mli \
  corelib/blend.mli \
  graphics/graphic_image.mli \
  bmp/bmp.mli \
  ppm/ppm.mli \
  xvthumb/xvthumb.mli \
  xvthumb/oXvthumb.mli

CSOURCES = 

if HAVE_LABLGTK
OCAMLSOURCES += lablgtk/ximage.ml \
lablgtk/oXimage.ml
OCAMLINTERFACES += lablgtk/ximage.mli \
   lablgtk/oXimage.mli
LOCAL_COMPFLAGS += -I lablgtk -I $(LABLGTKDIR)
endif

if HAVE_LABLGTK2
OCAMLSOURCES += lablgtk2/ximage2.ml \
lablgtk2/oXimage2.ml
OCAMLINTERFACES += lablgtk2/ximage2.mli \
   lablgtk2/oXimage2.mli
LOCAL_COMPFLAGS += 

Re: managing ocaml dependencies

2006-11-27 Thread Guillaume Rousse
Guillaume Rousse wrote:
 For 1), the attached patch seems to be enough.
It seems to have been forgotten somewhere, here it is again.


--- /usr/share/automake-1.9/depcomp 2006-09-27 03:44:18.0 +0200
+++ depcomp 2006-11-21 13:57:48.0 +0100
@@ -508,6 +508,10 @@
   rm -f $tmpdepfile
   ;;
 
+ocamldep)
+  $@ $source  $depfile
+  ;;
+
 none)
   exec $@
   ;;


Re: Circular dependency

2006-11-27 Thread Stepan Kasal
Hello,

On Mon, Nov 27, 2006 at 05:10:46PM +0100, Guillaume Rousse wrote:
 Ralf Wildenhues wrote:
  * Guillaume Rousse wrote on Thu, Nov 23, 2006 at 04:46:50PM CET:
  However, make keep complaining about a circular dependency issue:
  make[1]: Circular corelib/camlimages.ml - Makefile dependency dropped.
 
  I guess it's because generated makefile has itself a rule triggering
  configure again, but I can't find where it's related to
  corelib/camlimages.ml, neither how to break the loop.
  
  You're providing too little information for me to be able to deduce the
  loop.  Can you post the whole Makefile.am (and whatever changes you made
  to Automake, if any)?
 Here it is. I did no special modification tu automake.

The circular dependency is this:

Makefile -- Makefile.in -- .depend -- corelib/camlimages.ml --
--  Makefile

Comments:
* Makefile.in -- .depend
This is because automake creates Makefile.in from Makefile.am and all
included files.  Your Makefile.am includes .depend.

* .depend -- corelib/camlimages.ml  via the $(OCAMLSOURCES)


You specified the dependency:

   corelib/camlimages.ml -- Makefile

This is not correct.  You should specify the ultimate primary sources
instead of `Makefile'.  Prehaps `Makefile.am' is enough?

I hope this hint helps you to find a fix.

Have a nice day,
Stepan Kasal




Re: Circular dependency

2006-11-27 Thread Ralf Wildenhues
Hello,

* Stepan Kasal wrote on Mon, Nov 27, 2006 at 07:56:20PM CET:

 * Makefile.in -- .depend
 This is because automake creates Makefile.in from Makefile.am and all
 included files.  Your Makefile.am includes .depend.

To rephrase this more to the point:
automake style 'include' is different than 'make' time 'include'.
The automake one happens at the time 'automake' is run, the included
file is literally put into Makefile.in.

If you are aiming at adding support for ocaml into the Automake package,
then you should use 'make' time 'include'.  The stuff that in the
Makefile.in file looks like this:
  @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED](DEPDIR)/[EMAIL PROTECTED]@

Sorry for all the weird quoting,
Ralf




Re: Question on compile test / automake version 1.9.6 / test yacc6.test

2006-11-27 Thread Ralf Wildenhues
Hello Dieter,

* Jurzitza, Dieter wrote on Wed, Nov 22, 2006 at 11:53:34AM CET:
 The point is:
 I cannot compile successfully (or, better to say, I cannot run
 yacc6.test successfully) if I am using
 
 make -j3
 
 The message that comes is foo.h and / or bar.h not found. The
 reason (I guess) is the fact that the parallel processing starts
 compiling the main.c file (out of yacc6.test) *before* the header
 files have been created.

Bingo! Thanks for the bug report.  The test is wrong: it should put the
headers into BUILT_SOURCES, as documented in
http://sources.redhat.com/automake/automake.html#Yacc-and-Lex.

Does the patch below fix the failure for you?  OK to apply?

Cheers,
Ralf

* tests/yacc6.test: Add the generated headers to `BUILT_SOURCES'
as documented in the manual.  Fixes parallel make failure.
Report by Dieter Jurzitza.
* THANKS: Update.

Index: THANKS
===
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.297
diff -u -r1.297 THANKS
--- THANKS  28 Oct 2006 09:51:57 -  1.297
+++ THANKS  27 Nov 2006 20:25:21 -
@@ -64,6 +64,7 @@
 Diab Jerius[EMAIL PROTECTED]
 Didier Cassirame   [EMAIL PROTECTED]
 Dieter Baron   [EMAIL PROTECTED]
+Dieter Jurzitza[EMAIL PROTECTED]
 Dmitry Mikhin  [EMAIL PROTECTED]
 Doug Evans [EMAIL PROTECTED]
 Duncan Gibson  [EMAIL PROTECTED]
Index: tests/yacc6.test
===
RCS file: /cvs/automake/automake/tests/yacc6.test,v
retrieving revision 1.12
diff -u -r1.12 yacc6.test
--- tests/yacc6.test6 Jun 2006 20:42:36 -   1.12
+++ tests/yacc6.test27 Nov 2006 20:25:21 -
@@ -57,6 +57,7 @@
 foo_SOURCES = foo.y main.c
 foo_CPPFLAGS = -DFOO
 bar_SOURCES = bar.y main.c
+BUILT_SOURCES = foo.h bar.h
 END
 
 cat  sub/foo.y  'END'