include ../../config

include ../dbootstrap/langs/Makefile.genlangs

xml_files=$(addprefix ../dbootstrap/langs/,$(generated_languages))

all:    unifont-reduced.bgf

unifont-reduced.bgf: unifont-reduced.bdf
	bdftobogl -b $< > $@

unifont-reduced.bdf: /usr/src/unifont.bdf all.utf
	LC_ALL=en_IN.UTF-8 reduce-font $< < all.utf > $@

all.utf: po.utf rn.utf $(xml_files) graphic.utf
	cat $^ > $@

$(xml_files):
	$(MAKE) -C ../dbootstrap/langs

po.utf:
	$(MAKE) -C ../dbootstrap/po all-po-utf
	cat ../dbootstrap/po/utf/*.po > $@

rn.utf:
	$(MAKE) RN_TARGET_DIR=. -C ../../scripts/rootdisk/messages install-utf
	cat ../../scripts/rootdisk/messages/release_notes.* > $@

clean: 
	rm -f unifont-reduced.bgf unifont-reduced.bdf rn.utf po.utf all.utf

distclean: clean
	rm -f *~ .nfs*

# delete files when there's an error
.DELETE_ON_ERROR:
