---
name: "c2init"
section: "1"
platform: "linux"
package: "mercury"
version: "0.10.1-3"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/c2init"
---

# c2init(1)

Create Mercury initialization file.

```

```

## NAME

c2init - Create Mercury initialization file.

## SYNOPSIS

c2init \[options\] \*.c \*.init ...

## NOTES

*c2init* is one of the development tools that are part of the Mercury distribution.

This manual page is limited to a brief summary. For further information see the Mercury User's Guide.

```

```

## OPTIONS

```
 -a, --aditi
```

```
	Generate a function to upload Aditi-RL data to a database.
```

```
 -c <n>, --max-calls <n>
```

```
	Break up the initialization into groups of at most <n> function
	calls.  (Default value of <n> is 40.)
```

```
 -i, --include-initialization-code
```

```
	Always include code that calls the initialization functions
	of the various modules. With this option, the debugger can use
	information from any modules that were compiled with execution
	tracing to print (partial) stack traces, and to print the
	values of variables in ancestors of the current call, even
	in grades in which this not normally possible.
```

```
 -t, --trace
```

```
	Enable execution tracing in the generated executable.
	Implies -i.
```

```
 -l, --library
```

```
	Don't generate a `main()' function.
	Instead, generate a function
		mercury_main(int argc, char **argv);
	(declared in "init.h") that can be called from C code.
	(A more fine-grained interface is also available;
	see "init.h" for details.)
```

```
 -I <directory>, --init-file-directory <directory>
```

```
	Include <directory> in the list of directories searched to
	locate `.init' files.
```

```
 -w <label>, --entry-point <label>
```

```
	Set entry point to <label>.
	(Default value corresponds to main/2.)
```

```
 -x, --extra-inits
```

```
	Search `.c' files for extra initialization functions.
	(This may be necessary if the C files contain
	hand-coded C code with `INIT' comments, rather than
	containing only C code that was automatically generated
	by the Mercury compiler.)
```

## GRADE OPTIONS

```
 -s <grade>, --grade <grade>
```

```

```

```
 --target {il, c, java, asm}
```

```

```

```
 --il
```

```

```

```
 --asm-labels
```

```

```

```
 --gcc-non-local-gotos
```

```

```

```
 --gcc-global-registers
```

```

```

```
 -H, --high-level-code
```

```

```

```
 --parallel
```

```

```

```
 --gc {conservative, accurate, none}
```

```

```

```
 -p, --profiling
```

```

```

```
 --profile-calls
```

```

```

```
 --profile-time
```

```

```

```
 --profile-memory
```

```

```

```
 --use-trail
```

```

```

```
 --use-minimal-model
```

```

```

```
 --pic-reg
```

```

```

```
 --no-stack-trace
```

```

```

```
 --debug
```

```
	See the documentation in the "Invocation" section
	of the Mercury User's Guide.
```

## ENVIRONMENT VARIABLES

MERCURY\_MOD\_LIB\_DIR, MERCURY\_MOD\_LIB\_MODS, MERCURY\_TRACE\_LIB\_DIR, MERCURY\_TRACE\_LIB\_MODS, MERCURY\_MKINIT.

## AUTHORS

The Mercury team.

See \<http://www.cs.mu.oz.au/mercury/contact/people.html\>.

## COPYRIGHT

This program and its documentation are copyright by the University of Melbourne. They may be copied only under the terms of the GNU General Public License - see the file COPYING in the Mercury distribution.

## SEE ALSO

\<http://www.cs.mu.oz.au/mercury/information/documentation.html\>

The Mercury User's Guide.

The GNU General Public License.
