patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided
       [not found] ` <20190517114613.7027-1-bruce.richardson@intel.com>
@ 2019-05-17 11:46   ` Bruce Richardson
  2019-05-17 11:54     ` Bruce Richardson
  2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2019-05-17 11:46 UTC (permalink / raw)
  To: dev; +Cc: bluca, Bruce Richardson, stable

While the examples were being installed into the appropriate install path
when processing the examples/meson.build file, that file was only processed
if the "examples" meson parameter was non-empty. Since we now do more than
just build the examples, we need to unconditionally process the file.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 meson.build | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 46f9c5683..9cad43481 100644
--- a/meson.build
+++ b/meson.build
@@ -42,10 +42,9 @@ subdir('app')
 # build docs
 subdir('doc')
 
-# build any examples explicitly requested - useful for developers
-if get_option('examples') != ''
-	subdir('examples')
-endif
+# build any examples explicitly requested - useful for developers - and
+# install any example code into the appropriate install path
+subdir('examples')
 
 # build kernel modules if enabled
 if get_option('enable_kmods')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH v2 2/3] examples: remove auto-generation of examples list
       [not found] ` <20190517114613.7027-1-bruce.richardson@intel.com>
  2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
@ 2019-05-17 11:46   ` Bruce Richardson
  2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
       [not found]   ` <20190517120231.15898-1-bruce.richardson@intel.com>
  3 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2019-05-17 11:46 UTC (permalink / raw)
  To: dev; +Cc: bluca, Bruce Richardson, stable

The examples/meson.build file scanned the filesystem to find all examples
to build (for examples=all option) and install. However, using run_command
and scanning the filesystem prevented ninja from properly detecting the
addition or removal of any examples - one had to recreate the build
directory from scratch to guarantee correct detection of all examples. This
patch replaces this generated list with a static list of examples, thereby
allowing proper tracking by ninja/meson, but at the cost of having to
update this file when a new example is added or removed.

This also fixes an issue with Windows builds, since "sh" is not available
there.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 1a6134f12..8b6577cf7 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,9 +8,34 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-all_examples = run_command('sh', '-c',
-	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
-	).stdout().split()
+# list of all example apps. Keep 1-3 per line, in alphabetical order.
+all_examples = [
+	'bbdev_app', 'bond',
+	'bpf', 'cmdline',
+	'distributor', 'ethtool',
+	'eventdev_pipeline', 'exception_path',
+	'fips_validation', 'flow_classify',
+	'flow_filtering', 'helloworld',
+	'ip_fragmentation', 'ip_pipeline',
+	'ip_reassembly', 'ipsec-secgw',
+	'ipv4_multicast', 'kni',
+	'l2fwd', 'l2fwd-cat',
+	'l2fwd-crypto', 'l2fwd-jobstats',
+	'l2fwd-keepalive', 'l3fwd',
+	'l3fwd-acl', 'l3fwd-power',
+	'l3fwd-vf', 'link_status_interrupt',
+	'load_balancer', 'multi_process',
+	'netmap_compat', 'packet_ordering',
+	'performance-thread', 'ptpclient',
+	'qos_meter', 'qos_sched',
+	'quota_watermark', 'rxtx_callbacks',
+	'server_node_efd', 'service_cores',
+	'skeleton', 'tep_termination',
+	'timer', 'vdpa',
+	'vhost', 'vhost_crypto',
+	'vhost_scsi', 'vm_power_manager',
+	'vmdq', 'vmdq_dcb',
+]
 # install all example code on install - irrespective of whether the example in
 # question is to be built as part of this build or not.
 foreach ex:all_examples
-- 
2.21.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building
       [not found] ` <20190517114613.7027-1-bruce.richardson@intel.com>
  2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
  2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson
@ 2019-05-17 11:46   ` Bruce Richardson
       [not found]   ` <20190517120231.15898-1-bruce.richardson@intel.com>
  3 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2019-05-17 11:46 UTC (permalink / raw)
  To: dev; +Cc: bluca, Bruce Richardson, stable

The "make clean" command had a number of issues:
- the "--ignore-fail-on-non-empty" flag is not present on BSD
- the call to remove the build folder would fail if there was no build
  folder present.

These are fixed by only removing the build folder if it exists, and by
using -p flag to rmdir in place of --ignore-fail-on-non-empty

Fixes: 22119c4591a0 ("examples: use pkg-config in makefiles")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/bbdev_app/Makefile             | 2 +-
 examples/bond/Makefile                  | 2 +-
 examples/cmdline/Makefile               | 2 +-
 examples/distributor/Makefile           | 2 +-
 examples/eventdev_pipeline/Makefile     | 2 +-
 examples/exception_path/Makefile        | 2 +-
 examples/fips_validation/Makefile       | 2 +-
 examples/flow_classify/Makefile         | 2 +-
 examples/flow_filtering/Makefile        | 2 +-
 examples/helloworld/Makefile            | 2 +-
 examples/ip_fragmentation/Makefile      | 2 +-
 examples/ip_pipeline/Makefile           | 2 +-
 examples/ip_reassembly/Makefile         | 2 +-
 examples/ipsec-secgw/Makefile           | 2 +-
 examples/ipv4_multicast/Makefile        | 2 +-
 examples/kni/Makefile                   | 2 +-
 examples/l2fwd-cat/Makefile             | 2 +-
 examples/l2fwd-crypto/Makefile          | 2 +-
 examples/l2fwd-jobstats/Makefile        | 2 +-
 examples/l2fwd-keepalive/Makefile       | 2 +-
 examples/l2fwd/Makefile                 | 2 +-
 examples/l3fwd-acl/Makefile             | 2 +-
 examples/l3fwd-power/Makefile           | 2 +-
 examples/l3fwd-vf/Makefile              | 2 +-
 examples/l3fwd/Makefile                 | 2 +-
 examples/link_status_interrupt/Makefile | 2 +-
 examples/load_balancer/Makefile         | 2 +-
 examples/packet_ordering/Makefile       | 2 +-
 examples/ptpclient/Makefile             | 2 +-
 examples/qos_meter/Makefile             | 2 +-
 examples/qos_sched/Makefile             | 2 +-
 examples/rxtx_callbacks/Makefile        | 2 +-
 examples/service_cores/Makefile         | 2 +-
 examples/skeleton/Makefile              | 2 +-
 examples/tep_termination/Makefile       | 2 +-
 examples/timer/Makefile                 | 2 +-
 examples/vhost/Makefile                 | 2 +-
 examples/vhost_scsi/Makefile            | 2 +-
 examples/vmdq/Makefile                  | 2 +-
 examples/vmdq_dcb/Makefile              | 2 +-
 40 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile
index e8115b46a..af313d926 100644
--- a/examples/bbdev_app/Makefile
+++ b/examples/bbdev_app/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/bond/Makefile b/examples/bond/Makefile
index 488eeac70..278b5f690 100644
--- a/examples/bond/Makefile
+++ b/examples/bond/Makefile
@@ -39,7 +39,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile
index a03dfa8ee..03d9ed3cc 100644
--- a/examples/cmdline/Makefile
+++ b/examples/cmdline/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index 52076214b..2edc0ea3d 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile
index 0b0d1ade9..1d3394947 100644
--- a/examples/eventdev_pipeline/Makefile
+++ b/examples/eventdev_pipeline/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 18db85ddb..c3ba2787c 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index e74252e27..19240911a 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -44,7 +44,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile
index dfce1a4bd..182debcba 100644
--- a/examples/flow_classify/Makefile
+++ b/examples/flow_classify/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index f657c0336..b182a2a29 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -33,7 +33,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index 97d82f68a..980b011fc 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile
index 6d1a1fbba..56726d688 100644
--- a/examples/ip_fragmentation/Makefile
+++ b/examples/ip_fragmentation/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 409966afd..acd93e29b 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -55,7 +55,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP)* build/*.o
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 7bbc241c7..1baec86ad 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile
index 75f2bcd00..a2d8244e8 100644
--- a/examples/ipsec-secgw/Makefile
+++ b/examples/ipsec-secgw/Makefile
@@ -48,7 +48,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 5a1e368fa..5595b9cbf 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index 634334f86..e01703567 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index fb3c4bc00..b4f729a66 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index ed5e2c73f..3986a4c10 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index e14c3a2b2..4517a3d7d 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index bc851b732..56d0e0666 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 94d70a43e..43277318f 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index fc236f129..b38343725 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile
index a106b0404..8a4eee8ae 100644
--- a/examples/l3fwd-power/Makefile
+++ b/examples/l3fwd-power/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index cc93603e3..8ad2fbcbc 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index 8c51c7b96..dcc38a928 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index d12e04782..987724d47 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index d4b145ca1..935ee1591 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 474ec9571..2c3187a41 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index f113c9d56..857a679b7 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index fbcda09b2..7321f34f3 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index a25875900..7012c3d4c 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index b937d599b..22c4013db 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile
index 351fb7e1d..1dcd4c62e 100644
--- a/examples/service_cores/Makefile
+++ b/examples/service_cores/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index 56713a524..b9cd05f2f 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index f4b85e49b..3782378d9 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -39,7 +39,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index 046348fd1..f49703ff4 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index 80607b79c..9c3e0ece0 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -39,7 +39,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile
index 0a3450bae..813ab66a8 100644
--- a/examples/vhost_scsi/Makefile
+++ b/examples/vhost_scsi/Makefile
@@ -38,7 +38,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 6a389c776..b67d1937f 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 113bce7d1..0ddcc320b 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
-- 
2.21.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided
  2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
@ 2019-05-17 11:54     ` Bruce Richardson
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2019-05-17 11:54 UTC (permalink / raw)
  To: dev; +Cc: bluca, stable

On Fri, May 17, 2019 at 12:46:11PM +0100, Bruce Richardson wrote:
> While the examples were being installed into the appropriate install path
> when processing the examples/meson.build file, that file was only processed
> if the "examples" meson parameter was non-empty. Since we now do more than
> just build the examples, we need to unconditionally process the file.
> 
> Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
> 
> Cc: stable@dpdk.org
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  meson.build | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 46f9c5683..9cad43481 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -42,10 +42,9 @@ subdir('app')
>  # build docs
>  subdir('doc')
>  
> -# build any examples explicitly requested - useful for developers
> -if get_option('examples') != ''
> -	subdir('examples')
> -endif
> +# build any examples explicitly requested - useful for developers - and
> +# install any example code into the appropriate install path
> +subdir('examples')
>  
>  # build kernel modules if enabled
>  if get_option('enable_kmods')

Self-nak, sorry. Need to take account of an empty "examples" value inside
examples/meson.build.

V3 to follow soon. :-(

/Bruce

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided
       [not found]   ` <20190517120231.15898-1-bruce.richardson@intel.com>
@ 2019-05-17 12:02     ` Bruce Richardson
  2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson
  2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
  2 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2019-05-17 12:02 UTC (permalink / raw)
  To: dev; +Cc: bluca, Bruce Richardson, stable

While the examples were being installed into the appropriate install path
when processing the examples/meson.build file, that file was only processed
if the "examples" meson parameter was non-empty. Since we now do more than
just build the examples, we need to unconditionally process the file.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 4 ++++
 meson.build          | 7 +++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 1a6134f12..1995f4dcb 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -19,6 +19,10 @@ foreach ex:all_examples
 			exclude_files: 'meson.build')
 endforeach
 
+if get_option('examples') == ''
+	subdir_done()
+endif
+
 if get_option('examples').to_lower() == 'all'
 	examples = all_examples
 	allow_skips = true # don't flag an error if we can't build an app
diff --git a/meson.build b/meson.build
index 46f9c5683..9cad43481 100644
--- a/meson.build
+++ b/meson.build
@@ -42,10 +42,9 @@ subdir('app')
 # build docs
 subdir('doc')
 
-# build any examples explicitly requested - useful for developers
-if get_option('examples') != ''
-	subdir('examples')
-endif
+# build any examples explicitly requested - useful for developers - and
+# install any example code into the appropriate install path
+subdir('examples')
 
 # build kernel modules if enabled
 if get_option('enable_kmods')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH v3 2/3] examples: remove auto-generation of examples list
       [not found]   ` <20190517120231.15898-1-bruce.richardson@intel.com>
  2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
@ 2019-05-17 12:02     ` Bruce Richardson
  2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
  2 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2019-05-17 12:02 UTC (permalink / raw)
  To: dev; +Cc: bluca, Bruce Richardson, stable

The examples/meson.build file scanned the filesystem to find all examples
to build (for examples=all option) and install. However, using run_command
and scanning the filesystem prevented ninja from properly detecting the
addition or removal of any examples - one had to recreate the build
directory from scratch to guarantee correct detection of all examples. This
patch replaces this generated list with a static list of examples, thereby
allowing proper tracking by ninja/meson, but at the cost of having to
update this file when a new example is added or removed.

This also fixes an issue with Windows builds, since "sh" is not available
there.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 1995f4dcb..de35656d4 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,9 +8,34 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-all_examples = run_command('sh', '-c',
-	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
-	).stdout().split()
+# list of all example apps. Keep 1-3 per line, in alphabetical order.
+all_examples = [
+	'bbdev_app', 'bond',
+	'bpf', 'cmdline',
+	'distributor', 'ethtool',
+	'eventdev_pipeline', 'exception_path',
+	'fips_validation', 'flow_classify',
+	'flow_filtering', 'helloworld',
+	'ip_fragmentation', 'ip_pipeline',
+	'ip_reassembly', 'ipsec-secgw',
+	'ipv4_multicast', 'kni',
+	'l2fwd', 'l2fwd-cat',
+	'l2fwd-crypto', 'l2fwd-jobstats',
+	'l2fwd-keepalive', 'l3fwd',
+	'l3fwd-acl', 'l3fwd-power',
+	'l3fwd-vf', 'link_status_interrupt',
+	'load_balancer', 'multi_process',
+	'netmap_compat', 'packet_ordering',
+	'performance-thread', 'ptpclient',
+	'qos_meter', 'qos_sched',
+	'quota_watermark', 'rxtx_callbacks',
+	'server_node_efd', 'service_cores',
+	'skeleton', 'tep_termination',
+	'timer', 'vdpa',
+	'vhost', 'vhost_crypto',
+	'vhost_scsi', 'vm_power_manager',
+	'vmdq', 'vmdq_dcb',
+]
 # install all example code on install - irrespective of whether the example in
 # question is to be built as part of this build or not.
 foreach ex:all_examples
-- 
2.21.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building
       [not found]   ` <20190517120231.15898-1-bruce.richardson@intel.com>
  2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
  2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson
@ 2019-05-17 12:02     ` Bruce Richardson
  2 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2019-05-17 12:02 UTC (permalink / raw)
  To: dev; +Cc: bluca, Bruce Richardson, stable

The "make clean" command had a number of issues:
- the "--ignore-fail-on-non-empty" flag is not present on BSD
- the call to remove the build folder would fail if there was no build
  folder present.

These are fixed by only removing the build folder if it exists, and by
using -p flag to rmdir in place of --ignore-fail-on-non-empty

Fixes: 22119c4591a0 ("examples: use pkg-config in makefiles")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/bbdev_app/Makefile             | 2 +-
 examples/bond/Makefile                  | 2 +-
 examples/cmdline/Makefile               | 2 +-
 examples/distributor/Makefile           | 2 +-
 examples/eventdev_pipeline/Makefile     | 2 +-
 examples/exception_path/Makefile        | 2 +-
 examples/fips_validation/Makefile       | 2 +-
 examples/flow_classify/Makefile         | 2 +-
 examples/flow_filtering/Makefile        | 2 +-
 examples/helloworld/Makefile            | 2 +-
 examples/ip_fragmentation/Makefile      | 2 +-
 examples/ip_pipeline/Makefile           | 2 +-
 examples/ip_reassembly/Makefile         | 2 +-
 examples/ipsec-secgw/Makefile           | 2 +-
 examples/ipv4_multicast/Makefile        | 2 +-
 examples/kni/Makefile                   | 2 +-
 examples/l2fwd-cat/Makefile             | 2 +-
 examples/l2fwd-crypto/Makefile          | 2 +-
 examples/l2fwd-jobstats/Makefile        | 2 +-
 examples/l2fwd-keepalive/Makefile       | 2 +-
 examples/l2fwd/Makefile                 | 2 +-
 examples/l3fwd-acl/Makefile             | 2 +-
 examples/l3fwd-power/Makefile           | 2 +-
 examples/l3fwd-vf/Makefile              | 2 +-
 examples/l3fwd/Makefile                 | 2 +-
 examples/link_status_interrupt/Makefile | 2 +-
 examples/load_balancer/Makefile         | 2 +-
 examples/packet_ordering/Makefile       | 2 +-
 examples/ptpclient/Makefile             | 2 +-
 examples/qos_meter/Makefile             | 2 +-
 examples/qos_sched/Makefile             | 2 +-
 examples/rxtx_callbacks/Makefile        | 2 +-
 examples/service_cores/Makefile         | 2 +-
 examples/skeleton/Makefile              | 2 +-
 examples/tep_termination/Makefile       | 2 +-
 examples/timer/Makefile                 | 2 +-
 examples/vhost/Makefile                 | 2 +-
 examples/vhost_scsi/Makefile            | 2 +-
 examples/vmdq/Makefile                  | 2 +-
 examples/vmdq_dcb/Makefile              | 2 +-
 40 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile
index e8115b46a..af313d926 100644
--- a/examples/bbdev_app/Makefile
+++ b/examples/bbdev_app/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/bond/Makefile b/examples/bond/Makefile
index 488eeac70..278b5f690 100644
--- a/examples/bond/Makefile
+++ b/examples/bond/Makefile
@@ -39,7 +39,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile
index a03dfa8ee..03d9ed3cc 100644
--- a/examples/cmdline/Makefile
+++ b/examples/cmdline/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index 52076214b..2edc0ea3d 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile
index 0b0d1ade9..1d3394947 100644
--- a/examples/eventdev_pipeline/Makefile
+++ b/examples/eventdev_pipeline/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 18db85ddb..c3ba2787c 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index e74252e27..19240911a 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -44,7 +44,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile
index dfce1a4bd..182debcba 100644
--- a/examples/flow_classify/Makefile
+++ b/examples/flow_classify/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index f657c0336..b182a2a29 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -33,7 +33,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index 97d82f68a..980b011fc 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile
index 6d1a1fbba..56726d688 100644
--- a/examples/ip_fragmentation/Makefile
+++ b/examples/ip_fragmentation/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 409966afd..acd93e29b 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -55,7 +55,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP)* build/*.o
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 7bbc241c7..1baec86ad 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile
index 75f2bcd00..a2d8244e8 100644
--- a/examples/ipsec-secgw/Makefile
+++ b/examples/ipsec-secgw/Makefile
@@ -48,7 +48,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 5a1e368fa..5595b9cbf 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index 634334f86..e01703567 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index fb3c4bc00..b4f729a66 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index ed5e2c73f..3986a4c10 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index e14c3a2b2..4517a3d7d 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index bc851b732..56d0e0666 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 94d70a43e..43277318f 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index fc236f129..b38343725 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile
index a106b0404..8a4eee8ae 100644
--- a/examples/l3fwd-power/Makefile
+++ b/examples/l3fwd-power/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index cc93603e3..8ad2fbcbc 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index 8c51c7b96..dcc38a928 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index d12e04782..987724d47 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index d4b145ca1..935ee1591 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 474ec9571..2c3187a41 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index f113c9d56..857a679b7 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index fbcda09b2..7321f34f3 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index a25875900..7012c3d4c 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index b937d599b..22c4013db 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile
index 351fb7e1d..1dcd4c62e 100644
--- a/examples/service_cores/Makefile
+++ b/examples/service_cores/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else
 
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index 56713a524..b9cd05f2f 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index f4b85e49b..3782378d9 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -39,7 +39,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index 046348fd1..f49703ff4 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index 80607b79c..9c3e0ece0 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -39,7 +39,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile
index 0a3450bae..813ab66a8 100644
--- a/examples/vhost_scsi/Makefile
+++ b/examples/vhost_scsi/Makefile
@@ -38,7 +38,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 6a389c776..b67d1937f 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 113bce7d1..0ddcc320b 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -35,7 +35,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
-- 
2.21.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-17 12:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190503133537.58712-1-bruce.richardson@intel.com>
     [not found] ` <20190517114613.7027-1-bruce.richardson@intel.com>
2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
2019-05-17 11:54     ` Bruce Richardson
2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson
2019-05-17 11:46   ` [dpdk-stable] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
     [not found]   ` <20190517120231.15898-1-bruce.richardson@intel.com>
2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson
2019-05-17 12:02     ` [dpdk-stable] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).