summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/Makefile
blob: 09784104883a741153490cad488302fc2c975a73 (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
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
112
113
114
# $OpenBSD: Makefile,v 1.23 2005/03/07 21:46:59 espie Exp $

.include <bsd.own.mk>

MAN=pkg_add.1 pkg_info.1 pkg_create.1 pkg_delete.1 pkg.1 pkg_mklocatedb.1
POD2MAN=/usr/bin/pod2man

PACKAGES= \
    OpenBSD/Add.pm \
    OpenBSD/CollisionReport.pm \
    OpenBSD/Delete.pm \
    OpenBSD/Error.pm \
    OpenBSD/Getopt.pm \
    OpenBSD/IdCache.pm \
    OpenBSD/Mtree.pm \
    OpenBSD/PackageInfo.pm \
    OpenBSD/PackageLocator.pm \
    OpenBSD/PackageName.pm \
    OpenBSD/PackingElement.pm \
    OpenBSD/PackingList.pm \
    OpenBSD/PackingOld.pm \
    OpenBSD/PkgCfl.pm \
    OpenBSD/PkgSpec.pm \
    OpenBSD/ProgressMeter.pm \
    OpenBSD/RequiredBy.pm \
    OpenBSD/SharedItems.pm \
    OpenBSD/SharedLibs.pm \
    OpenBSD/Temp.pm \
    OpenBSD/Update.pm \
    OpenBSD/Ustar.pm \
    OpenBSD/Vstat.pm \
    OpenBSD/md5.pm \


SCRIPTS= \
    pkg_add \
    pkg_info \
    pkg_create \
    pkg_delete \
    pkg_mklocatedb \
    pkg

LIBBASE=/usr/libdata/perl5

PODS= \
    OpenBSD::IdCache \
    OpenBSD::Mtree \
    OpenBSD::PackingElement \
    OpenBSD::PackingList \
    OpenBSD::PkgCfl \
    OpenBSD::PkgSpec \
    OpenBSD::Ustar \
    OpenBSD::Vstat

_quick3p=

.for p in ${PODS}
.  ifndef NOMAN
MANALL+= $p.cat3p
MANSRCALL += $p.3p
MANSRC_COOKIE=stamp-mansrc.build
_quick3p+=$p.pod ${.OBJDIR}/$p.3p
.    ifdef MANPS
PSALL+= $p.ps3p
.    endif
.  else
MANSRC_COOKIE=
.  endif

$p.3p: pod/$p.pod
	${POD2MAN} --section=3p --official --name=$p ${.ALLSRC} $@
.endfor
.ifndef NOMAN
MANALL+=${MAN:S/.1$/.cat1/}
.  ifdef MANPS
PSALL+= ${MAN:S/.1$/.ps1/}
.  endif
.endif

mansrc.build:
.if !empty(_quick3p)
	cd ${.CURDIR}/pod && ${POD2MAN} --section=3p --official ${_quick3p}
.endif

# Nothing to build
depend:
all: ${MANSRC_COOKIE}

stamp-mansrc.build:
	@cd ${.CURDIR} && exec ${MAKE} mansrc.build
	@touch $@

install: 
.for i in ${PACKAGES}
	${INSTALL} -d -o ${LIBOWN} -g ${LIBGRP} -m ${DIRMODE} \
		${DESTDIR}${LIBBASE}/${i:H}
	${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
		${.CURDIR}/$i ${DESTDIR}${LIBBASE}/$i
.endfor
.for i in ${SCRIPTS}
	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
		${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
.endfor

clean:

.if !defined(NOMAN)
install: maninstall
.include <bsd.man.mk>
.endif

.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.PHONY: mansrc.build