Make integration in ATOM


#1

#Make Integration
Hey, for my projects (mostly C) i would like to have a keyboard shortcut, which will show up a window with all targets from make. Here you can select one and make will be executed.

Would this be possible?


Introducing Makro, a new Atom make runner!
#2

Definitely possible!

Do you also want to be able to execute these targets?

EDIT :
Sorry, this was answered in the original question here :

Here you can select one and make will be executed.


#3

yes, that would be perfect!
##Thank You :wink:


#4

I am not a C/C++ programmer (mainly python, and JS) though do many projects contain multiple makefiles?


#5

I use only one Makefile, but I have seen some projects with more then one, so I think it is ‘normal’ that projects contain multiple makefiles…


#6

Most projects that use multiple Makefiles essentially cascade whatever target you selected at the next higher level to the current level and further below levels. For example, if I have a directory structure like:

Project
+ Component1
| + Sub-component 1-1
| + Sub-component 1-2
| + Sub-component 1-3
+ Component 2
...
etc

If I am in the directory Project and I execute make build then the Makefile in Project calls make build on the Makefile in Component 1, Component 2, etc. And the Makefile in Component 1 when the build target is called on it, then it calls make build on the Makefile in each of its sub-components … etc.

So, typically, you don’t need to look to see what targets are available in the Makefiles of descendent directories because they are either the same as the topmost one … or they are implementation details that you don’t normally care about anyway.

Of course, people can do crazy stuff with Make, but that doesn’t mean you have to bend over backwards to support them. They are crazy after all :wink:


#7

Yes, you only need the available targets of the ‘main’ makefile in my eyes too.
So only the one in the ‘project’ dir.


#8

Sweet. Is it worth showing these? I am considering views for selecting a make file.

I think it would be good to have a command / key binding to bring up a SelectListView of the top most Makefile targets. Another binding should bring up a means of selecting which Makefile you are interested in and then a list of the Makefile targets. I intended to display the output in atom-message-panel.

Any other feature suggestions? Would anyone like to work on this with me?


#9

I have just finished up the basics of Makro. A package that does exactly what we discussed here.

I have a list of features I hope to get into it by the end of next week and please feel free to work on this with me :smile:


#10

##Perfect, just perfect :thumbsup:
I have tested it right now, and it works perfect. So I dont need to switch between terminal and Atom anymore!
Big thank you :smiley:


#11

One thing I need to get working better is launching the make process. At the moment all out is dumped upon completion of the make process. In the future I could like the output to stream to the message panel.

I also want to support search for specific makefiles within the project and executing targets from these makefiles.

Of coarse I won’t be complicating or removing the current functionality. There should always be a key mapping to get directly to your main makefile.


#12

@mame98 I have just merged your pull request. Thank you for creating the demo. Appreciated. :+1: