xref: /titanic_51/usr/src/man/Makefile.man (revision 9b6c3dc02c8682cbff6680ba283839a0df30c2d0)
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
9# at http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2011, Richard Lowe
14# Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15#
16
17ROOTMAN=	$(ROOT)/usr/share/man
18ROOTHASMAN=	$(ROOT)/usr/has/man
19
20FILEMODE=	0444
21
22# The manual section being built, client Makefiles must set this to, for e.g.
23# "3perl", with case matching that of the section name as installed.
24#
25# MANSECT=
26
27ROOTMANFILES= 	$(MANFILES:%=$(ROOTMAN)/man$(MANSECT)/%)
28ROOTMANLINKS=	$(MANLINKS:%=$(ROOTMAN)/man$(MANSECT)/%)
29
30$(ROOTMAN)/man$(MANSECT)/% $(ROOTHASMAN)/man$(MANSECT)/%: %
31		$(INS.file)
32
33$(MANLINKS):
34		$(RM) $@; $(SYMLINK) $(LINKSRC) $@
35
36$(ROOTMANLINKS): $(MANLINKS)
37		$(RM) $@; $(CP) -RP $(@F) $(@D)
38
39all:
40
41clean:
42
43clobber:
44		$(RM) $(MANLINKS)
45
46.PARALLEL:
47
48FRC:
49