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 a5414a6 commit f97cc59
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ SCSI_DH_MODULES_PRELOAD :=

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

# PKGCONFIG must be read from the environment to enable compilation
# PKG_CONFIG must be read from the environment to enable compilation
# in Debian multiarch setups
PKGCONFIG ?= pkg-config
PKG_CONFIG ?= pkg-config

ifeq ($(TOPDIR),)
TOPDIR = ..
Expand Down Expand Up @@ -56,8 +56,8 @@ pkgconfdir := $(usrlibdir)/pkgconfig
plugindir := $(prefix)/$(LIB)/multipath
configdir := $(prefix)/etc/multipath/conf.d
runtimedir := $(if $(shell test -L /var/run -o ! -d /var/run && echo 1),/run,/var/run)
devmapper_incdir := $(or $(shell $(PKGCONFIG) --variable=includedir devmapper),/usr/include)
libudev_incdir := $(or $(shell $(PKGCONFIG) --variable=includedir libudev),/usr/include)
devmapper_incdir := $(or $(shell $(PKG_CONFIG) --variable=includedir devmapper),/usr/include)
libudev_incdir := $(or $(shell $(PKG_CONFIG) --variable=includedir libudev),/usr/include)
kernel_incdir := /usr/include

ifeq ($(V),)
Expand Down
6 changes: 3 additions & 3 deletions create-config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ifneq ($(call check_var,ELS_DTAG_LNK_INTEGRITY,$(kernel_incdir)/scsi/fc/fc_els.h
FPIN_SUPPORT = 1
endif

libmount_h := $(shell $(PKGCONFIG) --variable=includedir mount)/libmount/libmount.h
libmount_h := $(shell $(PKG_CONFIG) --variable=includedir mount)/libmount/libmount.h
ifneq ($(call check_func,mnt_unref_cache,$(libmount_h)),0)
DEFINES += LIBMOUNT_HAS_MNT_UNREF_CACHE
endif
Expand All @@ -117,13 +117,13 @@ ifneq ($(call check_file,$(kernel_incdir)/linux/nvme_ioctl.h),0)
ANA_SUPPORT := 1
endif

ENABLE_LIBDMMP := $(call check_cmd,$(PKGCONFIG) --exists json-c)
ENABLE_LIBDMMP := $(call check_cmd,$(PKG_CONFIG) --exists json-c)

ifeq ($(ENABLE_DMEVENTS_POLL),0)
DEFINES += -DNO_DMEVENTS_POLL
endif

SYSTEMD := $(strip $(or $(shell $(PKGCONFIG) --modversion libsystemd 2>/dev/null | awk '{print $$1}'), \
SYSTEMD := $(strip $(or $(shell $(PKG_CONFIG) --modversion libsystemd 2>/dev/null | awk '{print $$1}'), \
$(shell systemctl --version 2>/dev/null | sed -n 's/systemd \([0-9]*\).*/\1/p')))


Expand Down
4 changes: 2 additions & 2 deletions libdmmp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,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 @@ -4,7 +4,7 @@ EXEC := multipathd
CLI := multipathc

CPPFLAGS += -I$(multipathdir) -I$(mpathutildir) -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); }') \
-DBINDIR='"$(bindir)"' $(SYSTEMD_CPPFLAGS)

Expand Down

0 comments on commit f97cc59

Please sign in to comment.