#
# Makefile for octave's doc directory
#
# John W. Eaton
# jwe@octave.org

TOPDIR = ..

srcdir = .
top_srcdir = ..
abs_top_srcdir = /home/simon/build/Octave/octave-3.2.3


include $(TOPDIR)/Makeconf

INSTALL = /scratchbox/tools/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644

SOURCES =

DISTFILES = $(addprefix $(srcdir)/, Makefile.in ChangeLog conf.texi.in texinfo.tex)

SUBDIRS = faq interpreter liboctave refcard

DISTSUBDIRS = $(SUBDIRS)

all: conf.texi $(SUBDIRS)
.PHONY: all

conf.texi: conf.texi.in $(TOPDIR)/Makeconf
	@$(do-subst-texinfo-vals)

../BUGS ../INSTALL.OCTAVE:
	$(MAKE) -C interpreter ../$@
.PHONY: ../BUGS ../INSTALL.OCTAVE

$(SUBDIRS):
	$(MAKE) -C $@ all
.PHONY: $(SUBDIRS)

install install-strip uninstall clean mostlyclean distclean maintainer-clean::
	@$(subdir-for-command)
.PHONY: install install-strip uninstall
.PHONY: clean mostlyclean distclean maintainer-clean

tags TAGS:: $(SOURCES)
	$(SUBDIR_FOR_COMMAND)

tags::
	ctags $(SOURCES)

TAGS:: $(SOURCES)
	etags $(SOURCES)

distclean::
	rm -f Makefile

maintainer-clean::
	rm -f tags TAGS Makefile

dist:
	ln $(DISTFILES) ../`cat ../.fname`/doc
	for dir in $(DISTSUBDIRS); do mkdir ../`cat ../.fname`/doc/$$dir; $(MAKE) -C $$dir $@; done
.PHONY: dist
