Scroll to navigation

zmk.Script(5) File Formats Manual (prm) zmk.Script(5)

NAME

Scripttemplate for describing interpreted scripts

SYNOPSIS

include z.mk
# scriptName is the name of the script file
$(eval $(call ZMK.Expand,Program,scriptName))

DESCRIPTION

The template Script once with a to creates rules for installing and removing a single script written in an interpreted programming language.

If the script is a then it can be automatically checked with shellcheck, if available.

TARGETS

This module provides the following targets.

install

This phony target copies $(scriptName) to , with the name and mode . The target directory is automatically created if required.

The variables Configure.ProgramPrefix, Configure.ProgramSuffix and Configure.ProgramTransformName automatically impact the installed names of all the scripts.

uninstall

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

static-check-shellcheck

This phony target uses shellcheck to perform static analysis of compatible scripts.

static-check

This phony target depends on the target static-check-shellcheck.

VARIABLES

This module provides the following variables.

$(scriptName).Interpreter

Name of the script interpreter.

The default value is inferred from the extension of the file name.

$(scriptName).InstallDir

The directory $(scriptName) is installed to.

The default value is . The special value disables the rules related to installation and uninstallation.

$(scriptName).InstallName

The name of the script after installation.

The default value is $(scriptName)

$(scriptName).InstallMode

The UNIX mode $(scriptName) is installed with.

The default value is .

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.

IMPLEMENTATION NOTES

Script uses InstallUninstall to handle installation and removal.

HISTORY

The Script template first appeared in zmk 0.1

AUTHORS

Zygmunt Krynicki <me@zygoon.pl>

May 3, 2020 zmk 0.5.1