Whamcloud - gitweb
LU-17058 build: add help and checkpatch as make targets 42/52142/3
authorTimothy Day <timday@amazon.com>
Mon, 28 Aug 2023 19:52:04 +0000 (19:52 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 6 Sep 2023 06:23:19 +0000 (06:23 +0000)
Add `make help` to print out available make targets. The
output is styled after the Linux kernel `make help`.
Add `make checkpatch` to run checkpatch.pl script
against most recent commit.

Update README to mention `make help`.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I65ce84040502994ae7caa0c8b72d808442f6b79e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52142
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
README
autoMakefile.am

diff --git a/README b/README
index 8c862c2..38fc188 100644 (file)
--- a/README
+++ b/README
@@ -54,6 +54,10 @@ To build Lustre:
     ./configure
     make
 
+To see all available make targets:
+
+    make help
+
 To play with a test Lustre filesystem:
 
     ./lustre/tests/llmount.sh
index 85c32fc..ce125f0 100644 (file)
@@ -36,6 +36,31 @@ FIND_TAG_FILES_CMD = find $(top_srcdir) \
                     -path $(top_srcdir)/ldiskfs/linux-stage \
                     -prune -false -o -type f -name '*.[hc]'
 
+help:
+       @echo  'Cleaning targets:'
+       @echo  '  clean             - Remove generated object files but keep the files'
+       @echo  '                      generated by autotools; use `git clean -xdf` to'
+       @echo  '                      purge all files not tracked by git'
+       @echo  ''
+       @echo  'Generic targets:'
+       @echo  '  all               - Build all modules and utilities enabled by'
+       @echo  '                      autotools'
+       @echo  '  checkpatch        - Run checkpatch.pl on latest commit'
+       @echo  '  checkstack        - Run checkstack.pl'
+       @echo  '  checkstack-update - Update checkstack.pl'
+       @echo  '  checkstack-clean  - Remove checkstack.pl artifacts'
+       @echo  ''
+       @echo  'Packaging targets:'
+       @echo  '  rpms              - Create RPM packages'
+       @echo  '  srpm              - Create source RPM packages'
+       @echo  '  dkms-rpm          - Create DKMS RPM packages'
+       @echo  '  dkms-srpm         - Create source DKMS RPM packages'
+       @echo  '  debs              - Create Debian packages'
+       @echo  '  dkms-debs         - Create DKMS Debian packages'
+
+checkpatch:
+       @git diff HEAD~1 | ./contrib/scripts/checkpatch.pl
+
 # these empty rules are needed so that automake doesn't add its own
 # recursive rules
 etags-recursive: