Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Damien <Damien.Pous@ens-lyon.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Ocamldep too "gentle".
Date: Tue, 2 Dec 2003 18:57:01 +0100	[thread overview]
Message-ID: <20031202185701.4f91c49a.Damien.Pous@ens-lyon.fr> (raw)
In-Reply-To: <87y8tvxg9p.dlv@wanadoo.fr>

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

On Tue, 02 Dec 2003 18:48:18 +0100 Remi Vanicat wrote:

> You could try to look at what the OcamlMakefile do for ocamllex and
> ocamlyacc generated ml file.

I had the same problem with packages (-pack), 
but since there is no source file at all, one cannot do something like
what does OCamlMakefile.

Currently, I do "touch toto.ml; ocamldep ...; rm toto.ml"

but I've also written the attached small patch to ocamldep, 
which add an option "-f <file>", allowing the user to force some
dependencies to be generated even if there is no .ml[i] file.


Hope this help,
damien

[-- Attachment #2: ocamldep.diff --]
[-- Type: text/plain, Size: 765 bytes --]

26a27
> let additional_dependencies = ref ([] : string list)
41a43,48
> let add_to_dependencies file = 
>   additional_dependencies := file :: !additional_dependencies
> 
> let dependency_exists file = 
>   List.mem file !additional_dependencies || Sys.file_exists file
> 
55c62,64
<   find_in_path !load_path
---
>     if      List.mem name  !additional_dependencies then name
>     else if List.mem uname !additional_dependencies then uname
>     else    find_in_path !load_path
212c221
< let usage = "Usage: ocamldep [-I <dir>] [-native] <files>"
---
> let usage = "Usage: ocamldep [-I <dir>] [-f <file>] [-native] <files>"
219a229,230
>      "-f", Arg.String add_to_dependencies,
>        "<file> Generate dependencies against <file> even if it doesn't exist";

      reply	other threads:[~2003-12-02 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-02 16:26 David Brown
2003-12-02 16:42 ` Nicolas George
2003-12-02 16:53   ` samsaga2
2003-12-02 16:59     ` Nicolas George
2003-12-02 17:48 ` Remi Vanicat
2003-12-02 17:57   ` Damien [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031202185701.4f91c49a.Damien.Pous@ens-lyon.fr \
    --to=damien.pous@ens-lyon.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox