English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
otags and OMakefile
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-11 (13:53)
From: Hendrik Tews <tews@c...>
Subject: Re: [Caml-list] otags and OMakefile
Sam Steingold <sds@gnu.org> writes:

   what is the correct entry for TAGS in OMakefile?
   I have this in the top-level OMakefile:
   	otags -r $(SRC_DIRS)

This only works in simple cases (and, apparently, your case is
not simple).

   1. somehow otags tries to read non-ml files (despite "otags -h"

It does a Unix.stat on the files before filtering, which only
works for files smaller 1GB. 

Granted, this is a bug.

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

You have to specify the preprocessors on the otags command line, like

   otags -pa pr_r.cmo revised.ml

You might have to add -libdir dir_of_camlp4_module.

   the preprocessing is specified in OMakeroot:

I have no idea about OMakefile, but I doubt it can work as you
expected. What you have to (or OMakefile would have) is the
- collect the source files in equivalence sets according to the needed
- invoke otags on each such set separately with the right set of
  -pa options
- concat the results 

(With -v you can see the camlp4 calls that do the real job. )


Hendrik Tews