-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (41 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class AutomakeAT116 < Formula
desc "Tool for generating GNU Standards-compliant Makefiles"
homepage "https://www.gnu.org/software/automake/"
url "https://ftp.gnu.org/gnu/automake/automake-1.16.2.tar.xz"
mirror "https://ftpmirror.gnu.org/automake/automake-1.16.2.tar.xz"
sha256 "ccc459de3d710e066ab9e12d2f119bd164a08c9341ca24ba22c9adaa179eedd0"
depends_on "tomtom-international/taps/[email protected]"
def install
ENV["PERL"] = "/usr/bin/perl"
system "./configure", "--prefix=#{prefix}"
system "make", "install"
# Our aclocal must go first. See:
# https://github.com/Homebrew/homebrew/issues/10618
(share/"aclocal/dirlist").write <<~EOS
#{HOMEBREW_PREFIX}/share/aclocal
/usr/share/aclocal
EOS
end
test do
(testpath/"test.c").write <<~EOS
int main() { return 0; }
EOS
(testpath/"configure.ac").write <<~EOS
AC_INIT(test, 1.0)
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
EOS
(testpath/"Makefile.am").write <<~EOS
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