On Mon, Jul 23, 2018 at 2:44 PM SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote: > On Mon, Jul 23, 2018 at 8:28 PM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > > On Mon, Jul 23, 2018 at 9:51 AM SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote: > > > +ifdef DC_SHA1_SUBMODULE > > > +COCCI_SOURCES = $(filter-out sha1collisiondetection/%,$(C_SOURCES)) > > > +else > > > +COCCI_SOURCES = $(filter-out sha1dc/%,$(C_SOURCES)) > > > +endif > > > > Can't you just filter out both of these unconditionally without > > worrying about DC_SHA1_SUBMODULE? > > I'm not sure what you mean by that. Like this perhaps? > > COCCI_SOURCES = $(filter-out sha1collisiondetection/%,$(filter-out > sha1dc/%,$(C_SOURCES))) > > While it's only a single line, I don't think it's any easier on the > eyes. I wasn't worried about readability or one or two lines (indeed, you could still do the filtering over two statements). What I meant was that sha1dc/ contains files whether DC_SHA1_SUBMODULE is defined or not. If the idea of this change is that there's no point in having Coccinelle check those foreign, imported files (and waste time in the process), then I was thinking that you'd want to omit sha1dc/* regardless of whether DC_SHA1_SUBMODULE is defined. Looking more closely at the Makefile, however, I see that C_SOURCES holds only one or the other of sha1dc/* or sha1collisiondetection/lib/*, so my concern is unfounded, which explains why my question confused you.