http://www.w3.org/TR/html4/strict.dtd"> Makefile.html
#***************************************************************************
# $Id: Makefile,v 1.0.0.1 2002/07/26 16:34:35 deatrich Exp $
#
# Purpose: makefile for xml/dtd verification and html generation
#
#***************************************************************************

## Reference DTD/XSLT Name
DTD_FILE     = WebHowTo.dtd
XSL_FILE     = WebHowTo.xsl

## Project Name
PROJ         = WebHowTo

.SUFFIXES : .dtd .xsl .xml .css .html

#.SILENT :

#***************************************************************************
## get other file names

XML_FILE  = $(PROJ).xml
XSL_FILE  = $(PROJ).xsl
TARG      = $(PROJ).html
XSL_VAR_FILE = $(PROJ)_vars.xsl
XSL_FILES  = $(XSL_FILE) $(XSL_VAR_FILE)
CSS_FILE  = $(PROJ).css
HTM_FILE = $(PROJ).html
##HTM_FILES = $(XML_FILES:.xml=.html)

#***************************************************************************
PRINTOPT = -Plexwhite
## put sensitive stuff: $(FPATH)  in a password-protected area:
include protected/make.vars
#OBFUSC = /path/to/xml/

GVIMOPTS = -c ':let html_use_css = 1' -f +"syn on" +"run! syntax/2html.vim" +"wq" +"q"

#***************************************************************************
## GENERAL RULES

all: validate $(TARG)

## we could make a more interesting rule here if 'xmlproc_val' returned
## something other than zero on exit...
validate: $(DTD_FILE) $(XML_FILE)
        xmlproc_val  $(XML_FILE)

html: $(TARG)

misc: $(TARG)
        for i in $(XSL_FILE) $(DTD_FILE) $(XSL_VAR_FILE) $(CSS_FILE) Makefile ; do \
           gvim $(GVIMOPTS) "$$i" ; \
           sed 's%<title>$(FPATH)%<title>%' < $$i.html > $$i.html.new ; \
           mv $$i.html.new $$i.html ; \
         done ;

print: 
        lpr $(PRINTOPT) $(XML_FILES) $(XSL_FILES) $(CSS_FILE)

help:
        @echo ""
        @echo "make all          -- validate the xml and generate the html"
        @echo "make validate     -- validate only the xml/dtd files"
        @echo "make html         -- force generation of the html files"
        @echo "make misc         -- generate various other html files"
        @echo "make print        -- print out source files"


#***************************************************************************
## EXPLICIT DEPENDENCIES

#***************************************************************************
## SPECIAL RULES

$(TARG) : $(XML_FILE) $(XSL_FILES) $(CSS_FILE)
        xalan -IN $(XML_FILE) -XSL $(XSL_FILE) -PARAM vars $(XSL_VAR_FILE) -PARAM this_file $(TARG) -HTML -OUT $@


#***************************************************************************