Print this page
5051 import mdocml-1.12.3
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: TBD


  14 # Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  15 #
  16 
  17 MANDOC=         $(ONBLD_TOOLS)/bin/${MACH}/mandoc
  18 ROOTMAN=        $(ROOT)/usr/share/man
  19 ROOTHASMAN=     $(ROOT)/usr/has/man
  20 FILEMODE=       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 
  27 MANCHECKS=      $(MANFILES:%=%.check)
  28 ROOTMANFILES=   $(MANFILES:%=$(ROOTMAN)/man$(MANSECT)/%)
  29 ROOTMANLINKS=   $(MANLINKS:%=$(ROOTMAN)/man$(MANSECT)/%)
  30 
  31 $(ROOTMAN)/man$(MANSECT)/% $(ROOTHASMAN)/man$(MANSECT)/%: %
  32                 $(INS.file)
  33 






  34 $(MANCHECKS):
  35                 @$(ECHO) "checking $(@:%.check=%)"; \
  36                 $(MANDOC) -Tlint $(@:%.check=%)

  37 
  38 $(MANLINKS):
  39                 $(RM) $@; $(SYMLINK) $(LINKSRC) $@
  40 
  41 $(ROOTMANLINKS): $(MANLINKS)
  42                 $(RM) $@; $(CP) -RP $(@F) $(@D)
  43 
  44 all:
  45 
  46 check:          $(MANCHECKS)
  47 
  48 clean:
  49 
  50 clobber:
  51                 $(RM) $(MANLINKS)
  52 
  53 .PARALLEL:
  54 
  55 FRC:


  14 # Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  15 #
  16 
  17 MANDOC=         $(ONBLD_TOOLS)/bin/${MACH}/mandoc
  18 ROOTMAN=        $(ROOT)/usr/share/man
  19 ROOTHASMAN=     $(ROOT)/usr/has/man
  20 FILEMODE=       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 
  27 MANCHECKS=      $(MANFILES:%=%.check)
  28 ROOTMANFILES=   $(MANFILES:%=$(ROOTMAN)/man$(MANSECT)/%)
  29 ROOTMANLINKS=   $(MANLINKS:%=$(ROOTMAN)/man$(MANSECT)/%)
  30 
  31 $(ROOTMAN)/man$(MANSECT)/% $(ROOTHASMAN)/man$(MANSECT)/%: %
  32                 $(INS.file)
  33 
  34 #
  35 # Note that new mandoc adds some checks for lots of extra whitespace.
  36 # We don't want to check our legacy pages for that.  There are thousands
  37 # and thousands of them in our man pages.  Please still check them
  38 # manually when editing (git pbchk will do so for you.)
  39 #
  40 $(MANCHECKS):
  41                 @$(EGREP) -q "^.TH" $(@:%.check=%) || \
  42                 ( $(ECHO) "checking $(@:%.check=%)"; \
  43                 $(MANDOC) -Tlint $(@:%.check=%) )
  44 
  45 $(MANLINKS):
  46                 $(RM) $@; $(SYMLINK) $(LINKSRC) $@
  47 
  48 $(ROOTMANLINKS): $(MANLINKS)
  49                 $(RM) $@; $(CP) -RP $(@F) $(@D)
  50 
  51 all:
  52 
  53 check:          $(MANCHECKS)
  54 
  55 clean:
  56 
  57 clobber:
  58                 $(RM) $(MANLINKS)
  59 
  60 .PARALLEL:
  61 
  62 FRC: