From b8489a6c54b3ed57d148784fb679de8edac61c12 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Mon, 28 Aug 2023 19:52:04 +0000 Subject: [PATCH] LU-17058 build: add help and checkpatch as make targets 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 Change-Id: I65ce84040502994ae7caa0c8b72d808442f6b79e Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52142 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Patrick Farrell Reviewed-by: Arshad Hussain Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- README | 4 ++++ autoMakefile.am | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/README b/README index 8c862c2..38fc188 100644 --- 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 diff --git a/autoMakefile.am b/autoMakefile.am index 85c32fc..ce125f0 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -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: -- 1.8.3.1