Using build-make on Linux


#1

I have just started using Atom for Linux development. I installed the build-make package to be able to build my GNU Makefile project from within Atom. The atom-build package documentation lists a number of keys to use but none of them has any effect what so ever. If I press ctrl-alt-B nothing happens. F9 doesn’t work either, nothing happens. What more do I need to do besides installing build-make to get this to work?

Regards, Micke.


#2

You might want to take a look at the build-tools package. In contrast to the other gcc related build packages, build-tools lets you work with multiple make files rather than just a Makefile and easily supports different build commands.


#3

I removed the build-make package and installed build-tools and build-tools-make but I still do not know how to get them working. Do I need to create a .build-tools.cson file and add configuration to it or is it enough to just install build-tools-make on top of build-tools? How is the parsing of makefiles triggered?

Regards, Micke.


#4

Micke

Create an empty .build-tools.cson. Then open it using atom. Then follow the example from the extension’s web site.

What you end up doing is creating some commands which will show up in the build tools command (Ctrl+L Ctrl+L) list.

You have a command name – build_test
you have a shell command to run – make -f makefile_unit -j4

It provides a way to trigger build commands as you would in a console.

and then you can set options to have the make output function like it does in vim so you can click on compile errors and go the line in the file.

When you type Ctrl+L Ctrl+L you get an atom command window where you can choose which build command to run.

Does this help?

Dave


#5

Thanks for the input, it works now. Great work!

Regards, Micke.


#6

Can the plugin handle multiple projects, each with its own .build-tools.cson?


#7

Yes.

put a .build-tools.cson file in each project’s directory.

you can also share build files among projects vial a linking to a .build-tools.cson file in another project’s directory (although I don’t remember which part of the setting UI does this)