From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id B64FF7EE25 for ; Fri, 15 Nov 2013 14:26:07 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of francois.bobot@cea.fr) identity=pra; client-ip=132.167.192.142; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="francois.bobot@cea.fr"; x-sender="francois.bobot@cea.fr"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of francois.bobot@cea.fr designates 132.167.192.142 as permitted sender) identity=mailfrom; client-ip=132.167.192.142; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="francois.bobot@cea.fr"; x-sender="francois.bobot@cea.fr"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@cirse-out.extra.cea.fr) identity=helo; client-ip=132.167.192.142; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="francois.bobot@cea.fr"; x-sender="postmaster@cirse-out.extra.cea.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmYBAHcghlKEp8COnGdsb2JhbABZwDqCe4EmFg4BAQEBAQgLCQkUKIIlAQEEATIBBUARCxgJFg8JAwIBAgFFEwgCF4dgBsEHj3AWhBsDnk+Odw X-IPAS-Result: AmYBAHcghlKEp8COnGdsb2JhbABZwDqCe4EmFg4BAQEBAQgLCQkUKIIlAQEEATIBBUARCxgJFg8JAwIBAgFFEwgCF4dgBsEHj3AWhBsDnk+Odw X-IronPort-AV: E=Sophos;i="4.93,708,1378850400"; d="scan'208";a="35719057" Received: from cirse-out.extra.cea.fr ([132.167.192.142]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Nov 2013 14:26:07 +0100 Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by cirse.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id rAFDQ6YV006952 for ; Fri, 15 Nov 2013 14:26:06 +0100 Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 349DF2021C0 for ; Fri, 15 Nov 2013 14:26:23 +0100 (CET) Received: from muguet2.intra.cea.fr (muguet2.intra.cea.fr [132.166.192.7]) by pisaure.intra.cea.fr (Postfix) with ESMTP id 25174202196 for ; Fri, 15 Nov 2013 14:26:23 +0100 (CET) Received: from [10.8.32.80] (is222783.intra.cea.fr [10.8.32.80]) by muguet2.intra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.2) with ESMTP id rAFDQ6Lk023607 for ; Fri, 15 Nov 2013 14:26:06 +0100 Message-ID: <528620FF.7050905@cea.fr> Date: Fri, 15 Nov 2013 14:26:23 +0100 From: =?ISO-8859-1?Q?Fran=E7ois_Bobot?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Merlin question about configuration file On 15/11/2013 13:52, Johan Mazel wrote: > Hi > I managed to get merlin to work with auto-completion and so-on in Emacs 2.4. > I have a code base big enough to make it hard for me to manually setup > the .merlin configuration for every directory in src (with the S > directive) and _build (with the B directive). > > Is there any way to only specify these two directory (src and _build) > and tell merlin to scan every subdirectory of these two directories ? > If it is not the case, I will write a small bash script to automatically > write/update the merlin file I would very much like to not have to > resort to this. I don't know an elegant solution, but I can give you the script I use. There is another glitch if you have a big code base with many sub-...-subdirectories: merlin look for the .merlin in the current directory and the parent directory. So you need to copy or link the .merlin in many directories. And then the directories inside the .merlin must be absolute. Moreover you can't put the .merlin in every subdirectories (ex: .svn, tests,...). For frama-c I added this Makefile target: .PHONY:merlin merlin: #create Merlin file find `echo "src cil external" | xargs -n 1 -d ' ' readlink -f` \( -name .svn -name tests -o -name doc -o -name result -o -name -o -name oracle -o -name "*.cache" \) -prune -o \( -type d -printf "B %p\nS %p\n" \) > .merlin echo $(OCAMLGRAPH_MERLIN) >> .merlin echo "PKG zarith" >> .merlin #create link in subdirectories to the merlin file find `echo "src cil external" | xargs -n 1 -d ' ' readlink -f` \( -name tests -o -name doc -o -name result -o -name -o -name oracle -o -name "*.cache" \) -prune -o \( -type d -exec ln -fs $$PWD/.merlin \{\}/.merlin \; \) > > Thanks a lot to the authors of this great tool. :) +1 -- François