# -*- mode: makefile; coding: utf-8 -*-
# A sample Makefile for building your résumé using the
# xml-resume-library.  Requirements: xsltproc, xmlto, passivetex
# Copyright © 2002 Colin Walters <walters@debian.org>

# This should be the name of your résumé file, but without the .xml
# extension.
RESUME = resume

# The styles you want to use.  These are for the United States; see
# the directory /usr/share/sgml/xml-resume-library/xsl/output/ for
# other styles.
FO_STYLE = /usr/share/sgml/xml-resume-library/xsl/output/us-letter.xsl
HTML_STYLE = /usr/share/sgml/xml-resume-library/xsl/output/us-html.xsl
TXT_STYLE = /usr/share/sgml/xml-resume-library/xsl/output/us-text.xsl

.PHONY: all clean check
.SUFFIXES: .html .fo .pdf .xml .xsl .txt

all:	$(RESUME).html $(RESUME).txt $(RESUME).pdf

clean:
	-rm -f $(RESUME).html $(RESUME).pdf $(RESUME).fo $(RESUME).txt *~

$(RESUME).html: $(RESUME).xml
	xsltproc $(HTML_STYLE) $(RESUME).xml > $(RESUME).html

$(RESUME).txt: $(RESUME).xml
	xsltproc $(TXT_STYLE) $(RESUME).xml > $(RESUME).txt

$(RESUME).fo: $(RESUME).xml
	xsltproc $(FO_STYLE) $(RESUME).xml > $(RESUME).fo

$(RESUME).pdf: $(RESUME).fo
	xmlto pdf $(RESUME).fo
