File: zmk.Script.5.in

package info (click to toggle)
zmk 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,132 kB
  • sloc: makefile: 1,749; sh: 313; ansic: 42; awk: 12; cpp: 12
file content (111 lines) | stat: -rw-r--r-- 2,376 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.Dd May 3, 2020
.Os zmk @VERSION@
.Dt zmk.Script 5 PRM
.Sh NAME
.Nm Script
.Nd template for describing interpreted scripts
.Sh SYNOPSIS
.Bd -literal
include z.mk
# scriptName is the name of the script file
$(eval $(call ZMK.Expand,Program,scriptName))
.Ed
.Sh DESCRIPTION
The template
.Nm Script
once
.Em expanded
with a
.Em script name
to creates rules for installing and removing a single script written in an
interpreted programming language.
.Pp
If the script is a
.Em shell script
then it can be automatically checked with
.Nm shellcheck ,
if available.
.Sh TARGETS
This module provides the following targets.
.Ss install
This
.Em phony
target copies
.Em $(scriptName)
to
.Em $(scriptName.InstallDir) ,
with the name
.Em $(scriptName.InstallName)
and mode
.Em $(scriptName.InstallMode) .
The target directory is automatically created if required.
.Pp
The variables
.Nm Configure.ProgramPrefix ,
.Nm Configure.ProgramSuffix
and
.Nm Configure.ProgramTransformName
automatically impact the installed names of all the scripts.
.Ss uninstall
This
.Em phony
target removes
.Em $(scriptName)
as installed by the
.Em install
target.
.Ss static-check-shellcheck
This
.Em phony
target uses
.Nm shellcheck
to perform static analysis of compatible scripts.
.Ss static-check
This
.Em phony
target depends on the target
.Nm static-check-shellcheck .
.Sh VARIABLES
This module provides the following variables.
.Ss $(scriptName).Interpreter
Name of the script interpreter.
.Pp
The default value is inferred from the extension of the file name.
.Ss $(scriptName).InstallDir
The directory
.Em $(scriptName)
is installed to.
.Pp
The default value is
.Em $(bindir) .
The special value
.Em noinst
disables the rules related to installation and uninstallation.
.Ss $(scriptName).InstallName
The name of the script after installation.
.Pp
The default value is
.Em $(scriptName)
.Ss $(scriptName).InstallMode
The UNIX mode
.Em $(scriptName)
is installed with.
.Pp
The default value is
.Em 0755 .
.Ss DESTDIR
Path added to all installation targets.
.Pp
This variable is normally set externally, to install a compiled program
into a staging area during construction of a compiled binary package.
.Sh IMPLEMENTATION NOTES
.Nm
uses
.Nm InstallUninstall
to handle installation and removal.
.Sh HISTORY
The
.Nm
template first appeared in zmk 0.1
.Sh AUTHORS
.An "Zygmunt Krynicki" Aq Mt me@zygoon.pl