########################################################################
#
# $Id: Makefile,v 1.1 2006/05/25 20:28:41 mavrik Exp $
#
########################################################################
#
# Purpose: Makefile for a single pod document.
#
########################################################################

.SUFFIXES: .pod .html .1

POD_NAME		= WebJob-DsvTool
POD_FILE		= webjob-dsvtool.pod
VERSION_FILE		= ../../tools/webjob-dsvtool/webjob-dsvtool.h
SRC_FILES		=\
			sections/NAME.pod\
			sections/SYNOPSIS.pod\
			sections/DESCRIPTION.pod\
			sections/MODES-OF-OPERATION.pod\
			sections/RETURN-VALUES.pod\
			sections/FILES.pod\
			sections/EXAMPLES.pod\
			sections/SEE-ALSO.pod\
			sections/AUTHOR.pod\
			sections/HISTORY.pod
DST_FILES		=\
			webjob-dsvtool.html\
			webjob-dsvtool.1

all: ${POD_FILE}

install: ${DST_FILES} clean

clean:
	rm -f pod2html-dircache pod2html-itemcache

clean-all: clean
	rm -f ${POD_FILE}

${POD_FILE}: ${SRC_FILES}
	umask 22; cat ${SRC_FILES} > ${POD_FILE}

.pod.1:
	version=`grep "#define VERSION" ${VERSION_FILE} | awk '{print $$3}' | sed 's/"//g'`;\
	umask 22; pod2man --center="${POD_NAME} Documentation" --release="${POD_NAME} $${version}" $< > ../$@

.pod.html:
	title=`echo $< | sed 's/\.pod//' | sed 's/_/ /g'`;\
	umask 22; pod2html --infile=$< --outfile=../$@ --noindex --title="$${title}"


syntax highlighted by Code2HTML, v. 0.9.1