RFR: 7903755: multi header support and special syntax for header file [v4]
Jorn Vernee
jvernee at openjdk.org
Wed Jun 19 17:12:51 UTC 2024
On Wed, 19 Jun 2024 16:58:39 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
>> jextract currently supports only one header file. If the user wants to extract more than one header file, s/he has to create a containing header that includes multiple headers and jextract the containing header.
>>
>> With the current change, jextract supports more than one header file in the command line.
>> When multiple headers are specified in command line, --header-class-name option is mandatory and it is enforced.
>>
>> In addition to normal file names for header file names, a special syntax such as "<stdio.h>" is also supported. With this, user does not have to write long file name including directories such as /usr/include/stdio.h.
>>
>> jextract generates multiple headers by generating a temporary header file. If the command line argument is of the form "<stdio.h>" then jextract generates "#include <stdio.h>" in the auto-generated containing header. If the header specified in of the normal/existing form (say foo.h), then containing header will have #include "foo.h" line.
>
> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last revision:
>
> updated section on basic jextract usage for multiple header files and special header syntax
> with a link to command line option reference based on review comment.
doc/GUIDE.md line 63:
> 61: should be included. This is also the header file that should be passed to jextract.
> 62:
> 63: If a library has multiple main header files, they can be passed to jextract in the command line.
Suggestion:
If a library has multiple main header files, they can be passed to jextract on the command line.
doc/GUIDE.md line 991:
> 989: | `--version` | print version information and exit |
> 990:
> 991: Jextract accepts one or more header files. When multiple header files are specified,
I suggest adding a header above this section to separate it from the table (like we currently have for the section on clang arguments below)
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/249#discussion_r1646521698
PR Review Comment: https://git.openjdk.org/jextract/pull/249#discussion_r1646526497
More information about the jextract-dev
mailing list