summaryrefslogtreecommitdiff
path: root/mk/plist/plist-macros.awk
blob: 46f34d1e8c51423e76992e6e5a62060dbbbc03f2 (plain)
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
# $NetBSD: plist-macros.awk,v 1.2 2008/01/05 17:03:04 rillig Exp $

BEGIN {
	IMAKE_MANINSTALL = getenv_or_die("IMAKE_MANINSTALL")
}

# XXX: Don't use this macro, since it is not yet supported.
#
# @imake-man dir basename extension
#
# Creates up to two PLIST entries for man pages of imake-style programs.
#
/^@imake-man/ {
	if (IMAKE_MANINSTALL ~ /catinstall/) {
		n = split($2, components, "/")
		sub("man", "cat", components[n])
		print join(components, 1, n, "/") "/" $3 ".0"
	}
	if (IMAKE_MANINSTALL ~ /maninstall/) {
		n = split($2, components, "/")
		sub("cat", "man", components[n])
		print join(components, 1, n, "/") "/" $3 "." $4
	}
	next;
}

1 {
	print;
}