From 1bb9ec0e9b3c17a83a4e1ca5e499db6670490be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Vavru=C5=A1a?= <marek.vavrusa@nic.cz> Date: Mon, 27 Apr 2015 16:19:32 +0200 Subject: [PATCH] build: cleanup in make rules --- platform.mk | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/platform.mk b/platform.mk index f47bbffe5..9ce10ca54 100644 --- a/platform.mk +++ b/platform.mk @@ -78,20 +78,16 @@ endef # Find library (pkg-config) define find_lib - ifeq ($$(strip $$($(1)_LIBS)),) - $(1)_CFLAGS := $(shell pkg-config --cflags $(1) --silence-errors) - $(1)_LIBS := $(shell pkg-config --libs $(1) --silence-errors) - endif - $(call have_lib,$(1)) + $(call find_alt,$(1),$(1)) endef # Find library alternative (pkg-config) define find_alt -ifeq ($$(strip $$($(1)_LIBS)),) - $(1)_CFLAGS := $(shell pkg-config --cflags $(2) --silence-errors) - $(1)_LIBS := $(shell pkg-config --libs $(2) --silence-errors) + ifeq ($$(strip $$($(1)_LIBS)),) + $(1)_CFLAGS := $(shell pkg-config --cflags $(2) --silence-errors) + $(1)_LIBS := $(shell pkg-config --libs $(2) --silence-errors) + endif $(call have_lib,$(1)) -endif endef # Find binary -- GitLab