git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Constant recompilation when GENERATE_COMPILATION_DATABASE is set

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 27, 2023, 19:36 UTC
Message-ID
<ZTwRRHhHxGt1nwL9@tapette.crustytoothpaste.net>
In-Reply-To
<76c5f401-0b29-b19a-8424-5bca5df2252e@gmail.com>
On 2023-10-27 at 15:41:23, Philippe Blain wrote:
Show 18 quoted lines
> 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
Previous: Philippe Blain
Message 3 of 3 in “Constant recompilation when GENERATE_COMPILATION_DATABASE is set”
  1. brian m. carlsonOct 27, 2023
  2. Philippe BlainOct 27, 2023
  3. brian m. carlsonOct 27, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.