From: brian m. carlson Date: Fri, 27 Oct 2023 19:36:36 GMT Subject: Re: Constant recompilation when GENERATE_COMPILATION_DATABASE is set Message-ID: In-Reply-To: <76c5f401-0b29-b19a-8424-5bca5df2252e@gmail.com> On 2023-10-27 at 15:41:23, Philippe Blain wrote: > One way to fix this is to use the same trick that is used for the '.depend' directories > created to hold the Makefile dependencies: > > diff --git a/Makefile b/Makefile > index 5776309365..f6f7255dd1 100644 > --- a/Makefile > +++ b/Makefile > @@ -2701,7 +2701,7 @@ endif > compdb_dir = compile_commands > > ifeq ($(GENERATE_COMPILATION_DATABASE),yes) > -missing_compdb_dir = $(compdb_dir) > +missing_compdb_dir = $(filter-out $(wildcard $(compdb_dir)), $(compdb_dir)) > $(missing_compdb_dir): > @mkdir -p $@ > > That is, we define missing_compdb_dir to 'compile_commands' only if the directory > is not yet created. I can confirm that this solves my problem very nicely. Thanks for such a fast response. -- brian m. carlson (he/him or they/them) Toronto, Ontario, CA