---
name: "cymake"
section: "1"
platform: "linux"
package: "zinc-compiler"
version: "1.0.2-2"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/cymake"
---

# cymake(1)

A make like build tool for Zinc programs.

## NAME

**cymake** – A make like build tool for Zinc programs.

## SYNOPSIS

**cymake** \[*option* ...\] *target* ...

## DESCRIPTION

**cymake** is a [make(1)](/make/1.md) like tool for compiling Zinc programs. Dependencies are automatically extracted from the source files; there is no need to construct or maintain a Makefile.

**cymake** accepts options and file names on the command line in an arbitrary order. The file arguments determine what to compile. If *target* is the name of an executable (i.e. it has no extension), *target**.lcurry* or *target**.curry* is assumed to contain the main module of the program. All modules it depends on are compiled (if necessary) and linked to an executable. If *target* is the name of a source module (i.e. it ends in *.lcurry* or *.curry* or an object module (i.e. it ends in *.o*) then the object file for that module is generated.

**cymake** allows several programs to reside in the same directory. Modules can be shared between several programs. Directories to search for modules can be specified with the **-i** flag, in the same way as for  [cyc(1)](/cyc/1.md). In addition, directories which are searched for interfaces of library modules can be specified with the **-P** flag.

**cymake** correctly handles the fact that the Zinc compiler generates two files, an object file and an interface file, for each module compiled.

### Options

**cymake** understands the following options:

- **-n**

  No execution mode. Print commands but do not execute them.

- **-q**

  Quiet mode. Do not print commands before executing them.

- **-M**

  Output a Makefile compatible dependency list on the standard output.

- **-a**

  Always link the executable, even if it is not out of date with respect to its object files. This is useful if only the goal to be evaluated by the program is changed.

- **-e** *goal*

  Evaluate *goal* instead of main.main. This option cannot be used when compiling more than one module.

- **-T** *goal*

  Compute the type of *goal*. This option cannot be used when compiling more than one module.

- **-g**

  Compile the program for use with the debugger. As object files compiled with **-g** cannot be linked with object files compiled without **-g**, **cymake** uses the suffix *.d.o* instead of *.o* for object files when this option is specified.

- **-i** *dir*

  Add directory *dir* to the list of paths used to locate imported modules. By default, the compiler searches only the current directory for source files. Note that the current directory is always searched first.

- **-P** *dir*

  Add directory *dir* to the list of paths used to locate interface files for library modules. By default, the compiler searches for interface files in its standard library directory *${exec\_prefix}/lib/curry*.

  The compiler scans the directories specified with **-P** before the installation directory; thus, it is possible to hide the interfaces of the standard library by using this option.

- **-o** *file*

  Puts the executable file in *file*. This option cannot be used when compiling more than one module. This option is ignored if compiling to an object file.

- **--clean**

  Remove all compiled files for a program. If specified in conjunction with **-g** only the object files for the debugger, i.e. with suffix *.d.o*, are removed.

Most other flags are assumed to be compiler options and are passed to **cyc** when compiling and linking modules.

## ENVIRONMENT

- CURRY\_PATH

  The environment variable CURRY\_PATH is used to locate the auxiliary executables used by **cymake**. The default value is *${exec\_prefix}/lib/curry*.

- CURRY\_IMPORTS

  The environment variable CURRY\_IMPORTS contains a colon-separated list of directories that are search for imported interfaces. The default value is $CURRY\_PATH.

## FILES

- *${exec\_prefix}/bin/cyc*

  The Curry compiler.

- *${exec\_prefix}/lib/zinc-compiler/cymk*

  Dependency generator for Curry programs.

- *${exec\_prefix}/lib/zinc-compiler/newer*

  Helper program to determine if a target of out of date.

- *${prefix}/include/libcurry-stdlib/\*.icurry*

  Interface files for the standard library.

## SEE ALSO

[cyc(1)](/cyc/1.md), [cyi(1)](/cyi/1.md)

## AUTHOR

This man page was written by Wolfgang Lux for the Muenster Curry Compiler, and latter adapted by Diego Berrueta to the Zinc Project.
