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:
parent
838022e1df
commit
eaf5765fd7
1 changed files with 6 additions and 1 deletions
|
@ -25,6 +25,7 @@ class Gdb < Formula
|
||||||
end
|
end
|
||||||
|
|
||||||
option 'with-brewed-python', 'Use the Homebrew version of Python'
|
option 'with-brewed-python', 'Use the Homebrew version of Python'
|
||||||
|
option 'with-version-suffix', 'Add a version suffix to program'
|
||||||
|
|
||||||
def install
|
def install
|
||||||
args = [
|
args = [
|
||||||
|
@ -40,9 +41,13 @@ class Gdb < Formula
|
||||||
args << "--with-python=/usr"
|
args << "--with-python=/usr"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if build.include? 'with-version-suffix'
|
||||||
|
args << "--program-suffix=-#{version.to_s.slice(/^\d/)}"
|
||||||
|
end
|
||||||
|
|
||||||
system "./configure", *args
|
system "./configure", *args
|
||||||
system "make"
|
system "make"
|
||||||
system "make install"
|
system "make", "install"
|
||||||
|
|
||||||
# Remove conflicting items with binutils
|
# Remove conflicting items with binutils
|
||||||
rm_rf include
|
rm_rf include
|
||||||
|
|
Loading…
Reference in a new issue