michael@0: #! gmake michael@0: # michael@0: # Creates man pages for the NSS security tools michael@0: # michael@0: # pk12util, certutil, modutil, ssltap, michael@0: # signtool, signver, cmsutil, crlutil, michael@0: # derdump, pp, vfychain, vfyserv michael@0: # michael@0: michael@0: .SUFFIXES: .html .txt .1 .xml michael@0: michael@0: COMPILE.1 = xmlto -o nroff man michael@0: COMPILE.html = xmlto -o html html michael@0: michael@0: # the name of the tar ball michael@0: name = nss-man michael@0: date = `date +"%Y%m%d"` michael@0: michael@0: all: prepare all-man all-html michael@0: michael@0: prepare: date-and-version michael@0: mkdir -p html michael@0: mkdir -p nroff michael@0: michael@0: clean: michael@0: rm -f date.xml version.xml *.tar.bz2 michael@0: rm -f html/*.proc michael@0: rm -fr $(name) ascii michael@0: michael@0: date-and-version: date.xml version.xml michael@0: michael@0: date.xml: michael@0: date +"%e %B %Y" | tr -d '\n' > $@ michael@0: michael@0: version.xml: michael@0: echo -n ${VERSION} > $@ michael@0: michael@0: .PHONY : $(MANPAGES) michael@0: .PHONY : $(HTMLPAGES) michael@0: .PHONY : $(TXTPAGES) michael@0: michael@0: #------------------------------------------ michael@0: # Package a tar ball for building in fedora michael@0: # Include the makefile and .xml files only michael@0: # man pages will be created at build time michael@0: #------------------------------------------ michael@0: michael@0: tarball: michael@0: rm -rf $(name); \ michael@0: mkdir -p $(name)/nroff; \ michael@0: cp Makefile $(name); \ michael@0: cp *.xml $(name); \ michael@0: tar cvjf $(name)-$(date).tar.bz2 $(name) michael@0: michael@0: #-------------------------------------------------------- michael@0: # manpages michael@0: #-------------------------------------------------------- michael@0: michael@0: nroff/%.1 : %.xml michael@0: $(COMPILE.1) $< michael@0: michael@0: MANPAGES = \ michael@0: nroff/certutil.1 nroff/cmsutil.1 nroff/crlutil.1 nroff/pk12util.1 \ michael@0: nroff/modutil.1 nroff/ssltap.1 nroff/derdump.1 nroff/signtool.1 nroff/signver.1 \ michael@0: nroff/pp.1 nroff/vfychain.1 nroff/vfyserv.1 michael@0: michael@0: all-man: prepare $(MANPAGES) michael@0: michael@0: #-------------------------------------------------------- michael@0: # html pages michael@0: #-------------------------------------------------------- michael@0: michael@0: html/%.html : %.xml michael@0: $(COMPILE.html) $< michael@0: mv html/index.html $@ michael@0: michael@0: HTMLPAGES = \ michael@0: html/certutil.html html/cmsutil.html html/crlutil.html html/pk12util.html html/modutil.html \ michael@0: html/ssltap.html html/derdump.html html/signtool.html html/signver.html html/pp.html \ michael@0: html/vfychain.html html/vfyserv.html michael@0: michael@0: all-html: prepare $(HTMLPAGES)