[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Sam Steingold <sds@g...> |
| Subject: | otags and OMakefile |
what is the correct entry for TAGS in OMakefile?
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
------------------------------------------------------------------
2. otags does not respect the pre-processors used for some files,
resulting in many errors:
------------------------------------------------------------------
File "", line 15, characters 0-4:
Parse error: [implem] expected after [str_item_semi] (in [implem])
Uncaught exception: Stream.Error("[implem] expected after
[str_item_semi] (in [implem])")
File "", line 12, characters 0-4:
Parse error: [implem] expected after [str_item_semi] (in [implem])
Uncaught exception: Stream.Error("[implem] expected after
[str_item_semi] (in [implem])")
File "", line 12, characters 0-4:
Parse error: [implem] expected after [str_item_semi] (in [implem])
Uncaught exception: Stream.Error("[implem] expected after
[str_item_semi] (in [implem])")
File "", line 10, characters 0-4:
Parse error: [implem] expected after [str_item_semi] (in [implem])
Uncaught exception: Stream.Error("[implem] expected after
[str_item_semi] (in [implem])")
File "", line 11, characters 39-43:
Parse error: [implem] expected after [str_item_semi] (in [implem])
Uncaught exception: Stream.Error("[implem] expected after
[str_item_semi] (in [implem])")
------------------------------------------------------------------
despite this, a valid TAGS file is created.
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)
------------------------------------------------------------------
so, how do I make ocaml TAGS?