Blame SOURCES/0086-ndctl-update-README.md-for-meson-build.patch

2eb93d
From 351badda9e5b6454e56f31992e9325c4656680bd Mon Sep 17 00:00:00 2001
2eb93d
From: Vishal Verma <vishal.l.verma@intel.com>
2eb93d
Date: Fri, 14 Jan 2022 18:32:29 -0700
2eb93d
Subject: [PATCH 086/217] ndctl: update README.md for meson build
2eb93d
2eb93d
Update the README to replace the autotools build and test instructions
2eb93d
with meson equivalents. Also provide an example for setting meson
2eb93d
configuration options by illustrating the destructive unit tests use
2eb93d
case.
2eb93d
2eb93d
Link: https://lore.kernel.org/r/20220115013229.1604139-1-vishal.l.verma@intel.com
2eb93d
Cc: Dan Williams <dan.j.williams@intel.com>
2eb93d
Reported-by: Alison Schofield <alison.schofield@intel.com>
2eb93d
Reported-by: Jane Chu <jane.chu@oracle.com>
2eb93d
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
2eb93d
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2eb93d
---
2eb93d
 README.md | 33 ++++++++++++++++++++++-----------
2eb93d
 1 file changed, 22 insertions(+), 11 deletions(-)
2eb93d
2eb93d
diff --git a/README.md b/README.md
2eb93d
index 6f36a6d..f3fe65b 100644
2eb93d
--- a/README.md
2eb93d
+++ b/README.md
2eb93d
@@ -9,11 +9,14 @@ Build
2eb93d
 =====
2eb93d
 
2eb93d
 ```
2eb93d
-./autogen.sh
2eb93d
-./configure CFLAGS='-g -O2' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64
2eb93d
-make
2eb93d
-make check
2eb93d
-sudo make install
2eb93d
+meson setup build;
2eb93d
+meson compile -C build;
2eb93d
+```
2eb93d
+
2eb93d
+Optionally, to install:
2eb93d
+
2eb93d
+```
2eb93d
+meson install -C build
2eb93d
 ```
2eb93d
 
2eb93d
 There are a number of packages required for the build steps that may not
2eb93d
@@ -34,7 +37,7 @@ https://nvdimm.wiki.kernel.org/start
2eb93d
 
2eb93d
 Unit Tests
2eb93d
 ==========
2eb93d
-The unit tests run by `make check` require the nfit_test.ko module to be
2eb93d
+The unit tests run by `meson test` require the nfit_test.ko module to be
2eb93d
 loaded.  To build and install nfit_test.ko:
2eb93d
 
2eb93d
 1. Obtain the kernel source.  For example,  
2eb93d
@@ -78,8 +81,16 @@ loaded.  To build and install nfit_test.ko:
2eb93d
    sudo make modules_install
2eb93d
    ```
2eb93d
 
2eb93d
-1. Now run `make check` in the ndctl source directory, or `ndctl test`,
2eb93d
-   if ndctl was built with `--enable-test`.
2eb93d
+1. Now run `meson test -C build` in the ndctl source directory, or `ndctl test`,
2eb93d
+   if ndctl was built with `-Dtest=enabled` as a configuration option to meson.
2eb93d
+
2eb93d
+1. To run the 'destructive' set of tests that may clobber existing pmem
2eb93d
+   configurations and data, configure meson with the destructive option after the
2eb93d
+   `meson setup` step:
2eb93d
+
2eb93d
+   ```
2eb93d
+   meson configure -Dtest=enabled -Ddestructive=enabled build;
2eb93d
+   ```
2eb93d
 
2eb93d
 Troubleshooting
2eb93d
 ===============
2eb93d
@@ -87,9 +98,9 @@ Troubleshooting
2eb93d
 The unit tests will validate that the environment is set up correctly
2eb93d
 before they try to run. If the platform is misconfigured, i.e. the unit
2eb93d
 test modules are not available, or the test versions of the modules are
2eb93d
-superseded by the "in-tree/production" version of the modules `make
2eb93d
-check` will skip tests and report a message like the following in
2eb93d
-test/test-suite.log:  
2eb93d
+superseded by the "in-tree/production" version of the modules `meson
2eb93d
+test` will skip tests and report a message like the following in
2eb93d
+`build/meson-logs/testlog.txt`
2eb93d
 
2eb93d
 ```
2eb93d
 SKIP: libndctl
2eb93d
-- 
2eb93d
2.27.0
2eb93d