EXAMPLE_SITE_HTML=main.html main.tex
EXAMPLE_SITE_VIM= Makefile.html main.brtx.html
EXAMPLE_SITE= $(EXAMPLE_SITE_HTML) $(EXAMPLE_SITE_VIM) main.pdf main.tex
all: $(EXAMPLE_SITE)
.PHONY: nopdf
nopdf: $(EXAMPLE_SITE_HTML) $(EXAMPLE_SITE_VIM)
HEVEA_OR_NOT= hevea || echo NoHeveaFound
main.html: main.brtx
m4 -D_todaydate="`date`" -D_output_format="HTML" main.brtx > main.brtx.tmp
$(BRTX2HTML) -doc -title "Bracetax Example" -link-css ../$(CSS) \
-i main.brtx.tmp -o $@
rm main.brtx.tmp
main.tex: main.brtx
m4 -D_todaydate="`date`" -D_output_format="LATEX" main.brtx > main.brtx.tmp
brtx -doc -title "Self Documenting Example" -latex -i main.brtx.tmp -o main.tex
rm main.brtx.tmp
main.pdf: main.tex
pdflatex main && pdflatex main
rm main.log main.aux main.out
Makefile.html: Makefile
vim -f -R $< \
-c "sy on" \
-c 'colorscheme darkblue' \
-c TOhtml -c 'w! $@.tmp' -c 'qa!' && \
sed -e 's/<title>.*<\/title>/<title>Makefile<\/title>/' \
$@.tmp > $@
rm -f $@.tmp
main.brtx.html: main.brtx
vim -f -R $< \
-c "sy on" \
-c 'colorscheme darkblue' \
-c 'source ../../../tools/bracetax_syntax.vim' \
-c TOhtml -c 'w! $@.tmp' -c 'qa!' && \
sed -e 's/<title>.*<\/title>/<title>Example - source<\/title>/' \
$@.tmp > $@
rm -f $@.tmp