Skip to contentSkip to conversation

documentation: coccinelle: Improve command example for make C={1,2}

PATCH Superseded Sumera Priyadarsini 2 participants 2 messages Aug 10, 2020

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 documentation: coccinelle: Improve command example for make C={1,2}

Modify coccinelle documentation to further clarify the usage of the makefile C variable flag by coccicheck.

---
Changes in v3:
- Remove quotes as suggested by Markus Elfring
- Change in wording, and punctuation, as suggested by Julia Lawall

---
 Documentation/dev-tools/coccinelle.rst | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
Documentation/dev-tools/coccinelle.rst +11 -4
index 6c791af1c859..74c5e6aeeff5 100644
@@ -175,13 +175,20 @@ For example, to check drivers/net/wireless/ one may write::
     make coccicheck M=drivers/net/wireless/
 
 To apply Coccinelle on a file basis, instead of a directory basis, the
-following command may be used::
+C variable is used by the makefile to select which files to work with.
+This variable can be used to run scripts for the entire kernel, a
+specific directory, or for a single file.
 
-    make C=1 CHECK="scripts/coccicheck"
+For example, to check drivers/bluetooth/bfusb.c, the value 1 is
+passed to the C variable to check files that make considers
+need to be compiled.::
 
-To check only newly edited code, use the value 2 for the C flag, i.e.::
+    make C=1 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o
 
-    make C=2 CHECK="scripts/coccicheck"
+The value 2 is passed to the C variable to check files regardless of
+whether they need to be compiled or not.::
+
+    make C=2 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o
 
 In these modes, which work on a file basis, there is no information
 about semantic patches displayed, and no commit message proposed.
Signature · 1 line
2.17.1
maintainer Acked-by on v3 1/1
#1 lore raw

Re: [Cocci] [PATCH v3] documentation: coccinelle: Improve command example for make C={1, 2}

Quoted 4 lines · Sumera Priyadarsini

Modify coccinelle documentation to further clarify the usage of the makefile C variable flag by coccicheck.

Thanks.

Quoted 46 lines

---
Changes in v3:
- Remove quotes as suggested by Markus Elfring
- Change in wording, and punctuation, as suggested by Julia Lawall

---
 Documentation/dev-tools/coccinelle.rst | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
Documentation/dev-tools/coccinelle.rst +11 -5
index 6c791af1c859..74c5e6aeeff5 100644
@@ -175,13 +175,20 @@ For example, to check drivers/net/wireless/ one may write::
     make coccicheck M=drivers/net/wireless/
 
 To apply Coccinelle on a file basis, instead of a directory basis, the
-following command may be used::
+C variable is used by the makefile to select which files to work with.
+This variable can be used to run scripts for the entire kernel, a
+specific directory, or for a single file.
 
-    make C=1 CHECK="scripts/coccicheck"
+For example, to check drivers/bluetooth/bfusb.c, the value 1 is
+passed to the C variable to check files that make considers
+need to be compiled.::
 
-To check only newly edited code, use the value 2 for the C flag, i.e.::
+    make C=1 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o
 
-    make C=2 CHECK="scripts/coccicheck"
+The value 2 is passed to the C variable to check files regardless of
+whether they need to be compiled or not.::
+
+    make C=2 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o
 
 In these modes, which work on a file basis, there is no information
 about semantic patches displayed, and no commit message proposed.
--

2.17.1

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci