Expose a few more variables

This commit is contained in:
Jeremie Dimino 2018-03-06 14:38:38 +00:00 committed by Jérémie Dimino
parent 1ff05d52e2
commit d415ed5f6c
2 changed files with 11 additions and 0 deletions

View File

@ -692,6 +692,10 @@ Jbuilder supports the following variables:
- ``ARCH_SIXTYFOUR`` is ``true`` if using a compiler targeting a
64 bit architecture and ``false`` otherwise
- ``null`` is ``/dev/null`` on Unix or ``nul`` on Windows
- ``ext_obj``, ``ext_asm``, ``ext_lib``, ``ext_dll`` and ``ext_exe``
are the file extension used for various artifacts
- ``bytecomp_c_libraries`` and ``native_c_libraries`` are list of C libraries
used by the OCaml runtimes
In addition, ``(action ...)`` fields support the following special variables:

View File

@ -159,6 +159,13 @@ let create
; "ARCH_SIXTYFOUR" , string (string_of_bool context.arch_sixtyfour)
; "MAKE" , make
; "null" , string (Path.to_string Config.dev_null)
; "ext_obj" , string context.ext_obj
; "ext_asm" , string context.ext_asm
; "ext_lib" , string context.ext_lib
; "ext_dll" , string context.ext_dll
; "ext_exe" , string context.ext_exe
; "bytecomp_c_libraries", strings context.bytecomp_c_libraries
; "native_c_libraries" , strings context.bytecomp_c_libraries
]
|> String_map.of_list
|> function