1zmk.Script(5)                 Programmer's Manual                zmk.Script(5)
2

NAME

4     Script — template for describing interpreted scripts
5

SYNOPSIS

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

DESCRIPTION

12     The template Script once expanded with a script name to creates rules for
13     installing and removing a single script written in an interpreted pro‐
14     gramming language.
15
16     If the script is a shell script then it can be automatically checked with
17     shellcheck, if available.
18

TARGETS

20     This module provides the following targets.
21
22   install
23     This phony target copies $(scriptName) to $(scriptName.InstallDir), with
24     the name $(scriptName.InstallName) and mode $(scriptName.InstallMode).
25     The target directory is automatically created if required.
26
27     The variables Configure.ProgramPrefix, Configure.ProgramSuffix and
28     Configure.ProgramTransformName automatically impact the installed names
29     of all the scripts.
30
31   uninstall
32     This phony target removes $(scriptName) as installed by the install tar‐
33     get.
34
35   static-check-shellcheck
36     This phony target uses shellcheck to perform static analysis of compati‐
37     ble scripts.
38
39   static-check
40     This phony target depends on the target static-check-shellcheck.
41

VARIABLES

43     This module provides the following variables.
44
45   $(scriptName).Interpreter
46     Name of the script interpreter.
47
48     The default value is inferred from the extension of the file name.
49
50   $(scriptName).InstallDir
51     The directory $(scriptName) is installed to.
52
53     The default value is $(bindir).  The special value noinst disables the
54     rules related to installation and uninstallation.
55
56   $(scriptName).InstallName
57     The name of the script after installation.
58
59     The default value is $(scriptName)
60
61   $(scriptName).InstallMode
62     The UNIX mode $(scriptName) is installed with.
63
64     The default value is 0755.
65
66   DESTDIR
67     Path added to all installation targets.
68
69     This variable is normally set externally, to install a compiled program
70     into a staging area during construction of a compiled binary package.
71

IMPLEMENTATION NOTES

73     Script uses InstallUninstall to handle installation and removal.
74

HISTORY

76     The Script template first appeared in zmk 0.1
77

AUTHORS

79     Zygmunt Krynicki <me@zygoon.pl>
80
81zmk 0.5.1                         May 3, 2020                        zmk 0.5.1
Impressum