LinuxCNC Documentation
This page is 15% translated. Untranslated text is shown in English.

SYNOPSIS

halcompile [--compile|--preprocess|--document|--adoc|--view-doc] compfile…​

sudo halcompile [--install|--install-doc] compfile…​

halcompile --compile --userspace cfile…​

sudo halcompile --install --userspace cfile…​

sudo halcompile --install --userspace archivo_py…​

When personalities are used in a comp file, HAL instances are exported sequentially (typically by the mutually exclusive count= or names= parameters). If the number of exports exceeds the maximum number of personalities, subsequent personalities are assigned modulo the maximum number of personalities allowed.

De forma predeterminada, el número máximo de personalidades es 64. Para alterar este límite, use la opción --personalities= con halcompile. Por ejemplo, para establecer un máximo de 4 elementos de personalidad: [sudo] halcompile --personalities=4 --install …​

Do not use [sudo] for RIP installation.

OPTIONS

-a, --adoc

Extract only asciidoc format documentation from the component.

-c, --compile

Compila un componente o módulo fuente C.

-d, --document

Extract man-page format documentation from the component (builds asciidoc and then converts to manpage). This option requires asciidoctor(1) or a2x(1) to be installed on your system.

-h, -?, --help

Muestra un mensaje breve de uso y sale.

-i, --install

Build and install a component.

-J, --view-doc

Deprecated. Live view the manpage of the component (builds asciidoc, converts to manpage and runs man(1)). This option requires asciidoctor(1) or a2x(1) to be installed on your system.

-j, --install-doc

Install the man-page documentation in usr/share/man1 or usr/share/man9, depending whether this is a userspace or realtime component.

-k file, --keep-adoc=file

Keep the generated asciidoc file when generating manpage documentation. The file is saved to file. You cannot specify multiple input files when using this option and it has no effect when only asciidoc formatted documentation is requested using the -a or --adoc option.

-l, --require-license

Obsolete. The component is always required to have a licence tag.

-o file, --outfile=file

Write output to file. Can only be used with --preprocess, --adoc and --document processing.

-P int, --personalities=int (default: 64)

Set the maximum number of personalities in the component.

-p, --preprocess

Only generate a C-file from the component file.

-U, --unix

Require the source to have unix-style NL-only line endings.

-u, --userspace

Create a userspace C-source (non-realtime). Default is to build realtime components.

--extra-compile-args=args

Extra arguments passed to the C-compiler.

--extra-link-args=args

Extra arguments passed to the linker.

DESCRIPTION

halcompile performs many different functions:

  • Compile .comp and .c files into .so or .ko HAL realtime components (the --compile flag)

  • Compile .comp and .c files into HAL non-realtime components (the --compile --userspace flag)

  • Preprocess .comp files into .c files (the --preprocess flag)

  • Extract documentation from .comp files into asciidoc or manpage section 1 or 9 files (the --adoc and --document flags)

  • Display documentation from .comp files onscreen (the --view-doc flag)

  • Compile and install .comp and .c files into the proper directory for HAL realtime components (the --install flag), which may require sudo to write to system directories.

  • Install .c and .py files into the proper directory for HAL non-realtime components (the --install --userspace flag), which may require sudo to write to system directories.

  • Extract documentation from .comp files into .1 or .9 manpage files in the proper system directory (the --install flag), which may require sudo to write to system directories.

  • Preprocess .comp files into .c files (the --preprocess flag)

SEE ALSO

  • Halcompile / HAL Component Generator in the LinuxCNC documentation for a full description of the .comp syntax, along with examples

  • pydoc, HAL and Creating Non-realtime Python Components in the LinuxCNC documentation for documentation on the Python interface to HAL components