zmk.Symlink5
Template for creating symbolic links
Usage
include z.mk # "link" is any valid identifier. link.SymlinkTarget = target $(eval $(call ZMK.Expand,Symlink,link))
Overview
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.
Targets
This module provides the following targets.
$(link)
This target represents the symbolic link
all
This phony target depends on $(link)
clean
This phony target removes $(link)
install
This target creates the symbolic link $(link) in $(link.InstallDir), with the name $(link.InstallName) The target directory is automatically created if required.
uninstall
This phony target removes $(link) as installed by the install target.
Variables
This module provides the following variables.
$(link).SymlinkTarget
The target of the symbolic link.
There is no default value. This variable must be set before expanding the template.
$(programName).InstallDir
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.
$(link).InstallName
The name of the program after installation.
The default value is $(link) with the directory part removed.
Destdir
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.
Releases
Unchanged in 3 releases since Debian 11 (Bullseye).