package configurator

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Configurator.C_define

module Type : sig ... end
module Value : sig ... end
val import : t -> ?c_flags:Base.string Base.list -> ?link_flags:Base.string Base.list -> includes:Base.string Base.list -> (Base.string * Type.t) Base.list -> (Base.string * Value.t) Base.list

Import some #define from the given header files. For instance:

  # C.C_define.import c ~includes:"caml/config.h" ["ARCH_SIXTYFOUR", Switch];;
  - (string * Configurator.C_define.Value.t) list = ["ARCH_SIXTYFOUR", Switch true]
val gen_header_file : t -> fname:Base.string -> ?protection_var:Base.string -> (Base.string * Value.t) Base.list -> Base.unit

Generate a C header file containing the following #define. protection_var is used to enclose the file with:

  #ifndef BLAH
  #define BLAH
  ...
  #endif

If not specified, it is inferred from the name given to create and the filename.