all: fonts docs zip

TP=$(PWD)

fonts: 
	make -f genfont.make FN=LukasSvatba OFN=AmiciLogo
	make -f genfont.make FN=JanaSkrivana
	make -f genfont.make FN=AuriocusKalligraphicus 
	
docs: 
	# make the docs in docbuild, do not clutter uplevel dir
	cd docbuild && \
	export TEXINPUTS=$$TEXINPUTS:../texmf// && \
	export TFMFONTS=$$TFMFONTS::../texmf/fonts// &&\
	export T1FONTS=$$T1FONTS::$(PWD)/texmf/fonts// &&\
	( latex aurical.tex && \
	dvips -u+../texmf/fonts/map/dvips/aurical/aurical.map aurical.dvi &&\
	ps2pdf aurical.ps )
	cp docbuild/aurical.pdf texmf/doc/latex/aurical 
kerntest:
	# make the docs in docbuild, do not clutter uplevel dir
	cd docbuild && \
	export TEXINPUTS=$$TEXINPUTS:../texmf// && \
	export TFMFONTS=$$TFMFONTS::../texmf/fonts// &&\
	export T1FONTS=$$T1FONTS::$(PWD)/texmf/fonts// &&\
	( latex kerntest.tex && \
	dvips -u+../texmf/fonts/map/dvips/misc/aurical.map kerntest.dvi &&\
	ps2pdf kerntest.ps )

zip:
	rm -f texmf/ls-R
	cd texmf; zip -r ../aurical_texmf.zip *

space:  boldclean
	cd docbuild; rm -f aurical.aux aurical.out aurical.dvi aurical.pdf aurical.log aurical.ps 
	rm -f aurical_texmf.zip
	rm -f texmf/fonts/afm/public/aurical/*
	rm -f texmf/fonts/type1/public/aurical/*
	rm -f texmf/fonts/tfm/public/aurical/*

boldclean:
	make -f genfont.make FN=LukasSvatba OFN=AmiciLogo boldclean
	make -f genfont.make FN=JanaSkrivana boldclean
	make -f genfont.make FN=AuriocusKalligraphicus boldclean











