2012-09-08 05:46:26 +00:00
|
|
|
class Bam < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Build system that uses Lua to describe the build process"
|
2015-07-10 20:54:51 +00:00
|
|
|
homepage "https://matricks.github.io/bam/"
|
2015-01-13 09:38:11 +00:00
|
|
|
url "https://github.com/downloads/matricks/bam/bam-0.4.0.tar.gz"
|
|
|
|
sha1 "c0f32ff9272d5552e02a9d68fbdd72106437ee69"
|
2012-09-08 05:46:26 +00:00
|
|
|
|
2015-01-13 09:38:11 +00:00
|
|
|
head "https://github.com/matricks/bam.git"
|
2012-09-08 05:46:26 +00:00
|
|
|
|
2015-01-13 12:51:12 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "7ec0b273b35f7e543cc6a1810a14e14062f81639" => :yosemite
|
|
|
|
sha1 "6b531fb8df899d603f93262f87cfdcb8001b8436" => :mavericks
|
|
|
|
sha1 "dce2512abc5625827a16becba635941b007c16dd" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2012-09-08 05:46:26 +00:00
|
|
|
def install
|
|
|
|
system "./make_unix.sh"
|
2015-01-13 09:38:11 +00:00
|
|
|
bin.install "bam"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"hello.c").write <<-EOS.undent
|
|
|
|
#include <stdio.h>
|
|
|
|
int main(void) { printf("hello\\n"); return 0; }
|
|
|
|
EOS
|
|
|
|
|
|
|
|
(testpath/"bam.lua").write <<-EOS.undent
|
|
|
|
settings = NewSettings()
|
|
|
|
objs = Compile(settings, Collect("*.c"))
|
|
|
|
exe = Link(settings, "hello", objs)
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system "bam", "-v"
|
|
|
|
assert_equal "hello\n", shell_output("./hello")
|
2012-09-08 05:46:26 +00:00
|
|
|
end
|
|
|
|
end
|