homebrew-core/Formula/automake.rb

58 lines
1.7 KiB
Ruby
Raw Normal View History

class Automake < Formula
desc "Tool for generating GNU Standards-compliant Makefiles"
homepage "https://www.gnu.org/software/automake/"
url "http://ftpmirror.gnu.org/automake/automake-1.15.tar.xz"
mirror "https://ftp.gnu.org/gnu/automake/automake-1.15.tar.xz"
sha256 "9908c75aabd49d13661d6dcb1bc382252d22cc77bf733a2d55e87f2aa2db8636"
2013-10-28 10:34:34 +00:00
bottle do
2015-09-11 15:23:36 +00:00
cellar :any
revision 2
sha256 "70a763221d2bb9baaf630f2170224c915ca96a9966fbb1d86781c8743740bb7b" => :el_capitan
sha256 "d8e4773130e25ff576a0c7d18b4d010b1e03eba90b0074e1ac749fdf3bc13e26" => :yosemite
sha256 "69c1635672fa682a40949572e64fe3495055e97ad2c105dd46fb2e447d0d65a8" => :mavericks
sha256 "6e6fdaa7fb7ddaaeb103341d1ca351e0669874f86eb21eb6623cb345dd1f5b6f" => :mountain_lion
2013-10-28 10:34:34 +00:00
end
keg_only :provided_until_xcode43
2015-12-19 05:47:53 +00:00
depends_on "autoconf" => :run
def install
ENV["PERL"] = "/usr/bin/perl"
system "./configure", "--prefix=#{prefix}"
system "make", "install"
2012-07-07 18:08:22 +00:00
# Our aclocal must go first. See:
# https://github.com/Homebrew/homebrew/issues/10618
(share/"aclocal/dirlist").write <<-EOS.undent
#{HOMEBREW_PREFIX}/share/aclocal
/usr/share/aclocal
2012-07-07 18:08:22 +00:00
EOS
end
test do
2015-10-08 09:44:03 +00:00
(testpath/"test.c").write <<-EOS.undent
int main() { return 0; }
EOS
(testpath/"configure.ac").write <<-EOS.undent
AC_INIT(test, 1.0)
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
EOS
(testpath/"Makefile.am").write <<-EOS.undent
bin_PROGRAMS = test
test_SOURCES = test.c
EOS
system bin/"aclocal"
system bin/"automake", "--add-missing", "--foreign"
system "autoconf"
system "./configure"
system "make"
system "./test"
end
end