Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using rake with a non-ruby project

A workmate floated the idea of using rake as a build system for a non-ruby project. Is it possible to extend rake to compliment other languages where the autoconf toolset would usually be used?

like image 632
Nick Gerakines Avatar asked Jan 02 '09 07:01

Nick Gerakines


3 Answers

There are examples of this, like buildr, the drop in-replacement for maven (for java) that is built on top of rake. There's also raven for java.

like image 81
krosenvold Avatar answered Sep 18 '22 05:09

krosenvold


Tools like waf and SCons are Python-based build systems that are developed specifically for broad language support.

like image 33
orip Avatar answered Sep 21 '22 05:09

orip


You can find how to use Rake as an easy replacement for Makefile in the manual...

I use it almost exlusevely for build that I write myself... If you use Java better choice would be Ant and Maven - they have a lot of code behind them... But, as for me, you have to be a little brainf*ed to program in XML, so I often use Rake for many task, and invoke it from Ant/Maven, like that:

<target name="custom_task">
    <exec executable="/usr/bin/env">
        <arg value="rake"/>
        <arg value="some-task"/>
        <arg value="param" />
    </exec>
</target>

It may not be super efficient, especially if you have to run anything on the JVM it can't use Ant's, so it is not the best idea... I haven't tried JRuby, maybe it would be worth trying... But for other task - filehandling, doing something with text files, etc. it works really nice for me :-)

like image 41
rkj Avatar answered Sep 20 '22 05:09

rkj