Reputation: 12963
I have the following setup: I'm working with C++ projects under a custom build system and the source code directories are not very stable on my development machine because I'm constantly checking out specific versions of some projects in their own directories (off of a single source directory where I store all source code) for maintenance or new feature development and then deleting them when I'm finished. I want to use EDE/CEDET, but I don't want to store project definitions in my home area. What I would really like is some sort of auto-loader, which seems to exist, but I can't make sense of the documentation. Can someone please point me to instructions on how to set up such a thing?
Upvotes: 4
Views: 206
Reputation: 3949
There are a few options, but I'm guessing that with your C++ project showing up in a bunch of random locations, you want to create a custom way to auto-create ede-cpp-root projects.
If you look in ede/ede-cpp-root.el, or in emacs lisp/cedet/ede/cpp-root.el, in the comments at the top look for ADVANCED EXAMPLE. This shows how to create three simple functions in your .emacs with rules that will create new projects upon discovery.
Lets say every one of your projects is in a dir like this:
/home/BD/somewhere/MYPROJ/
then you might have code in MY-FILE-FOR-DIR (from the example) that looks like this:
(when (string-match "/MYPROJ/" dir)
(expand-file-name "Makefile" (substring dir (match-end 0)) )
or if every project always has some special file, like ".SPECIAL", you might have
(when (file-exists-p (expand-file-name ".SPECIAL" dir)))
(expand-file-name ".SPECIAL" dir))
It is likely you can get a lot of milage from some simple Emacs Lisp code.
Upvotes: 1