# Makefile for doc/
# $Id: Makefile.in,v 1.10 2000/07/17 21:03:07 guppy Exp $

SHELL = @SHELL@
top_srcdir = @top_srcdir@
srcdir = @srcdir@

@SET_MAKE@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@

DOCS = BOTNET BUG-REPORT CONTENTS KNOWN-PROBLEMS MODULES \
UPDATES.pre1.3 UPDATES1.3 UPDATES1.4 compiling.FAQ eggdrop.doc \
patch.howto tcl-commands.doc tricks

MAN1 = man1/eggdrop.1

WEB_DOCS = $(srcdir)/web_docs/*.html

doofus:
	@echo ""
	@echo "Let's try this from the right directory..."
	@echo ""
	@cd $(top_srcdir); $(MAKE)

all: $(DOCS) $(MAN1)

clean:
	@rm -f *~

install:
	@if test ! -d $(DEST)/doc; then \
		echo "Creating a doc subdirectory."; \
		$(top_srcdir)/mkinstalldirs $(DEST)/doc; \
	fi
	@if test ! -d $(DEST)/doc/man1; then \
		$(top_srcdir)/mkinstalldirs $(DEST)/doc/man1; \
	fi
	@if test ! -d $(DEST)/doc/web_docs; then \
		$(top_srcdir)/mkinstalldirs $(DEST)/doc/web_docs; \
	fi
	@echo "Copying docs."
	@for i in $(DOCS); do \
		$(INSTALL_DATA) $(srcdir)/$$i $(DEST)/doc/; \
	done
	@for i in $(MAN1); do \
		$(INSTALL_DATA) $(srcdir)/$$i $(DEST)/doc/man1/; \
	done
	@if test "x`echo $(WEB_DOCS)`" != "x$(WEB_DOCS)"; then \
		for i in `echo $(WEB_DOCS)`; do \
			$(INSTALL_DATA) $$i $(DEST)/doc/web_docs/; \
		done; \
	fi

#safety hash
