SHELL = /bin/bash

xcyr_source_bdfs = $(wildcard 100dpi/crox??.bdf 75dpi/crox??.bdf)
xcyr_oblique_bdfs = $(addsuffix o.bdf, $(xcyr_source_bdfs:%.bdf=%))
xcyr_bold_bdfs = $(addsuffix b.bdf, $(xcyr_source_bdfs:%.bdf=%))
xcyr_boldoblique_bdfs = $(addsuffix bo.bdf, $(xcyr_source_bdfs:%.bdf=%))
xcyr_new_bdfs = $(xcyr_oblique_bdfs) $(xcyr_bold_bdfs) $(xcyr_boldoblique_bdfs)

$(xcyr_oblique_bdfs) : $(xcyr_source_bdfs) bdfslant.pl
	perl bdfslant.pl -unjag <$(@:%o.bdf=%.bdf) >$@

$(xcyr_bold_bdfs) : $(xcyr_source_bdfs) bdfbold.pl
	perl bdfbold.pl <$(@:%b.bdf=%.bdf) >$@

$(xcyr_boldoblique_bdfs) : $(xcyr_bold_bdfs) bdfslant.pl
	perl bdfslant.pl -unjag <$(@:%bo.bdf=%b.bdf) >$@


.PHONY : allbdf
allbdf : $(xcyr_new_bdfs)

.PHONY : clean
clean :
	rm -f $(xcyr_new_bdfs)
