Question

The "Default" section in EDE's customization buffer is kinda confusing. There are some sections in there whose uses I can't understand.

  • What are inference rules? What are they inferring? How do I use them? Why would I use them?
  • The Include-File section. What is it for? What include files? How are they different from simple .h files?
  • The "Automatic-Dependencies" section currently has the following "explanation": Non-nil to do implement automatic dependencies in the Makefile. Is it really currently unimplemented? What is it intended for?
Was it helpful?

Solution

Many options in the EDE Make project type are specific to managing Makefiles.

An inference rule in Make might be something like this:

%.o: %.cpp
    @echo '$(CXX_COMPILE) -c $<'; \
    $(CXX_COMPILE) $(CXX_DEPENDENCIES) -o $@ -c $<

which says that if some dependency foo.o is desired, it matches %.o, and will see if there is a foo.cpp, and if so, run those commands.

That slot lets you write your own if your files types aren't supported directly.

The include file allows you to write you won makefile include. You might call it pickle.mk, and if you make that an include, you will find:

include pickle.mk

in your generated makefiles.

Automatic dependencies are for languages supported by gcc, and it will create a dependency file, which is basically a makefile that says foo.cpp depends on misc header files included within it. It will make your builds more accurate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top