Created
March 17, 2010 06:47
-
-
Save savonarola/334984 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ERLDIRS = %w{ | |
| elibs | |
| elibs/balancer | |
| elibs/config | |
| elibs/convert | |
| elibs/driver | |
| elibs/handler | |
| elibs/helper | |
| elibs/mysql | |
| elibs/tcp | |
| elibs/util | |
| } | |
| BEAMS = ERLDIRS.map{ |dir| FileList["#{dir}/*.erl"].pathmap("ebin/%n.beam") }.flatten | |
| ERLDIRS.each do |dir| | |
| rule ".beam" => "#{dir}/%n.erl" do |t| | |
| compile(t) | |
| end | |
| end | |
| def compile(t) | |
| cmd = "erlc #{ERLC_FLAGS} #{t.source}" | |
| sh cmd | |
| end | |
| task :build_erl => BEAMS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment