Updated to 3.17 for bug fixes and optimizations
[platform/upstream/nss.git] / doc / Makefile
1 #! gmake
2 #
3 # Creates man pages for the NSS security tools
4 #
5 # pk12util, certutil, modutil, ssltap, 
6 # signtool, signver, cmsutil, crlutil,  
7 # derdump, pp, vfychain, vfyserv
8 #
9
10 .SUFFIXES: .html .txt .1 .xml
11
12 COMPILE.1 = xmlto -o nroff man
13 COMPILE.html = xmlto -o html html
14
15 # the name of the tar ball
16 name = nss-man
17 date = `date +"%Y%m%d"`
18
19 all: prepare all-man all-html
20
21 prepare: date-and-version
22         mkdir -p html
23         mkdir -p nroff
24         
25 clean:
26         rm -f date.xml version.xml *.tar.bz2
27         rm -f html/*.proc
28         rm -fr $(name) ascii
29
30 date-and-version: date.xml version.xml
31
32 date.xml:
33         date +"%e %B %Y" | tr -d '\n' > $@
34
35 version.xml:
36         echo -n ${VERSION} > $@
37
38 .PHONY : $(MANPAGES)
39 .PHONY : $(HTMLPAGES)
40 .PHONY : $(TXTPAGES)
41
42 #------------------------------------------
43 # Package a tar ball for building in fedora
44 # Include the makefile and .xml files only
45 # man pages will be created at build time
46 #------------------------------------------
47
48 tarball:
49         rm -rf $(name); \
50         mkdir -p $(name)/nroff; \
51         cp Makefile $(name); \
52         cp *.xml $(name); \
53         tar cvjf $(name)-$(date).tar.bz2 $(name)
54
55 #--------------------------------------------------------
56 # manpages
57 #--------------------------------------------------------
58
59 nroff/%.1 : %.xml
60         $(COMPILE.1) $<
61         
62 MANPAGES = \
63 nroff/certutil.1 nroff/cmsutil.1 nroff/crlutil.1 nroff/pk12util.1 \
64 nroff/modutil.1 nroff/ssltap.1 nroff/derdump.1 nroff/signtool.1 nroff/signver.1 \
65 nroff/pp.1 nroff/vfychain.1 nroff/vfyserv.1
66
67 all-man: prepare $(MANPAGES)
68
69 #--------------------------------------------------------
70 # html pages
71 #--------------------------------------------------------
72
73 html/%.html : %.xml
74         $(COMPILE.html) $<
75         mv html/index.html $@
76
77 HTMLPAGES = \
78 html/certutil.html html/cmsutil.html html/crlutil.html html/pk12util.html html/modutil.html \
79 html/ssltap.html html/derdump.html html/signtool.html html/signver.html html/pp.html \
80 html/vfychain.html html/vfyserv.html
81
82 all-html: prepare $(HTMLPAGES)