# Dieses Makefile stellt die Menüs im CygnusED 3.5 auf xen oder topaz.font um

script = ram:cedpatch.cvt
ced    = ram:ced

# GNU Make will ein /dev/path für ein dev:path in den dependencies sehen.
# Daher baue ich $(ced) mit $(subst ...) um, was aber erzwingt, daß $(ced)
# KEIN relativer Pfad sein darf, sondern unbedingt ein `dev:' braucht.

.PHONY: all xen topaz

# Kindersicherung:

all:
	more Makefile

# 1> make xen -- stellt den ced auf Menüs im xen.font um

xen: $(patsubst %,/%,$(subst :,/,$(ced)))
	echo > $(script) "\"topaz.font\",0,\"topaz.font\",0 ->" \
	                 "\"xen.font\",0,0,0,\"xen.font\",0,0,0;"
	echo >> $(script) "8,0,1,\"topaz.font\",0,0,0,0,89,222,0,9 ->" \
	                  "8,0,1,\"xen.font\",0,0,0,0,0,0,89,222,0,8;"
	echo >> $(script) "\"Topaz 80 column\",0->\"XEN 100 column \",0;" \
	                  "\"Topaz 60 column\",0->\"Topaz 80 column\",0;"
	cvt -f $(script) $(ced) -o %s


# 2> make topaz -- stellt den Originalzustand wieder her

topaz: $(patsubst %,/%,$(subst :,/,$(ced)))
	echo > $(script) "\"xen.font\",0,0,0 -> \"topaz.font\",0;"
	echo >> $(script) "8,0,1,\"xen.font\",0,0,0,0,0,0,89,222,0,8 ->" \
	                  "8,0,1,\"topaz.font\",0,0,0,0,89,222,0,9;"
	echo >> $(script) "\"XEN 100 column \",0->\"Topaz 80 column\",0;" \
	                  "\"Topaz 80 column\",0->\"Topaz 60 column\",0;"
	cvt -f $(script) $(ced) -o %s
