linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: linux-kernel@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Michal Marek <mmarek@suse.com>,
	"moderated list:COCCINELLE/Semantic Patches (SmPL)" 
	<cocci@systeme.lip6.fr>
Subject: Re: [PATCH] Coccinelle: remove incorrect -include option transformation
Date: Tue, 22 Sep 2015 15:09:41 +0200	[thread overview]
Message-ID: <56015315.507@samsung.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1509221453541.6225@hadrien>

On 09/22/2015 02:58 PM, Julia Lawall wrote:
>
> On Tue, 22 Sep 2015, Andrzej Hajda wrote:
>
>> kbuild/gcc uses -include option to include files and -I to provide paths for
>> #include <> directive. The same is true for spatch.
>>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>> ---
>>  scripts/coccicheck | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/scripts/coccicheck b/scripts/coccicheck
>> index bbf901a..6d84b05 100755
>> --- a/scripts/coccicheck
>> +++ b/scripts/coccicheck
>> @@ -30,7 +30,6 @@ FLAGS="$SPFLAGS --very-quiet"
>>  # spatch only allows include directories with the syntax "-I include"
>>  # while gcc also allows "-Iinclude" and "-include include"
>>  COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
>> -COCCIINCLUDE=${COCCIINCLUDE//-include/-I}
> I'm not sure of the meaning of the above notation, nor what is the
> intention.  Coccinelle does have a --include option, but it doesn't mean
> the same thing as -I.  It is a way to have a file be included that is not
> included according to the normal inclusion strategy.  For example, if a.h
> includes b.h which includes c.h, and if one considers that c.h is really
> important for having the right type information, but one doesn't want the
> cost of including everything via --recursive-includes, then one could put
> --include c.h.

This option has the same meaning for gcc.
But the patch is incorrect. It should be:

COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}

gcc option '-include' should be converted to spatch option '--include',
ie one minus should be added.

Regards
Andrzej


>
> julia
>
>
>>  if [ "$C" = "1" -o "$C" = "2" ]; then
>>      ONLINE=1
>> --
>> 1.9.1
>>
>>


  reply	other threads:[~2015-09-22 13:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 12:48 [PATCH] Coccinelle: remove incorrect -include option transformation Andrzej Hajda
2015-09-22 12:58 ` Julia Lawall
2015-09-22 13:09   ` Andrzej Hajda [this message]
2015-09-22 13:15     ` [PATCH v2] Coccinelle: fix " Andrzej Hajda
2015-09-22 13:27       ` Julia Lawall
2015-10-26 20:34         ` Michal Marek
2015-09-22 13:23     ` [PATCH] Coccinelle: remove " Julia Lawall
2015-09-22 13:00 ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56015315.507@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=b.zolnierkie@samsung.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mmarek@suse.com \
    --cc=nicolas.palix@imag.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).