[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On generating compilation databases

From: Karl Berry
Subject: Re: On generating compilation databases
Date: Sun, 18 Dec 2022 19:35:03 -0700

Hi Arsen - sorry for the delayed reply. Replying as one of the automake
developers, though I know nothing ...

      src/tangle-main.o \
      `test -f 'src/main.cpp' || echo '$(srcdir)/'`src/main.cpp
    ... which relies on a shell construct, making it hard to 'deduce' from
    the point of a pure make processor (note that I didn't actually go too

The shell construct is something about the package you're compiling,
isn't it? With the minimal amhello, the command I see with make V=1 is
(modulo line breaks):

  gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT main.o -MD -MP -MF 
  .deps/main.Tpo -c -o main.o main.c

without any ||.

However, regardless, for the reasons you describe in your message (stamp
files and the like), merely getting the compilation commands is not
enough. A full package build is not just a sequence of compiles, in

So, as for the general question you raise: I don't know. I have no
background on pretty much anything you mention in your message (LSP,
compile_commands.json, ...). Thus, I have nothing against the idea, but
you or someone else who wants to make it happen will need to implement
it. If Automake needs to do something differently, and patches (that
don't affect its normal operation) can be provided, then that's fine.

Happy hacking,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]