make: remove default-names option
This commit is contained in:
parent
759e056936
commit
dce96029d3
1 changed files with 14 additions and 26 deletions
|
@ -13,42 +13,32 @@ class Make < Formula
|
|||
sha256 "98d5e65561d42e737713bd745110bf808800819a393e2ddb7743896203f92b56" => :sierra
|
||||
end
|
||||
|
||||
option "with-default-names", "Do not prepend 'g' to the binary"
|
||||
|
||||
def install
|
||||
args = %W[
|
||||
--disable-dependency-tracking
|
||||
--prefix=#{prefix}
|
||||
--program-prefix=g
|
||||
]
|
||||
|
||||
args << "--program-prefix=g" if build.without? "default-names"
|
||||
|
||||
system "./configure", *args
|
||||
system "make", "install"
|
||||
|
||||
if build.without? "default-names"
|
||||
(libexec/"gnubin").install_symlink bin/"gmake" =>"make"
|
||||
(libexec/"gnuman/man1").install_symlink man1/"gmake.1" => "make.1"
|
||||
end
|
||||
(libexec/"gnubin").install_symlink bin/"gmake" =>"make"
|
||||
(libexec/"gnuman/man1").install_symlink man1/"gmake.1" => "make.1"
|
||||
end
|
||||
|
||||
def caveats
|
||||
if build.without? "default-names"
|
||||
<<~EOS
|
||||
All commands have been installed with the prefix 'g'.
|
||||
If you do not want the prefix, install using the "with-default-names" option.
|
||||
def caveats; <<~EOS
|
||||
GNU "make" has been installed as "gmake".
|
||||
If you need to use it as "make", you can add a "gnubin" directory
|
||||
to your PATH from your bashrc like:
|
||||
|
||||
If you need to use these commands with their normal names, you
|
||||
can add a "gnubin" directory to your PATH from your bashrc like:
|
||||
PATH="#{opt_libexec}/gnubin:$PATH"
|
||||
|
||||
PATH="#{opt_libexec}/gnubin:$PATH"
|
||||
Additionally, you can access its man page with normal name if you add
|
||||
the "gnuman" directory to your MANPATH from your bashrc as well:
|
||||
|
||||
Additionally, you can access their man pages with normal names if you add
|
||||
the "gnuman" directory to your MANPATH from your bashrc as well:
|
||||
|
||||
MANPATH="#{opt_libexec}/gnuman:$MANPATH"
|
||||
EOS
|
||||
end
|
||||
MANPATH="#{opt_libexec}/gnuman:$MANPATH"
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
|
@ -57,9 +47,7 @@ class Make < Formula
|
|||
\t@echo Homebrew
|
||||
EOS
|
||||
|
||||
cmd = build.with?("default-names") ? "make" : "gmake"
|
||||
|
||||
assert_equal "Homebrew\n",
|
||||
shell_output("#{bin}/#{cmd}")
|
||||
assert_equal "Homebrew\n", shell_output("#{bin}/gmake")
|
||||
assert_equal "Homebrew\n", shell_output("#{opt_libexec}/gnubin/make")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue