From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758069AbbIVM6d (ORCPT ); Tue, 22 Sep 2015 08:58:33 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:34197 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758055AbbIVM6b (ORCPT ); Tue, 22 Sep 2015 08:58:31 -0400 X-IronPort-AV: E=Sophos;i="5.17,573,1437429600"; d="scan'208";a="178886228" Date: Tue, 22 Sep 2015 14:58:26 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Andrzej Hajda cc: linux-kernel@vger.kernel.org, Bartlomiej Zolnierkiewicz , Marek Szyprowski , Julia Lawall , Gilles Muller , Nicolas Palix , Michal Marek , "moderated list:COCCINELLE/Semantic Patches (SmPL)" Subject: Re: [PATCH] Coccinelle: remove incorrect -include option transformation In-Reply-To: <1442926130-17817-1-git-send-email-a.hajda@samsung.com> Message-ID: References: <1442926130-17817-1-git-send-email-a.hajda@samsung.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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. julia > > if [ "$C" = "1" -o "$C" = "2" ]; then > ONLINE=1 > -- > 1.9.1 > >