caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nathaniel Gray" <n8gray@gmail.com>
To: "Sam Steingold" <sds@gnu.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] otags and OMakefile
Date: Thu, 10 Aug 2006 22:56:32 -0700	[thread overview]
Message-ID: <aee06c9e0608102256r3542beedg33b283252cce87c5@mail.gmail.com> (raw)
In-Reply-To: <ebfm03$gjh$1@sea.gmane.org>

On 8/10/06, Sam Steingold <sds@gnu.org> wrote:
> what is the correct entry for TAGS in OMakefile?

Well, OMake doesn't have any special support for otags, so the first
question is, can you build the tags file outside of OMake?

> I have this in the top-level OMakefile:
> ------------------------------------------------------------------
> TAGS:
>         otags -r $(SRC_DIRS)
> ------------------------------------------------------------------
> (where SRC_DIRS are also the dependencies of .SUBDIRS).
> this is deficient for 2 reasons:
>
> 1. somehow otags tries to read non-ml files (despite "otags -h" claiming
> that suffixes are [.mli; .ml]) and fails on especially large ones:
> ------------------------------------------------------------------
> otags: Unix error
>    Syscall: stat
>    Arg:     ./run/scan/top-20060612.log
>    Error:   Value too large for defined data type
> ------------------------------------------------------------------

The otags author(s) will have to answer that one.

> 2. otags does not respect the pre-processors used for some files,
> resulting in many errors:

Does otags get called with -pp flags?

> despite this, a valid TAGS file is created.

But surely it is incomplete.

> the preprocessing is specified in OMakeroot:
> ------------------------------------------------------------------
> # Preprocess OCaml-files with a given OCaml-preprocessor
> OCamlMakePPDeps(pps, names) =
>    pp_cmos = $(addsuffix .cmo, $(pps))
>    deps =
>    foreach(pp_cmo, $(pp_cmos))
>      deps += $(OCamlAddLibDir $(pp_cmos))
>      export deps
>    pp_cmd = camlp4o $(PREFIXED_OCAMLINCLUDES) $(pp_cmos)
>    OCAMLPPFLAGS = -pp "$(pp_cmd)"
>    OCAMLDEPFLAGS = $(OCAMLPPFLAGS)
>    foreach(name, $(names))
>      tgts = $(addsuffixes .cmi .cmo .cmx .o, $(name))
>      scan_deps = scan-ocaml-$(name).ml scan-ocaml-$(name).mli
>      Capture_deps(__ENV, \
>        OCAMLPPFLAGS OCAMLDEPFLAGS, $(tgts), $(deps), $(scan_deps))
>      tgts = $(addsuffix .auto.mli, $(name))
>      Capture_deps(__ENV, \
>        OCAMLPPFLAGS OCAMLDEPFLAGS, $(tgts), $(deps), $(scan_deps))
>      export __ENV
>    export __ENV
> ------------------------------------------------------------------
> and in OMakefile:
> ------------------------------------------------------------------
> OCamlMakePPDeps(pa_sexp_conv, foo bar baz)
> ------------------------------------------------------------------

I'm not enough of an OMake guru to comment on this, so I'll just say
again that you should make sure you know how to get the result you
want outside of OMake before you worry about how to do it inside of
OMake.

Cheers,
-n8

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->


  reply	other threads:[~2006-08-11  5:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10 16:13 Sam Steingold
2006-08-11  5:56 ` Nathaniel Gray [this message]
2006-08-11 13:53 ` [Caml-list] " Hendrik Tews
2006-08-16 15:51   ` Sam Steingold

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=aee06c9e0608102256r3542beedg33b283252cce87c5@mail.gmail.com \
    --to=n8gray@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=sds@gnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).