xref: /titanic_41/usr/src/man/Makefile.man (revision a9478106a12424322498e53cf7cd75bd8a4d6004)
1c10c16deSRichard Lowe#
2c10c16deSRichard Lowe# This file and its contents are supplied under the terms of the
3c10c16deSRichard Lowe# Common Development and Distribution License ("CDDL"), version 1.0.
4c10c16deSRichard Lowe# You may only use this file in accordance with the terms of version
5c10c16deSRichard Lowe# 1.0 of the CDDL.
6c10c16deSRichard Lowe#
7c10c16deSRichard Lowe# A full copy of the text of the CDDL should have accompanied this
8c10c16deSRichard Lowe# source.  A copy of the CDDL is also available via the Internet
9c10c16deSRichard Lowe# at http://www.illumos.org/license/CDDL.
10c10c16deSRichard Lowe#
11c10c16deSRichard Lowe
12*a9478106SYuri Pankov#
13c10c16deSRichard Lowe# Copyright 2011, Richard Lowe
14*a9478106SYuri Pankov# Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15*a9478106SYuri Pankov#
16c10c16deSRichard Lowe
17c10c16deSRichard LoweROOTMAN=	$(ROOT)/usr/share/man
18c10c16deSRichard LoweROOTHASMAN=	$(ROOT)/usr/has/man
19c10c16deSRichard Lowe
20c10c16deSRichard LoweFILEMODE=	0444
21c10c16deSRichard Lowe
22c10c16deSRichard Lowe# The manual section being built, client Makefiles must set this to, for e.g.
23c10c16deSRichard Lowe# "3perl", with case matching that of the section name as installed.
24c10c16deSRichard Lowe#
25c10c16deSRichard Lowe# MANSECT=
26c10c16deSRichard Lowe
27c10c16deSRichard LoweROOTMANFILES= 	$(MANFILES:%=$(ROOTMAN)/man$(MANSECT)/%)
28*a9478106SYuri PankovROOTMANLINKS=	$(MANLINKS:%=$(ROOTMAN)/man$(MANSECT)/%)
29c10c16deSRichard Lowe
30c10c16deSRichard Lowe$(ROOTMAN)/man$(MANSECT)/% $(ROOTHASMAN)/man$(MANSECT)/%: %
31c10c16deSRichard Lowe		$(INS.file)
32c10c16deSRichard Lowe
33*a9478106SYuri Pankov$(MANLINKS):
34*a9478106SYuri Pankov		$(RM) $@; $(SYMLINK) $(LINKSRC) $@
35*a9478106SYuri Pankov
36*a9478106SYuri Pankov$(ROOTMANLINKS): $(MANLINKS)
37*a9478106SYuri Pankov		$(RM) $@; $(CP) -RP $(@F) $(@D)
38c10c16deSRichard Lowe
39c10c16deSRichard Loweall:
40c10c16deSRichard Lowe
41c10c16deSRichard Loweclean:
42c10c16deSRichard Lowe
43c10c16deSRichard Loweclobber:
44*a9478106SYuri Pankov		$(RM) $(MANLINKS)
45c10c16deSRichard Lowe
46c10c16deSRichard Lowe.PARALLEL:
47c10c16deSRichard Lowe
48c10c16deSRichard LoweFRC:
49