usr/src/doc/manpage/Makefile
changeset 809 8a6fba4105d7
parent 797 a33daeba9b4c
equal deleted inserted replaced
808:2122a04679c0 809:8a6fba4105d7
    23 # Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 
    26 include ../Makefile.doc
    26 include ../Makefile.doc
    27 
    27 
       
    28 APISDIR = $(SRC)/apis
       
    29 APIS_CMD = (cd $(APISDIR); $(LS) -1 *.xml 2>/dev/null; $(TRUE))
       
    30 #APIS = $(APIS_CMD:sh)
       
    31 APIS = kstat.xml smf.xml zonesbridge.xml
       
    32 
    28 MANPAGES_1 = radadrgen.1 vp.1
    33 MANPAGES_1 = radadrgen.1 vp.1
    29 MANPAGES_1m = rad.1m
    34 MANPAGES_1m = rad.1m
    30 MANPAGES = $(MANPAGES_1) $(MANPAGES_1m)
    35 MANPAGES_3rad = $(APIS:%.xml=%.3rad)
       
    36 MANPAGES = $(MANPAGES_1) $(MANPAGES_1m) $(MANPAGES_3rad)
    31 CLOBBER_FILES += $(MANPAGES)
    37 CLOBBER_FILES += $(MANPAGES)
    32 SRCS = \
    38 SRCS = \
    33 	$(MANPAGES_1:%.1=man-%.xml) \
    39 	$(MANPAGES_1:%=%.xml) \
    34 	$(MANPAGES_1m:%.1m=man-%.xml)
    40 	$(MANPAGES_1m:%=%.xml)
    35 INSTALLED_FILES = \
    41 INSTALLED_FILES = \
    36 	$(MANPAGES_1:%=$(PROTO_MAN)/man1/%) \
    42 	$(MANPAGES_1:%=$(PROTO_MAN)/man1/%) \
    37 	$(MANPAGES_1m:%=$(PROTO_MAN)/man1m/%)
    43 	$(MANPAGES_1m:%=$(PROTO_MAN)/man1m/%) \
       
    44 	$(MANPAGES_3rad:%=$(PROTO_MAN)/man3rad/%)
    38 
    45 
    39 all:	$(MANPAGES)
    46 all:	$(MANPAGES)
    40 
    47 
    41 lint:	
    48 lint:	
    42 	$(XMLLINT) $(SRCS)
    49 	$(XMLLINT) $(SRCS)
    52 # to reference the left- and right-quote string constants.  FIX_MAN maps
    59 # to reference the left- and right-quote string constants.  FIX_MAN maps
    53 # from one to the other.
    60 # from one to the other.
    54 
    61 
    55 FIX_MAN = -echo '1,$$s/(lq/*(lq/g\n1,$$s/(rq/*(rq\nw' | ed -s $@
    62 FIX_MAN = -echo '1,$$s/(lq/*(lq/g\n1,$$s/(rq/*(rq\nw' | ed -s $@
    56 
    63 
    57 %.1: man-%.xml
    64 $(PROTO_MAN)/man1/% $(PROTO_MAN)/man1m/% $(PROTO_MAN)/man3rad/%: %
       
    65 	$(INS.file)
       
    66 
       
    67 %.1: %.1.xml
    58 	$(XSLT.man)
    68 	$(XSLT.man)
    59 	$(FIX_MAN)
    69 	$(FIX_MAN)
    60 
    70 
    61 %.1m: man-%.xml
    71 %.1m: %.1m.xml
    62 	$(XSLT.man)
    72 	$(XSLT.man)
    63 	$(FIX_MAN)
    73 	$(FIX_MAN)
    64 
    74 
    65 $(PROTO_MAN)/man1/% $(PROTO_MAN)/man1m/%: %
    75 %.3rad: $(APISDIR)/%.xml
    66 	$(INS.file)
    76 	$(RADADRGEN) -N -o man $< > $@
    67 
    77 
    68 include $(SRC)/Makefile.targ
    78 include $(SRC)/Makefile.targ