Merge: contrib/header_keeper: a cog in the toolchains to generate FFI wrapper for...
authorJean Privat <jean@pryen.org>
Sat, 21 Mar 2015 06:12:59 +0000 (13:12 +0700)
committerJean Privat <jean@pryen.org>
Sat, 21 Mar 2015 06:12:59 +0000 (13:12 +0700)
This is needed by @Tagachi for the Objective-C wrapper.

Once again, everything is in the doc:

### Filters preprocessed C-like header files to remove included files

This tool is used in the process of parsing header files to extract
information on the declared services (the functions and structures).
This information is then used to generate bindings for Nit code
to access these services.

The C preprocessor extends macros, inline files marked with `#include`,
and more. This tool acts after the C preprocessor, in a way to keep
everything but the included files. It searches for line pragmas
to identify the source of each line. The result is printed to stdout.

Typical usage on the output of `gcc -E` (it would be the same with `clang`):

~~~
gcc -E /usr/include/SDL/SDL_image.h | header_keeper SDL_image.h > preprocessed_header.h
~~~

This module can also be used as a library. The main service is the method `header_keeper`.

Pull-Request: #1210
Reviewed-by: ArthurDelamare <>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Ait younes Mehdi Adel <overpex@gmail.com>


Trivial merge