From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 9174EBC29 for ; Thu, 10 Aug 2006 18:30:28 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k7AGURRa010239 for ; Thu, 10 Aug 2006 18:30:27 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA29479 for ; Thu, 10 Aug 2006 18:30:27 +0200 (MET DST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k7AGUQEE010193 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 10 Aug 2006 18:30:26 +0200 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1GBDQ2-0001nY-GQ for caml-list@inria.fr; Thu, 10 Aug 2006 18:30:02 +0200 Received: from 209.213.205.130 ([209.213.205.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Aug 2006 18:30:02 +0200 Received: from sds by 209.213.205.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Aug 2006 18:30:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sam Steingold Subject: otags and OMakefile Date: Thu, 10 Aug 2006 12:13:53 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 209.213.205.130 User-Agent: Thunderbird 1.5.0.4 (X11/20060614) Sender: news X-Miltered: at nez-perce with ID 44DB5F23.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44DB5F22.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; otags:01 otags:01 dirs:01 dirs:01 dependencies:01 mli:01 unix:01 uncaught:01 uncaught:01 preprocess:01 cmo:01 deps:01 cmo:01 deps:01 camlp:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=RCVD_BY_IP,RCVD_NUMERIC_HELO autolearn=disabled version=3.0.3 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?