]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
build: cleanup in make rules
authorMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 27 Apr 2015 14:19:32 +0000 (16:19 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 27 Apr 2015 14:19:32 +0000 (16:19 +0200)
platform.mk

index f47bbffe589afe43e83a4d6e139b58f582414889..9ce10ca5482eea50af2f341c1dd1e71311db852a 100644 (file)
@@ -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