# Documentation/Makefile

depth = ..
NAME = documentation
SUBDIRS = include man pictures topdocs test
STEPMAKE_TEMPLATES=documentation yodl
README_TOP_FILES=ANNOUNCE-1.22 CHANGES TODO
BLURBS= BLURB # COPERTINA FLAPTEKST
INFO_FILES = $(wildcard $(outdir)/$(package).info*)

include $(depth)/make/stepmake.make 

default: refman.yo local-doc
	true	# urg

%.yo: $(outdir)/%.yo
	ln -f $< $@

check-include-deps:
	$(MAKE) -C include

refman.yo: refman.yo.in check-include-deps

$(outdir)/topinfo.texinfo: refman.yo

$(outdir)/INSTALL.txt: check-include-deps
$(outdir)/INSTALL.html: check-include-deps

info: $(outdir)/$(package).info

local-WWW: copy-for-me

copy-for-me:
	$(foreach a, $(README_TOP_FILES),cp ../$(a) $(outdir)/$(a).txt && ) true

# from (see) stepmake/stepmake/documentation-targets.make
$(outdir)/$(package).info: $(outdir)/topinfo.texinfo $(OUTTEXINFO_FILES)
	$(MAKEINFO) --force -o $@ $(outdir)/topinfo.texinfo

INFOINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(infodir) depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_FILES)" -f $(stepdir)/install-out.sub.make $@

localinstall: # $(INFO_FILES)
	-$(INSTALL) -d $(infodir)
	$(INFOINSTALL)
localuninstall:
	$(INFOINSTALL)

