
ROOTPATH=../../../../
include $(ROOTPATH)Makefile.config.default
ifeq ($(wildcard $(ROOTPATH)Makefile.config), $(ROOTPATH)Makefile.config)
	include $(ROOTPATH)Makefile.config
endif

NEWCATCOMP = $(ROOTPATH)morphoswb/development/tools/catcomp/catcomp.pl

all: intuition dos

.PHONY: intuition dos

CATALOGS_INTUITION   = deutsch russian polski suomi etina espaol trke nederlands franais svenska magyar italiano greek dansk hrvatski
CATALOGS_DOS         = deutsch russian polski suomi etina espaol trke nederlands franais svenska magyar italiano greek dansk hrvatski

DESCRIPTOR_INTUITION = ../../../../aboxmodules/gui/intuition/morphos/intuition.cd
DESCRIPTOR_DOS       = english/sys/dos.cd

intuition: $(patsubst %,%/sys/intuition.catalog,$(CATALOGS_INTUITION))
dos:       $(patsubst %,%/sys/dos.catalog,$(CATALOGS_DOS))


clean:
	rm -f $(patsubst %,%/sys/intuition.catalog,$(CATALOGS_INTUITION))
	rm -f $(patsubst %,%/sys/dos.catalog,$(CATALOGS_DOS))


install: all
	for language in $(CATALOGS_INTUITION); \
	do\
		mkdir -p $(BOOTDEVICE)MorphOS/Locale/Catalogs/$$language/sys;\
		cp -f $$language/sys/intuition.catalog $(BOOTDEVICE)MorphOS/Locale/Catalogs/$$language/sys/intuition.catalog;\
	done
	for language in $(CATALOGS_DOS); \
	do\
		mkdir -p $(BOOTDEVICE)MorphOS/Locale/Catalogs/$$language/sys;\
		cp -f $$language/sys/dos.catalog $(BOOTDEVICE)MorphOS/Locale/Catalogs/$$language/sys/dos.catalog;\
	done


install-iso: all
	for language in $(CATALOGS_INTUITION); \
	do\
		mkdir -p $(ISOPATH)MorphOS/Locale/Catalogs/$$language/sys;\
		cp -f $$language/sys/intuition.catalog $(ISOPATH)MorphOS/Locale/Catalogs/$$language/sys/intuition.catalog;\
	done
	for language in $(CATALOGS_DOS); \
	do\
		mkdir -p $(ISOPATH)MorphOS/Locale/Catalogs/$$language/sys;\
		cp -f $$language/sys/dos.catalog $(ISOPATH)MorphOS/Locale/Catalogs/$$language/sys/dos.catalog;\
	done


#
#  intuition
#
deutsch/sys/intuition.catalog: deutsch/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

russian/sys/intuition.catalog: russian/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

polski/sys/intuition.catalog: polski/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

suomi/sys/intuition.catalog: suomi/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

etina/sys/intuition.catalog: etina/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

espaol/sys/intuition.catalog: espaol/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

nederlands/sys/intuition.catalog: nederlands/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

franais/sys/intuition.catalog: franais/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

magyar/sys/intuition.catalog: magyar/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

svenska/sys/intuition.catalog: svenska/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

italiano/sys/intuition.catalog: italiano/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

greek/sys/intuition.catalog: greek/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

dansk/sys/intuition.catalog: dansk/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

hrvatski/sys/intuition.catalog: hrvatski/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

trke/sys/intuition.catalog: trke/sys/intuition.ct $(DESCRIPTOR_INTUITION)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_INTUITION) -ct $< -o $@

#
#  dos
#
deutsch/sys/dos.catalog: deutsch/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

russian/sys/dos.catalog: russian/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

polski/sys/dos.catalog: polski/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

suomi/sys/dos.catalog: suomi/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

trke/sys/dos.catalog: trke/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

etina/sys/dos.catalog: etina/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

nederlands/sys/dos.catalog: nederlands/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

franais/sys/dos.catalog: franais/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

svenska/sys/dos.catalog: svenska/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

magyar/sys/dos.catalog: magyar/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

italiano/sys/dos.catalog: italiano/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

greek/sys/dos.catalog: greek/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

dansk/sys/dos.catalog: dansk/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

hrvatski/sys/dos.catalog: hrvatski/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@

espaol/sys/dos.catalog: espaol/sys/dos.ct $(DESCRIPTOR_DOS)
	$(NEWCATCOMP) -u -cd $(DESCRIPTOR_DOS) -ct $< -o $@
