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 E4867BC29 for ; Fri, 11 Aug 2006 07:56:33 +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 k7B5uX3c017018 for ; Fri, 11 Aug 2006 07:56:33 +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 HAA05853 for ; Fri, 11 Aug 2006 07:56:32 +0200 (MET DST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k7B5uWDR017009 for ; Fri, 11 Aug 2006 07:56:32 +0200 Received: by nf-out-0910.google.com with SMTP id o25so735214nfa for ; Thu, 10 Aug 2006 22:56:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UFFwHjEHSlz3yYmuEVXMaRAKHK0mRVx9Cci5QwOxpV3Ql4pGU3Vz6nM2iP3SWSxIubth1PUeoAOVMnRaZDmuSie0gitW2WdMLAHm34rG28B5J96+S4krPdlwoFvpUALZw2KqgkQZ3CQKVzKViiQoXN/lATOcLSQQTrw4I0jmiyU= Received: by 10.78.147.3 with SMTP id u3mr1743915hud; Thu, 10 Aug 2006 22:56:32 -0700 (PDT) Received: by 10.78.158.8 with HTTP; Thu, 10 Aug 2006 22:56:32 -0700 (PDT) Message-ID: Date: Thu, 10 Aug 2006 22:56:32 -0700 From: "Nathaniel Gray" To: "Sam Steingold" Subject: Re: [Caml-list] otags and OMakefile Cc: caml-list@inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-j-chkmail-Score: MSGID : 44DC1C10.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44DC1C11.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44DC1C10.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 -pp:01 flags: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=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 On 8/10/06, Sam Steingold 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 -->