caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Intelligent handling of dependencies in complex ocaml projects
@ 2004-04-14 12:30 Cezary Kaliszyk
  2004-04-14 12:56 ` David MENTRE
  2004-04-14 15:18 ` Richard Jones
  0 siblings, 2 replies; 5+ messages in thread
From: Cezary Kaliszyk @ 2004-04-14 12:30 UTC (permalink / raw)
  To: caml-list

Hello,

We are developing a complex ocaml project with several modules contained
in different subdirectiories.

Compilation of some some executables in some directories depends on
libraries compiled in other subdirectories.

We'd like to be able to automatically generate cross-directory
dependencies in format expected by Make. 

Ocamldep is insufficient becouse it requires providing all
source files (from all directories) in command line.

Different subprojects depend on different external libraries. These 
libraries may require different linkingflags. Some of them are
contradictory. So I can't call ocamldep like 
  ocamldep `find . -name "*.ml"`
because it requires all those flags together.

Is there any utility which allows doin it automatiacly?

-- 
Cezary Kaliszyk

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Intelligent handling of dependencies in complex ocaml projects
  2004-04-14 12:30 [Caml-list] Intelligent handling of dependencies in complex ocaml projects Cezary Kaliszyk
@ 2004-04-14 12:56 ` David MENTRE
  2004-04-14 15:18 ` Richard Jones
  1 sibling, 0 replies; 5+ messages in thread
From: David MENTRE @ 2004-04-14 12:56 UTC (permalink / raw)
  To: Cezary Kaliszyk; +Cc: caml-list

Hello Cezary,

Cezary Kaliszyk <cek@zodiac.mimuw.edu.pl> writes:

> Ocamldep is insufficient becouse it requires providing all
> source files (from all directories) in command line.
>
> Different subprojects depend on different external libraries. These 
> libraries may require different linkingflags. Some of them are
> contradictory. So I can't call ocamldep like 
>   ocamldep `find . -name "*.ml"`
> because it requires all those flags together.

Have you considered calling several times ocamldep (from your root
directory), each time with the specific options, and then using the
"-include" directive of make to import them in the main Makefile?

I'm using a similar approach to generate dependencies in two successive
phases.

I hope it helps,
Yours,
david
-- 
 David Mentré <dmentre@linux-france.org>

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Intelligent handling of dependencies in complex ocaml projects
  2004-04-14 12:30 [Caml-list] Intelligent handling of dependencies in complex ocaml projects Cezary Kaliszyk
  2004-04-14 12:56 ` David MENTRE
@ 2004-04-14 15:18 ` Richard Jones
  2004-04-14 15:36   ` Kenneth Knowles
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Jones @ 2004-04-14 15:18 UTC (permalink / raw)
  Cc: caml-list

Have you considered using a single non-recursive Makefile?  Then you
can use ocamldep and a single .depend file to store the built
dependencies, and you can also be sure that your builds will be
correct.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
If I have not seen as far as others, it is because I have been
standing in the footprints of giants.  -- from Usenet

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Intelligent handling of dependencies in complex ocaml projects
  2004-04-14 15:18 ` Richard Jones
@ 2004-04-14 15:36   ` Kenneth Knowles
  2004-04-15  7:46     ` David MENTRE
  0 siblings, 1 reply; 5+ messages in thread
From: Kenneth Knowles @ 2004-04-14 15:36 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list


I was thinking the same thing.
http://www.canb.auug.org.au/~millerp/rmch/recu-make-cons-harm.html

On Wed, Apr 14, 2004 at 04:18:53PM +0100, Richard Jones wrote:
> Have you considered using a single non-recursive Makefile?  Then you
> can use ocamldep and a single .depend file to store the built
> dependencies, and you can also be sure that your builds will be
> correct.
> 
> Rich.
> 
> -- 
> Richard Jones. http://www.annexia.org/ http://www.j-london.com/
> Merjis Ltd. http://www.merjis.com/ - improving website return on investment
> If I have not seen as far as others, it is because I have been
> standing in the footprints of giants.  -- from Usenet
> 
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] Intelligent handling of dependencies in complex ocaml projects
  2004-04-14 15:36   ` Kenneth Knowles
@ 2004-04-15  7:46     ` David MENTRE
  0 siblings, 0 replies; 5+ messages in thread
From: David MENTRE @ 2004-04-15  7:46 UTC (permalink / raw)
  To: Kenneth Knowles; +Cc: Richard Jones, caml-list

Kenneth Knowles <kknowles@berkeley.edu> writes:

> I was thinking the same thing.
> http://www.canb.auug.org.au/~millerp/rmch/recu-make-cons-harm.html
>
> On Wed, Apr 14, 2004 at 04:18:53PM +0100, Richard Jones wrote:
>> Have you considered using a single non-recursive Makefile?  Then you
>> can use ocamldep and a single .depend file to store the built
>> dependencies, and you can also be sure that your builds will be
>> correct.

Richard and Kenneth, are you refering to my post or Cezary's one?

In my specific case, I completely agree with Miller's point of view. The
only issue is that I'm using ocamldep to compile Gerd's ocamlrpcgen to
generate new ocaml source files to then reuse ocamldep to finally
compile my program. I cannot do that without two successive make
includes. That's said (1) I would much prefer a simpler solution and (2)
my Makefile is still a monolithic Makefile as per Miller suggestion.

Now, regarding Cezary issues, I though his main issue was that ocamldep
options where incompatible for different sub-directories. But maybe
ocamldep does not need that much options.

Yours,
d.
-- 
 David Mentré <dmentre@linux-france.org>

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-15  7:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-14 12:30 [Caml-list] Intelligent handling of dependencies in complex ocaml projects Cezary Kaliszyk
2004-04-14 12:56 ` David MENTRE
2004-04-14 15:18 ` Richard Jones
2004-04-14 15:36   ` Kenneth Knowles
2004-04-15  7:46     ` David MENTRE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).