From: "François Bobot" <francois.bobot@cea.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Merlin question about configuration file
Date: Fri, 15 Nov 2013 14:26:23 +0100 [thread overview]
Message-ID: <528620FF.7050905@cea.fr> (raw)
In-Reply-To: <CAKS5mhQNMDUhZbcZW4FcTsjku2Mx1oHN=WPJT2ORBtEcfbjMZg@mail.gmail.com>
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
next prev parent reply other threads:[~2013-11-15 13:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 12:52 Johan Mazel
2013-11-15 13:26 ` François Bobot [this message]
2013-11-15 13:35 ` Raphaël Proust
2013-11-15 13:48 ` François Bobot
[not found] ` <CAD5gH1HxcrbYR5MgK+jOwuxonJAKfTMHUwTAxG7XwOip4K3_dQ@mail.gmail.com>
2013-11-15 14:13 ` François Bobot
2013-11-16 1:58 ` Edgar Friendly
2013-11-16 9:52 ` Thomas Refis
2013-11-15 13:51 ` Louis Gesbert
2013-11-16 9:55 ` Thomas Refis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=528620FF.7050905@cea.fr \
--to=francois.bobot@cea.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox