Have you replaced makefiles with ruby ​​scripts?

I appreciate make files and do in all their glory, but I wonder if there is a more intuitive way to support my c / C ++ builds.

Has anyone tried replacing their makefiles with ruby ​​scripts to provide complex and responsive builds without sacrificing readability? Are there gems that make this easier?

+6
ruby scripting build makefile gem
source share
3 answers

Take a look at Rake , replace the entry written in Ruby. This is basically a small domain-specific language that focuses on typical make tasks, with the ability to write normal ruby ​​code to Rakefile .

+6
source share

This is a very old idea, and it has been tested by many scripting languages. SRC Modula-3 comes with a language called Quake, which wrote all the m3makefile for the project. The challenge is to provide something closer to the conciseness and transparency of the Makefile, allowing for much more expressive power. Rake has ways to go before it approaches the simplicity and clarity of make or quake, but it is supremely useful. I think some readability is sacrificed for a tool like Plan 9 mk , but Rake is much more readable than the more baroque use of Gnu Make.

+3
source share

I converted large, multiple, and complex C projects using Rake and several small Java files.

And I will never return to make files! Rake files for my eyes are much more readable than either make files or ant.

Rake and Ruby have their own problem, the main one being decent documentation, and it will continue to learn and experience building decent build systems if you are not very comfortable with Ruby.

+3
source share

All Articles