Emacs CEDET EDE non-trivial project settings

Trying to understand how EDE works by using it to generate a Makefile for a project directory that contains several goals under a specific hierarchy. I am out of luck and the information pages do not seem to answer my question.

My directory structure looks something like this: (Asterix (*) marks files containing main () functions)

research/ flow/ flow.cpp flow.hpp program.cpp * samples/ sample1.yuv utils/ yuvreader.cpp yuvreader.hpp tests/ yuvreader_test.cpp * 

I want to create an EDE project with one or more subprojects; or maybe I just want one or more goals ...?

flow program.cpp requires stream / and utils / sources, but yuvreader_test only requires utils / sources.

I did ede-new in the root directory and in all subdirectories. I also made ede-new-target in the root directory, but when adding the source files to subdirectories it does not recognize the target that I created.

I would appreciate it if someone could point me to the more complex Project.ede Files for something like what I'm trying to do. You can guess that I have more subdirectories containing class code files, some of which have stand-alone programs that use this code; I also have more tests. code in tests. Any examples of files / command operations would be appreciated.

+4
source share
1 answer

The EDE function that will generate the Makefile or Automakefiles has a few more limitations than Make or Automake. For example, files belonging to the target should be in the same directory as the project containing the target. In your example, you probably won't have projects in the root directory.

To combine multiple sources into one program, a simple mechanism is for each subdirectory to create an archive (.a) or a shared lib (.so) that is linked in your program.

If this is too complicated, you can also write your own automake files, and the EDE will read them directly, so you can perform a more complicated build procedure if necessary.

The CEDET distribution uses EDE as a build process, so you can see this as a complex example. However, it does not create files in C ++, so it may not be as useful as you would like.

+2
source

Source: https://habr.com/ru/post/1395214/


All Articles