From 84400de6f0997522fac0ecb073d54a8f0161c1f5 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Thu, 8 Oct 2015 17:44:03 +0800 Subject: [PATCH] automake: better test --- Formula/automake.rb | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Formula/automake.rb b/Formula/automake.rb index 3253e7f8e7..0a5cedc26a 100644 --- a/Formula/automake.rb +++ b/Formula/automake.rb @@ -33,6 +33,25 @@ class Automake < Formula end test do - system "#{bin}/automake", "--version" + (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