]> git.droids-corp.org - dpdk.git/commitdiff
examples: fix pkg-config detection with older make
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 3 Jul 2019 16:40:00 +0000 (17:40 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 3 Jul 2019 21:10:23 +0000 (23:10 +0200)
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>
42 files changed:
examples/bbdev_app/Makefile
examples/bond/Makefile
examples/cmdline/Makefile
examples/distributor/Makefile
examples/eventdev_pipeline/Makefile
examples/exception_path/Makefile
examples/fips_validation/Makefile
examples/flow_classify/Makefile
examples/flow_filtering/Makefile
examples/helloworld/Makefile
examples/ip_fragmentation/Makefile
examples/ip_pipeline/Makefile
examples/ip_reassembly/Makefile
examples/ipsec-secgw/Makefile
examples/ipv4_multicast/Makefile
examples/kni/Makefile
examples/l2fwd-cat/Makefile
examples/l2fwd-crypto/Makefile
examples/l2fwd-jobstats/Makefile
examples/l2fwd-keepalive/Makefile
examples/l2fwd/Makefile
examples/l3fwd-acl/Makefile
examples/l3fwd-power/Makefile
examples/l3fwd-vf/Makefile
examples/l3fwd/Makefile
examples/link_status_interrupt/Makefile
examples/load_balancer/Makefile
examples/packet_ordering/Makefile
examples/ptpclient/Makefile
examples/qos_meter/Makefile
examples/qos_sched/Makefile
examples/rxtx_callbacks/Makefile
examples/service_cores/Makefile
examples/skeleton/Makefile
examples/tep_termination/Makefile
examples/timer/Makefile
examples/vdpa/Makefile
examples/vhost/Makefile
examples/vhost_crypto/Makefile
examples/vhost_scsi/Makefile
examples/vmdq/Makefile
examples/vmdq_dcb/Makefile

index 2bf97e415a4e1c42960458a25cf094812cc468f5..715c521a964ee0687a94fe3084906e3e43cc8103 100644 (file)
@@ -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
index 96868f2fc6743500ee8e89cae65a03985e72795a..0229b31bb109695c6a071460d42af9d4a8026303 100644 (file)
@@ -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
index 9b757316fb00cea39c00a7bae4bc2004badbad48..c1852080abc2f30184bdc2b35d84bd5ca80c95ac 100644 (file)
@@ -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
index 6aa5e7a9e4e1ea4bc5725c7c769470ae7f2b8efa..bac8d5578e70f6a6712957669ff370c37bea74fc 100644 (file)
@@ -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
index 626d5602447b07cd973cec78e0cf65e2aca7a17c..205145853659e017ca43b687ff0544e11f239aaf 100644 (file)
@@ -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
index dc891b3d1ca16cf8110c6867aed42a1822d0cb62..90c7f133a8774ab19c46b1d1640f0ea7564b9bf1 100644 (file)
@@ -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
index f8cbba59214045061559d9e76ef2c8afbaf552f6..9485daf7a40232d67e93a6f85f0e9b80b5ca9d69 100644 (file)
@@ -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
index aca7772b4d4daad75b0bf66e0a07ea852147b2c5..4c23e5c6d1b1edc765a3758487e08c04e5a26d2d 100644 (file)
@@ -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
index a64a10a08703355aa676ed214ba81dc51689de74..a63a755550aa56a2395a2c39bb56d1c283a898e5 100644 (file)
@@ -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
index 2ab2940916750469856369760035135124b9447b..403afa05046c22dd536feef97831e4b612a60ece 100644 (file)
@@ -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
index 63b66ce251727b6b4fbcfa8f89167bd441b57b3f..6af25a02e20d838f9039646522add15fba283a11 100644 (file)
@@ -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
index 1553d705dbcf34c426afdb2bec3467c16e8bb841..cf10d7180872e3c701b0928c12738989fa9b3f0e 100644 (file)
@@ -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
index 5af5d63bd2bf865039d408fa7f379627b0abd841..0b1a904e0734ac583c1f714acc4a176c906fb9ff 100644 (file)
@@ -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
index 1bfaf3b9ade2b0971aac0c15535828bc7e5b6fd8..851123be58ae43cc9255e93913530c9351c7242d 100644 (file)
@@ -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
index a03bfadbff6f95f489f5211878607ffd098298dd..5f8a67dd4edfd131f9c19395078f853bd9e7a7f8 100644 (file)
@@ -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
index 46f5926922c602b209c5506beed1c599d6de9588..5dc8118e312a122e3b7e43f2b3f3a70c972c797b 100644 (file)
@@ -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
index e83d406b0491d0f86ad56b3558b268d2a70a38e2..c1960d6d34d67c1773fa356cb334b891c3576f1d 100644 (file)
@@ -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
index 87d311193a8f1855431d4923353d4719a098c767..29fd530b47dd758fc74599b746163fb4da7c69da 100644 (file)
@@ -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
index d63ece8e37eb2f105011246a0a184b6234466bc0..729a39e93b5ed692069fb8dc1e5586933b338fe0 100644 (file)
@@ -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
index 9b92bc238c0bcd1f24489631e9bcb1d45c09513b..37de27a6f49ca00b70565344bc0c4777d0b9113c 100644 (file)
@@ -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
index fb352e1b7b31bc793c796748e87af0aef0a7021b..230352093837daf3f4fb44a985bc39b08fef0360 100644 (file)
@@ -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
index d12d3a987cb44b8469df49f6cb8c95e89234597a..e2c989f717cf5b338a524c929c36339c84a91127 100644 (file)
@@ -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
index 359f323dc880c4057915ce6ec94492e2404b73fb..98248f462ab14e7b14e54a3d460fd0a8685afb9d 100644 (file)
@@ -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
index 892ecf38b9ffa9b735b0741b1186cc4509cd06d0..7b186a23cbe1aaea4b8e1419cb4124e7c95e5242 100644 (file)
@@ -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
index 52976880ac1c69ee3a295c2c545d6e35ed3b6fd1..c55f5c2888d98b948ad57018c92c9d9b9ba31116 100644 (file)
@@ -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
index 77774eda76569f2c1ed0053bd0c776163f6711e4..97e5a14a838eae9c16a97cb2a9b28a31b57a3a84 100644 (file)
@@ -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
index 09676a57c6a613d1943a90915048c8e3612012e6..caae8a1071a842ba79356b18d065e8e32e53b612 100644 (file)
@@ -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
index eb01b2d5b29103705ae480e2ad2332b24d9817b6..51acaf7ebec3797fee2f7538712d885451c015f8 100644 (file)
@@ -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
index 019476a7af852a0465208ea796fd27cf85e405c8..89e2bacbdaa14a11b9fa5846b083ea7cfb786b49 100644 (file)
@@ -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
index e4d170177c7885fd41b2983c6322f4b657e270f6..e5217cf7c0f991403d7ab3c60869498e04552d57 100644 (file)
@@ -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
index 0c92c48667561d9f5584e1a5b505206edb2a7754..ce2d253715add3bbe47c1c5e683d32a2a7d74ebd 100644 (file)
@@ -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
index 2ababd2e4005de98e2db8c1da26344f9bb17c27b..edd5b52cd6570ee038be4782063f04ca52b50b7b 100644 (file)
@@ -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
index ae7d6478cbcdc1d2a91d049a5b1120165a7d1d7c..abbb7aed22ae86aee15bc39ca8317ce61bde560c 100644 (file)
@@ -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
index 68454a558fa2ce01928971f768c49780a8fec316..c5ac2602938182092ec2cb6499a0d2b507cb9e37 100644 (file)
@@ -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
index be5aa9a641db237acbf881b4ce262b2fe0ae6591..31165bd92a3d6e402f7768eb59354d465f2079d3 100644 (file)
@@ -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
index d21e4c63c2b6db2f98c3ede2bb147c931468426d..a861783551bd6aa6f024f66f3035dfa2bc2c928a 100644 (file)
@@ -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
index 734042380797412ab187064574a54af4e31fa783..2ac991a4beb7343701638659cc58fe5eaa52e1fd 100644 (file)
@@ -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
index 5e14006782e3016e2adbfcbaa4aac48040437ca9..f84b7f01720cec170c0458c768ef0a7018870f1f 100644 (file)
@@ -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
index e7958b5ba21f3688ca41ab33bcbe07de9d282d2a..a9e1c4d3af6b9183b2814bcdb49e98e469f37b47 100644 (file)
@@ -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
index 3ea37ebc6f246c2bb2e66d03aecdaddb26e16462..c5aec269e90d65ad3bb5311ecb04b9809b5e4c86 100644 (file)
@@ -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
index dc1bc82d06f8ee57db77c9f045443328303ce60f..1557ee86bff519790c720397f0504c8a1e5c643a 100644 (file)
@@ -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
index a77e7898742e7cff171f3f8220ec1476b4ac54f9..391096cfb7b1f72dcad7ff4d47eb1de79f71adbc 100644 (file)
@@ -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