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 12a9478106SYuri Pankov# 13c10c16deSRichard Lowe# Copyright 2011, Richard Lowe 1495c635efSGarrett D'Amore# Copyright 2014 Nexenta Systems, Inc. All rights reserved. 15a9478106SYuri Pankov# 16c10c16deSRichard Lowe 1795c635efSGarrett D'AmoreMANDOC= $(ONBLD_TOOLS)/bin/${MACH}/mandoc 18c10c16deSRichard LoweROOTMAN= $(ROOT)/usr/share/man 19c10c16deSRichard LoweROOTHASMAN= $(ROOT)/usr/has/man 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 2795c635efSGarrett D'AmoreMANCHECKS= $(MANFILES:%=%.check) 28c10c16deSRichard LoweROOTMANFILES= $(MANFILES:%=$(ROOTMAN)/man$(MANSECT)/%) 29a9478106SYuri PankovROOTMANLINKS= $(MANLINKS:%=$(ROOTMAN)/man$(MANSECT)/%) 30c10c16deSRichard Lowe 31c10c16deSRichard Lowe$(ROOTMAN)/man$(MANSECT)/% $(ROOTHASMAN)/man$(MANSECT)/%: % 32c10c16deSRichard Lowe $(INS.file) 33c10c16deSRichard Lowe 34*698f87a4SGarrett D'Amore# 35*698f87a4SGarrett D'Amore# Note that new mandoc adds some checks for lots of extra whitespace. 36*698f87a4SGarrett D'Amore# We don't want to check our legacy pages for that. There are thousands 37*698f87a4SGarrett D'Amore# and thousands of them in our man pages. Please still check them 38*698f87a4SGarrett D'Amore# manually when editing (git pbchk will do so for you.) 39*698f87a4SGarrett D'Amore# 4095c635efSGarrett D'Amore$(MANCHECKS): 41*698f87a4SGarrett D'Amore @$(EGREP) -q "^.TH" $(@:%.check=%) || \ 42*698f87a4SGarrett D'Amore ( $(ECHO) "checking $(@:%.check=%)"; \ 43*698f87a4SGarrett D'Amore $(MANDOC) -Tlint $(@:%.check=%) ) 4495c635efSGarrett D'Amore 45a9478106SYuri Pankov$(MANLINKS): 46a9478106SYuri Pankov $(RM) $@; $(SYMLINK) $(LINKSRC) $@ 47a9478106SYuri Pankov 48a9478106SYuri Pankov$(ROOTMANLINKS): $(MANLINKS) 49a9478106SYuri Pankov $(RM) $@; $(CP) -RP $(@F) $(@D) 50c10c16deSRichard Lowe 51c10c16deSRichard Loweall: 52c10c16deSRichard Lowe 5395c635efSGarrett D'Amorecheck: $(MANCHECKS) 5495c635efSGarrett D'Amore 55c10c16deSRichard Loweclean: 56c10c16deSRichard Lowe 57c10c16deSRichard Loweclobber: 58a9478106SYuri Pankov $(RM) $(MANLINKS) 59c10c16deSRichard Lowe 60c10c16deSRichard Lowe.PARALLEL: 61c10c16deSRichard Lowe 62c10c16deSRichard LoweFRC: 63