summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorYichen Wang <yicwang@cisco.com>2018-10-30 22:52:15 -0700
committerYichen Wang <yicwang@cisco.com>2018-10-31 18:16:28 +0000
commit840cd12ee4687dd1de4715e6f4196a79a56c4221 (patch)
tree34e669eed0b8a03b59dd558f20221396fe7ea6ce /Makefile
parent2b4c49e6fd7a1ea59d309867918bb53850ce3267 (diff)
Makefile: support both RHEL and CentOS in install-dep
Change-Id: I31fd8700bfac462944b7621947edd3710fd247b9 Signed-off-by: Yichen Wang <yicwang@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a40139c2ae9..f5f10ef77e5 100644
--- a/Makefile
+++ b/Makefile
@@ -296,8 +296,12 @@ endif
@sudo -E apt-get update
@sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
- @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
+ifeq ($(OS_ID),rhel)
+ @sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
+else ifeq ($(OS_ID),centos)
@sudo -E yum install $(CONFIRM) centos-release-scl-rh
+endif
+ @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
@@ -310,7 +314,7 @@ else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
else
- $(error "This option currently works only on Ubuntu, Debian, Centos or openSUSE systems")
+ $(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE systems")
endif
define make