+../html ../info:
+ @mkdir $@
+
+../html/%.html: %.sgml header.html | ../html
+ @cd ../html && linuxdoc -B html -s 0 -T $(TOC_LEVEL) -H ../doc/header.html ../doc/$<
+
+../html/doc.%: doc.% | ../html
+ cp $< ../html
+
+../info/%.info: %.sgml | ../info
+ @cd ../info && linuxdoc -B info ../doc/$<
+
+clean:
+ $(RM) -r ../html ../info
+
+install:
+ $(if $(PREFIX),,$(error variable "PREFIX" must be set))
+ifeq ($(wildcard ../html),../html)
+ $(INSTALL) -d $(DESTDIR)$(htmldir)
+ $(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)
+endif
+ifeq ($(wildcard ../info),../info)
+ $(INSTALL) -d $(DESTDIR)$(infodir)
+ $(INSTALL) -m0644 ../info/*.* $(DESTDIR)$(infodir)
+endif
+
+zip:
+ifneq "$(wildcard ../html)" ""
+ @cd .. && zip cc65 html/*.*
+endif
+
+endif # CMD_EXE
+
+all mostlyclean: