* Use ?= for some variables declarations

* Remove the hardcoded declarations of llvm version in debian/rules
This commit is contained in:
Sylvestre Ledru 2017-11-24 18:28:38 +00:00
parent 687c1b3b6f
commit 782faad42c
2 changed files with 10 additions and 7 deletions

2
debian/changelog vendored
View File

@ -12,6 +12,8 @@ llvm-toolchain-5.0 (1:5.0.1~+rc1-1~exp1) experimental; urgency=medium
* Remove some old breaks/replaces/conflicts (<3.8)
* Fix some wrong-section-according-to-package-name and
priority-extra-is-replaced-by-priority-optional issues
* Use ?= for some variables declarations
* Remove the hardcoded declarations of llvm version in debian/rules
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 30 Oct 2017 19:41:20 +0100

15
debian/rules vendored
View File

@ -7,8 +7,9 @@ GXX_VERSIONED_PACKAGE := $(shell dpkg-query -W -f '$${Depends}' g++ | grep -o
GXX_VERSIONED_EXECUTABLE := $(shell dpkg -L $(GXX_VERSIONED_PACKAGE) | grep '/usr/bin/g++-[0-9][0-9.]*' | xargs ls -d | tail -n1 )
GCC_VERSION := $(subst /usr/bin/g++-,,$(GXX_VERSIONED_EXECUTABLE))
LLVM_VERSION := 5.0
LLVM_VERSION_FULL := $(LLVM_VERSION).1
LLVM_VERSION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).([0-9]+).*,\1.\2,p"
)
LLVM_VERSION_FULL := $(shell dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1,p")
SONAME_EXT := 1
# Manage the case when the version is 1:3.5~svn213052-1~exp1 or 1:3.4.2-1
@ -19,11 +20,11 @@ endif
VENDOR=$(shell lsb_release -is)
DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH_BITS = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
LDFLAGS_EXTRA =
CXXFLAGS_EXTRA = -std=c++0x