Provided by: zmk-doc_0.5.1-2_all bug


     Symlink — template for creating symbolic links


     # "link" is any valid identifier.
     link.SymlinkTarget = target
     $(eval $(call ZMK.Expand,Symlink,link))


     The template Symlink once expanded with a link name to creates rules for creating, removing,
     installing and removing a single symbolic link to a given target file.

     This template behaves like the Program template, in that it creates the symbolic link both
     locally, during development as well as when the project is installed.


     This module provides the following targets.

     This target represents the symbolic link

     This phony target depends on $(link)

     This phony target removes $(link)

     This target creates the symbolic link $(link) in $(link.InstallDir), with the name
     $(link.InstallName) The target directory is automatically created if required.

     This phony target removes $(link) as installed by the install target.


     This module provides the following variables.

     The target of the symbolic link.

     There is no default value. This variable must be set before expanding the template.

     The directory $(link) is installed to.

     There is no default value. This variable must be set before expanding the template. To avoid
     installation set the install directory to the special value noinst.

     The name of the program after installation.

     The default value is $(link) with the directory part removed.

     Path added to all installation targets.

     This variable is normally set externally, to install a compiled program into a staging area
     during construction of a compiled binary package.


     Prior to version 0.5.1, the install target misbehaved when $(link) contains a non-empty
     directory prefix. Incorrectly, the same prefix is replicated, somewhat confusingly in the
     installed symlink.

     Consider this example:

     subdir/link.SymlinkTarget = target
     subdir/link.InstallDir = $(bindir)
     $(eval $(call ZMK.Expand,Symlink,subdir/link))
     Running make install on the following example would create the symbolic link
     $(bindir)/subdir/link -> target, which was unexpected.

     This bug was given the identifier zmk-issue-80.


     The Symlink template first appeared in zmk 0.1


     Zygmunt Krynicki <>