xref: /illumos-gate/usr/src/cmd/man/Makefile (revision a5619348a00282a0a129610076aefdb4dd7ab2ab)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2012 Nexenta Systems, Inc. All rights reserved.
14# Copyright 2014 Garrett D'Amore <garrett@damore.org>
15# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
16#
17
18PROG=		man
19LINKS=		apropos whatis catman
20LIBLINKS =	makewhatis
21OBJS=		makewhatis.o man.o stringlist.o
22MANIFEST=	update-man-index.xml
23SVCMETHOD=	update-man-index
24
25include		$(SRC)/cmd/Makefile.cmd
26
27ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
28
29CFLAGS +=	$(CCVERBOSE)
30
31ROOTLINKS=	$(LINKS:%=$(ROOTBIN)/%) $(LIBLINKS:%=$(ROOTLIB)/%)
32
33.KEEP_STATE :
34
35all:		$(PROG)
36
37clean:
38		$(RM) $(OBJS)
39
40install:	all $(ROOTPROG) $(ROOTLINKS) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
41
42check:		$(CHKMANIFEST)
43
44$(PROG):	$(OBJS)
45		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
46		$(POST_PROCESS)
47
48$(ROOTLINKS):	$(ROOTPROG)
49		$(RM) $@; $(LN) $(ROOTPROG) $@
50
51include		$(SRC)/cmd/Makefile.targ
52