Do arithemtric comparison in Makefile without using bc 69/8269/2
authorDamjan Marion <damarion@cisco.com>
Thu, 31 Aug 2017 09:33:34 +0000 (11:33 +0200)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 31 Aug 2017 12:05:47 +0000 (12:05 +0000)
Change-Id: I245f56814ba3911b832e7450d42c58f235bc6dc2
Signed-off-by: Damjan Marion <damarion@cisco.com>
Makefile

index 1548f36..8eaf515 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
        RPM_DEPENDS += python-devel
        RPM_DEPENDS += python2-virtualenv
        RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
-else ifeq ($(shell if [ $(echo "$(OS_VERSION_ID) > 25" | bc) -eq 1 ] ; then echo "y" ; fi),"y")
+else ifeq ($(shell test $($(OS_VERSION_ID) -gt 25; echo $$?)),0)
        RPM_DEPENDS += python2-devel
        RPM_DEPENDS += python2-virtualenv
        RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'