[dm-devel] [PATCH 1/7] multipath-tools Makefiles: make pkg-config configurable

Xose Vazquez Perez xose.vazquez at gmail.com
Mon Mar 29 15:44:55 UTC 2021


On 3/26/21 10:29 PM, mwilck at suse.com wrote:

> From: Martin Wilck <mwilck at suse.com>
> 
> This is useful for building in a cross-compilation environment.

Debian has a similar patch:
https://salsa.debian.org/linux-blocks-team/multipath-tools/-/blob/master/debian/patches/0008-Bug-916521-FTCBFS-uses-the-wrong-pkg-config.patch


> Signed-off-by: Martin Wilck <mwilck at suse.com>
> ---
>   Makefile.inc     | 6 ++++--
>   libdmmp/Makefile | 4 ++--
>   2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile.inc b/Makefile.inc
> index 0542930..f1e2313 100644
> --- a/Makefile.inc
> +++ b/Makefile.inc
> @@ -15,6 +15,8 @@
>   # Uncomment to disable dmevents polling support
>   # ENABLE_DMEVENTS_POLL = 0
>   
> +PKGCONFIG	?= pkg-config
> +
>   ifeq ($(TOPDIR),)
>   	TOPDIR	= ..
>   endif
> @@ -36,8 +38,8 @@ ifndef RUN
>   endif
>   
>   ifndef SYSTEMD
> -	ifeq ($(shell pkg-config --modversion libsystemd >/dev/null 2>&1 && echo 1), 1)
> -		SYSTEMD = $(shell pkg-config --modversion libsystemd | awk '{print $$1}')
> +	ifeq ($(shell $(PKGCONFIG) --modversion libsystemd >/dev/null 2>&1 && echo 1), 1)
> +		SYSTEMD = $(shell $(PKGCONFIG) --modversion libsystemd | awk '{print $$1}')
>   	else
>   		ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1)
>   			SYSTEMD = $(shell systemctl --version 2> /dev/null | \
> diff --git a/libdmmp/Makefile b/libdmmp/Makefile
> index 1dd3f34..4175c3f 100644
> --- a/libdmmp/Makefile
> +++ b/libdmmp/Makefile
> @@ -16,9 +16,9 @@ HEADERS = libdmmp/libdmmp.h
>   OBJS = libdmmp.o libdmmp_mp.o libdmmp_pg.o libdmmp_path.o libdmmp_misc.o
>   
>   CFLAGS += $(LIB_CFLAGS) -fvisibility=hidden -I$(libdmmpdir) -I$(mpathcmddir) \
> -	  $(shell pkg-config --cflags json-c)
> +	  $(shell $(PKGCONFIG) --cflags json-c)
>   
> -LIBDEPS += $(shell pkg-config --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread
> +LIBDEPS += $(shell $(PKGCONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread
>   
>   all: $(LIBS) doc
>   
> 




More information about the dm-devel mailing list