Skip to content

Consistency of the command-line interface with other preprocessors #3

Description

@ivan-pi

Would it be possible to make the CLI of prep consistent with other Fortran preprocessors?

Namely, if one is to use a third-party preprocessor with the Intel Fortran compiler, the alternative preprocessor should support an invocation of the form:

alt_fpp [ [–D<define>]..] [[-I<include directory>]..] inputfile 

with output redirected to STDOUT. Currently, prep requires an -i for the input file, meaning a wrapper-script would be needed.

Also the fypp preprocessor uses a "positional" argument for the input file:

$ fypp -h
Usage: fypp [options] [INFILE] [OUTFILE]

Preprocesses source code with Fypp directives. The input is read from INFILE
(default: '-', stdin) and written to OUTFILE (default: '-', stdout).

I have not investigated the conventions of other fpp- and cpp-like Fortran preprocessors.

If not possible for whatever reasons, I'm happy to contribute a note on how to "embed" the prep preprocessor with other tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions