From: guillaume papin <guillaume.papin@epitech.eu>
To: "Romanos Skiadas" <rom.skiad@gmail.com>,
"João Távora" <joaotavora@gmail.com>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Cc: "npostavs@users.sourceforge.net" <npostavs@users.sourceforge.net>,
"lele@metapensiero.it" <lele@metapensiero.it>,
"mvoteiza@udel.edu" <mvoteiza@udel.edu>,
"monnier@iro.umontreal.ca" <monnier@iro.umontreal.ca>,
Eli Zaretskii <eliz@gnu.org>,
"sdl.web@gmail.com" <sdl.web@gmail.com>
Subject: Re: New Flymake rewrite in emacs-26
Date: Wed, 11 Oct 2017 18:39:31 +0000 [thread overview]
Message-ID: <HE1PR02MB119575ED3705CCB479B229778D4A0@HE1PR02MB1195.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <43bcb3a1-118e-73fb-17d9-c32a74b829e3@gmail.com>
Regarding the way for a project to export it compile options,
there is somewhat popular, if not standard, method.
Generate a compilation database[1].
A compilation database is a JSON file, named compile_commands.json,
with looks like this for emacs:
[
{
"arguments": [
"cc",
"-c",
"-Demacs",
"-I.",
"-I../../emacs/src",
"-I../lib",
"-I../../emacs/lib",
"-pthread",
"-isystem",
"/usr/include/gtk-3.0",
<snip...>
"-isystem",
"/usr/include/libpng16",
"-fopenmp",
"-DMAGICKCORE_HDRI_ENABLE=1",
"-DMAGICKCORE_QUANTUM_DEPTH=16",
"-fopenmp",
"-DMAGICKCORE_HDRI_ENABLE=1",
"-DMAGICKCORE_QUANTUM_DEPTH=16",
<snip...>
"-Wno-unused-parameter",
"-Wno-format-nonliteral",
"-g3",
"-O2",
"../../emacs/src/intervals.c"
],
"directory": "/home/papin_g/dev/src/emacs/emacs-25.1-build/src",
"file": "../../emacs/src/intervals.c"
},
<snip...>
]
I could generate this with a tool called intercept-build[2],
by doing a clean build of emacs:
$ intercept-build make
...
CC dbusbind.o
CC emacs.o
CC keyboard.o
...
$ cat compile_commands.json
[
{
"arguments": [
"cc",
"-c",
...
The compile options have the `-M' filtered out by the tool.
I think there is something in CEDET that knows how to load this information for emacs,
see ede-compdb[2], but this is also quite straightforward to do with the `json' libray.
What the Emacs makefile could do, is generate the JSON file with a command like `make compdb'.
I have done this in the past for project using GNU Make, it wasn't too difficult to implement.
This is also what the cmake-ide tool mentionned just before seems to be using.
[1] https://clang.llvm.org/docs/JSONCompilationDatabase.html
Sorry for the link to Clang, it's not really Clang-specific.
[2] https://github.com/rizsotto/scan-build
Once again, related to Clang, sorry about that.
Bear is basically the same thing, and maybe easier to install from source:
https://github.com/rizsotto/Bear
[3] https://github.com/randomphrase/ede-compdb
This is a Github link, but it says that this has been integrated into CEDET.
next prev parent reply other threads:[~2017-10-11 18:39 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 14:05 New Flymake rewrite in emacs-26 João Távora
2017-10-03 15:00 ` Eli Zaretskii
2017-10-04 11:58 ` Lele Gaifax
2017-10-04 13:41 ` Lele Gaifax
2017-10-04 16:08 ` João Távora
2017-10-04 16:42 ` Lele Gaifax
2017-10-04 18:11 ` Lele Gaifax
2017-10-05 2:21 ` João Távora
2017-10-05 11:42 ` Lele Gaifax
2017-10-05 23:32 ` Noam Postavsky
2017-10-06 13:16 ` João Távora
2017-10-06 13:24 ` Noam Postavsky
2017-10-06 15:48 ` João Távora
2017-10-07 7:37 ` Lele Gaifax
2017-10-07 16:08 ` João Távora
2017-10-10 12:25 ` João Távora
2017-10-10 14:18 ` Eli Zaretskii
2017-10-10 15:09 ` João Távora
2017-10-10 15:53 ` Eli Zaretskii
2017-10-10 16:25 ` João Távora
2017-10-10 16:40 ` Eli Zaretskii
2017-10-10 17:03 ` João Távora
2017-10-10 17:20 ` Noam Postavsky
2017-10-11 0:07 ` João Távora
2017-10-11 0:59 ` Noam Postavsky
2017-10-11 10:39 ` Eli Zaretskii
2017-10-11 12:16 ` Noam Postavsky
2017-10-11 12:25 ` João Távora
2017-10-11 10:24 ` Eli Zaretskii
2017-10-11 12:01 ` João Távora
2017-10-11 12:13 ` Eli Zaretskii
2017-10-11 13:41 ` João Távora
2017-10-11 17:49 ` Romanos Skiadas
2017-10-11 18:39 ` guillaume papin [this message]
2017-10-12 13:17 ` João Távora
2017-10-11 20:25 ` Stefan Monnier
2017-10-12 13:10 ` João Távora
2017-10-12 13:43 ` Stefan Monnier
2017-10-12 13:56 ` João Távora
2017-10-11 13:11 ` Mark Oteiza
2017-10-10 17:23 ` Eli Zaretskii
2017-10-11 11:11 ` Lele Gaifax
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=HE1PR02MB119575ED3705CCB479B229778D4A0@HE1PR02MB1195.eurprd02.prod.outlook.com \
--to=guillaume.papin@epitech.eu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=joaotavora@gmail.com \
--cc=lele@metapensiero.it \
--cc=monnier@iro.umontreal.ca \
--cc=mvoteiza@udel.edu \
--cc=npostavs@users.sourceforge.net \
--cc=rom.skiad@gmail.com \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.