Build package - Do I have to specify all input files?


Hi All,

Bit of a noob when it comes to atom, so here goes…

In the build package, is there a way to build without specifying the input file. For instance, say I am compiling my C file, called test.c - from my understanding I need to create a .atom-build.json file, and I have said the following:

	“cmd”: “gcc test.c -o output”
	“name”: “whatever name”
	“target”: “target name”

Is there a way to run build without having to specify test.c ?

If there is then I should be able to compile all the files in my project at once without having to specify a separate json for each code file. Also it would be cool to just copy and paste my json into my project directory instead of creating a custom one each time.

On a side note, on the package page for build, it says I can download build-xcodeproject to automatically compile C and C++ files - I tried this but I think I still need to create a json file, is that right?

Thanks very much for your help!



Would anyone be able to help please (or provide a package that builds without having to specify all input files).

If there’s no way to do this, not a problem, but would just like to know anyways.

Thanks very much


Have you filed an Issue on the repository for the build package? That might be the fastest way to get support for the package. We have lots of community members that read and participate here but I don’t know that we can answer all questions about all 3,500+ packages :grinning:


Ah right, will do that, thanks very much.

I’m a very new programmer (and loving the process) - thanks will go to the link you posted



I am the maintainer of build. There’s two different approaches I can suggest. Pick the one that suits you.

  1. Create a GNU Makefile and specify how your project is built. Combine this with the build-make package.
  2. Use variable replacements which is available inthe build package. For instance, {FILE_ACTIVE} would be replaced with the current active file in Atom (which may be test.c in your setup.