gdb: add version suffix

* Using "--with-version-suffix", gdb executable will be named as "gdb-7"
  where "7" is the major version.  This makes using system gdb and
  Homebrew gdb at the same time easier.
This commit is contained in:
Xiyue Deng 2013-09-04 11:12:41 -07:00 committed by Misty De Meo
parent 838022e1df
commit eaf5765fd7

View file

@ -25,6 +25,7 @@ class Gdb < Formula
end
option 'with-brewed-python', 'Use the Homebrew version of Python'
option 'with-version-suffix', 'Add a version suffix to program'
def install
args = [
@ -40,9 +41,13 @@ class Gdb < Formula
args << "--with-python=/usr"
end
if build.include? 'with-version-suffix'
args << "--program-suffix=-#{version.to_s.slice(/^\d/)}"
end
system "./configure", *args
system "make"
system "make install"
system "make", "install"
# Remove conflicting items with binutils
rm_rf include