summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2019-07-03 17:40:00 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-07-03 23:10:23 +0200
commit4131ad5db79a016970287282b938ebed2f19bdb3 (patch)
tree61dd45e805982b1e5ebde59adcb07750066c2f61
parentfc4ebf78723ed359614fdde722e76272e79adc52 (diff)
downloaddpdk-4131ad5db79a016970287282b938ebed2f19bdb3.zip
dpdk-4131ad5db79a016970287282b938ebed2f19bdb3.tar.gz
dpdk-4131ad5db79a016970287282b938ebed2f19bdb3.tar.xz
examples: fix pkg-config detection with older make
Make versions before 4.2 did not have support for the .SHELLSTATUS variable, so use another method to detect shell success. Fixes: 22119c4591a0 ("examples: use pkg-config in makefiles") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
-rw-r--r--examples/bbdev_app/Makefile3
-rw-r--r--examples/bond/Makefile3
-rw-r--r--examples/cmdline/Makefile3
-rw-r--r--examples/distributor/Makefile3
-rw-r--r--examples/eventdev_pipeline/Makefile3
-rw-r--r--examples/exception_path/Makefile3
-rw-r--r--examples/fips_validation/Makefile3
-rw-r--r--examples/flow_classify/Makefile3
-rw-r--r--examples/flow_filtering/Makefile3
-rw-r--r--examples/helloworld/Makefile3
-rw-r--r--examples/ip_fragmentation/Makefile3
-rw-r--r--examples/ip_pipeline/Makefile3
-rw-r--r--examples/ip_reassembly/Makefile3
-rw-r--r--examples/ipsec-secgw/Makefile3
-rw-r--r--examples/ipv4_multicast/Makefile3
-rw-r--r--examples/kni/Makefile3
-rw-r--r--examples/l2fwd-cat/Makefile3
-rw-r--r--examples/l2fwd-crypto/Makefile3
-rw-r--r--examples/l2fwd-jobstats/Makefile3
-rw-r--r--examples/l2fwd-keepalive/Makefile3
-rw-r--r--examples/l2fwd/Makefile3
-rw-r--r--examples/l3fwd-acl/Makefile3
-rw-r--r--examples/l3fwd-power/Makefile3
-rw-r--r--examples/l3fwd-vf/Makefile3
-rw-r--r--examples/l3fwd/Makefile3
-rw-r--r--examples/link_status_interrupt/Makefile3
-rw-r--r--examples/load_balancer/Makefile3
-rw-r--r--examples/packet_ordering/Makefile3
-rw-r--r--examples/ptpclient/Makefile3
-rw-r--r--examples/qos_meter/Makefile3
-rw-r--r--examples/qos_sched/Makefile3
-rw-r--r--examples/rxtx_callbacks/Makefile3
-rw-r--r--examples/service_cores/Makefile3
-rw-r--r--examples/skeleton/Makefile3
-rw-r--r--examples/tep_termination/Makefile3
-rw-r--r--examples/timer/Makefile3
-rw-r--r--examples/vdpa/Makefile3
-rw-r--r--examples/vhost/Makefile3
-rw-r--r--examples/vhost_crypto/Makefile3
-rw-r--r--examples/vhost_scsi/Makefile3
-rw-r--r--examples/vmdq/Makefile3
-rw-r--r--examples/vmdq_dcb/Makefile3
42 files changed, 42 insertions, 84 deletions
diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile
index 2bf97e4..715c521 100644
--- a/examples/bbdev_app/Makefile
+++ b/examples/bbdev_app/Makefile
@@ -8,8 +8,7 @@ APP = bbdev
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/bond/Makefile b/examples/bond/Makefile
index 96868f2..0229b31 100644
--- a/examples/bond/Makefile
+++ b/examples/bond/Makefile
@@ -8,8 +8,7 @@ APP = bond_app
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile
index 9b75731..c185208 100644
--- a/examples/cmdline/Makefile
+++ b/examples/cmdline/Makefile
@@ -8,8 +8,7 @@ APP = cmdline
SRCS-y := main.c commands.c parse_obj_list.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index 6aa5e7a..bac8d55 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -8,8 +8,7 @@ APP = distributor_app
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile
index 626d560..2051458 100644
--- a/examples/eventdev_pipeline/Makefile
+++ b/examples/eventdev_pipeline/Makefile
@@ -10,8 +10,7 @@ SRCS-y += pipeline_worker_generic.c
SRCS-y += pipeline_worker_tx.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index dc891b3..90c7f13 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -8,8 +8,7 @@ APP = exception_path
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index f8cbba5..9485daf 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -17,8 +17,7 @@ SRCS-y += fips_dev_self_test.c
SRCS-y += main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile
index aca7772..4c23e5c 100644
--- a/examples/flow_classify/Makefile
+++ b/examples/flow_classify/Makefile
@@ -8,8 +8,7 @@ APP = flow_classify
SRCS-y := flow_classify.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index a64a10a..a63a755 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -6,8 +6,7 @@ APP = flow
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index 2ab2940..403afa0 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -8,8 +8,7 @@ APP = helloworld
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile
index 63b66ce..6af25a0 100644
--- a/examples/ip_fragmentation/Makefile
+++ b/examples/ip_fragmentation/Makefile
@@ -9,8 +9,7 @@ APP = ip_fragmentation
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 1553d70..cf10d71 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -21,8 +21,7 @@ SRCS-y += tmgr.c
SRCS-y += cryptodev.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 5af5d63..0b1a904 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -9,8 +9,7 @@ APP = ip_reassembly
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile
index 1bfaf3b..851123b 100644
--- a/examples/ipsec-secgw/Makefile
+++ b/examples/ipsec-secgw/Makefile
@@ -19,8 +19,7 @@ SRCS-y += ipsec-secgw.c
CFLAGS += -gdwarf-2
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index a03bfad..5f8a67d 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -9,8 +9,7 @@ APP = ipv4_multicast
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index 46f5926..5dc8118 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -8,8 +8,7 @@ APP = kni
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index e83d406..c1960d6 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -8,8 +8,7 @@ APP = l2fwd-cat
SRCS-y := l2fwd-cat.c cat.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index 87d3111..29fd530 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -8,8 +8,7 @@ APP = l2fwd-crypto
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index d63ece8..729a39e 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -8,8 +8,7 @@ APP = l2fwd-jobstats
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 9b92bc2..37de27a 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -8,8 +8,7 @@ APP = l2fwd-keepalive
SRCS-y := main.c shm.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index fb352e1..2303520 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -8,8 +8,7 @@ APP = l2fwd
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index d12d3a9..e2c989f 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -8,8 +8,7 @@ APP = l3fwd-acl
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile
index 359f323..98248f4 100644
--- a/examples/l3fwd-power/Makefile
+++ b/examples/l3fwd-power/Makefile
@@ -8,8 +8,7 @@ APP = l3fwd-power
SRCS-y := main.c perf_core.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index 892ecf3..7b186a2 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -8,8 +8,7 @@ APP = l3fwd-vf
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index 5297688..c55f5c2 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -8,8 +8,7 @@ APP = l3fwd
SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 77774ed..97e5a14 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -8,8 +8,7 @@ APP = link_status_interrupt
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index 09676a5..caae8a1 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -8,8 +8,7 @@ APP = load_balancer
SRCS-y := main.c config.c init.c runtime.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index eb01b2d..51acaf7 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -8,8 +8,7 @@ APP = packet_ordering
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 019476a..89e2bac 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -8,8 +8,7 @@ APP = ptpclient
SRCS-y := ptpclient.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index e4d1701..e5217cf 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -8,8 +8,7 @@ APP = qos_meter
SRCS-y := main.c rte_policer.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index 0c92c48..ce2d253 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -8,8 +8,7 @@ APP = qos_sched
SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index 2ababd2..edd5b52 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -8,8 +8,7 @@ APP = rxtx_callbacks
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile
index ae7d647..abbb7ae 100644
--- a/examples/service_cores/Makefile
+++ b/examples/service_cores/Makefile
@@ -8,8 +8,7 @@ APP = service_cores
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index 68454a5..c5ac260 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -8,8 +8,7 @@ APP = basicfwd
SRCS-y := basicfwd.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index be5aa9a..31165bd 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -8,8 +8,7 @@ APP = tep_termination
SRCS-y := main.c vxlan_setup.c vxlan.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index d21e4c6..a861783 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -8,8 +8,7 @@ APP = timer
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile
index 7340423..2ac991a 100644
--- a/examples/vdpa/Makefile
+++ b/examples/vdpa/Makefile
@@ -9,8 +9,7 @@ SRCS-y := main.c
CFLAGS += -DALLOW_EXPERIMENTAL_API
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index 5e14006..f84b7f0 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -8,8 +8,7 @@ APP = vhost-switch
SRCS-y := main.c virtio_net.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile
index e7958b5..a9e1c4d 100644
--- a/examples/vhost_crypto/Makefile
+++ b/examples/vhost_crypto/Makefile
@@ -9,8 +9,7 @@ SRCS-y := main.c
CFLAGS += -DALLOW_EXPERIMENTAL_API
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile
index 3ea37eb..c5aec26 100644
--- a/examples/vhost_scsi/Makefile
+++ b/examples/vhost_scsi/Makefile
@@ -8,8 +8,7 @@ APP = vhost-scsi
SRCS-y := scsi.c vhost_scsi.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index dc1bc82..1557ee8 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -8,8 +8,7 @@ APP = vmdq_app
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index a77e789..391096c 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -8,8 +8,7 @@ APP = vmdq_dcb_app
SRCS-y := main.c
# Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
all: shared
.PHONY: shared static