Skip to content

Commit

Permalink
multipath-tools build: rename PKGCONFIG to PKG_CONFIG
Browse files Browse the repository at this point in the history
Debian's build system helpers automatically set "PKG_CONFIG" correctly, so it
would be convenient for Debian to use this name instead of "PKGCONFIG".

The majority of projects also seem to call this makefile variable "PKG_CONFIG".

Signed-off-by: Chris Hofstaedtler <[email protected]>
Acked-by: Sam James <[email protected]>
Reviewed-by: Martin Wilck <[email protected]>
  • Loading branch information
zeha authored and mwilck committed Jul 3, 2023
1 parent b5e00fd commit 308c007
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SCSI_DH_MODULES_PRELOAD :=

EXTRAVERSION := $(shell rev=$$(git rev-parse --short=7 HEAD 2>/dev/null); echo $${rev:+-g$$rev})

PKGCONFIG ?= pkg-config
PKG_CONFIG ?= pkg-config

ifeq ($(TOPDIR),)
TOPDIR = ..
Expand All @@ -43,8 +43,8 @@ ifndef RUN
endif

ifndef SYSTEMD
ifeq ($(shell $(PKGCONFIG) --modversion libsystemd >/dev/null 2>&1 && echo 1), 1)
SYSTEMD = $(shell $(PKGCONFIG) --modversion libsystemd | awk '{print $$1}')
ifeq ($(shell $(PKG_CONFIG) --modversion libsystemd >/dev/null 2>&1 && echo 1), 1)
SYSTEMD = $(shell $(PKG_CONFIG) --modversion libsystemd | awk '{print $$1}')
else
ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1)
SYSTEMD = $(shell systemctl --version 2> /dev/null | \
Expand All @@ -58,16 +58,16 @@ ifndef SYSTEMDPATH
endif

ifndef DEVMAPPER_INCDIR
ifeq ($(shell $(PKGCONFIG) --modversion devmapper >/dev/null 2>&1 && echo 1), 1)
DEVMAPPER_INCDIR = $(shell $(PKGCONFIG) --variable=includedir devmapper)
ifeq ($(shell $(PKG_CONFIG) --modversion devmapper >/dev/null 2>&1 && echo 1), 1)
DEVMAPPER_INCDIR = $(shell $(PKG_CONFIG) --variable=includedir devmapper)
else
DEVMAPPER_INCDIR = /usr/include
endif
endif

ifndef LIBUDEV_INCDIR
ifeq ($(shell $(PKGCONFIG) --modversion libudev >/dev/null 2>&1 && echo 1), 1)
LIBUDEV_INCDIR = $(shell $(PKGCONFIG) --variable=includedir libudev)
ifeq ($(shell $(PKG_CONFIG) --modversion libudev >/dev/null 2>&1 && echo 1), 1)
LIBUDEV_INCDIR = $(shell $(PKG_CONFIG) --variable=includedir libudev)
else
LIBUDEV_INCDIR = /usr/include
endif
Expand Down
4 changes: 2 additions & 2 deletions libdmmp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ HEADERS = libdmmp/libdmmp.h

OBJS = libdmmp.o libdmmp_mp.o libdmmp_pg.o libdmmp_path.o libdmmp_misc.o

CPPFLAGS += -I$(libdmmpdir) -I$(mpathcmddir) $(shell $(PKGCONFIG) --cflags json-c)
CPPFLAGS += -I$(libdmmpdir) -I$(mpathcmddir) $(shell $(PKG_CONFIG) --cflags json-c)
CFLAGS += $(LIB_CFLAGS) -fvisibility=hidden

LIBDEPS += $(shell $(PKGCONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread
LIBDEPS += $(shell $(PKG_CONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread

all: $(LIBS) doc
.PHONY: doc clean install uninstall check speed_test dep_clean
Expand Down
2 changes: 1 addition & 1 deletion multipathd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif
#CPPFLAGS += -DLOGDBG

CPPFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir) -I$(thirdpartydir) \
$(shell $(PKGCONFIG) --modversion liburcu 2>/dev/null | \
$(shell $(PKG_CONFIG) --modversion liburcu 2>/dev/null | \
awk -F. '{ printf("-DURCU_VERSION=0x%06x", 256 * ( 256 * $$1 + $$2) + $$3); }')
CFLAGS += $(BIN_CFLAGS)
LDFLAGS += $(BIN_LDFLAGS)
Expand Down

0 comments on commit 308c007

Please sign in to comment.