# Makefile for scripts/
# $Id: Makefile.in,v 1.11 2000/11/08 19:52:38 guppy Exp $

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

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

DOCS = CONTENTS

SCRIPTS = action.fix.tcl alltools.tcl compat.tcl getops.tcl \
klined.tcl notes2.tcl ques5.tcl sentinel.tcl userinfo.tcl cmd_resolve.tcl

EXESCRIPTS = autobotchk botchk weed
DATADIR = @datadir@

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

all: $(DOCS) $(SCRIPTS) $(EXESCRIPTS)

clean:
	@rm -f *~

install:
	@if test ! -d $(DATADIR)/scripts; then \
		echo "Creating a scripts subdirectory."; \
		$(top_srcdir)/misc/mkinstalldirs $(DATADIR)/scripts; \
		echo "Copying scripts."; \
		for i in $(DOCS); do \
			$(INSTALL_DATA) $(srcdir)/$$i $(DATADIR)/scripts/; \
		done; \
		for i in $(SCRIPTS); do \
			$(INSTALL_DATA) $(srcdir)/$$i $(DATADIR)/scripts/; \
		done; \
		for i in $(EXESCRIPTS); do \
			$(INSTALL_SCRIPT) $(srcdir)/$$i $(DATADIR)/scripts/; \
		done; \
		if test ! "x`echo $(srcdir)/help/*.help`" = "x$(srcdir)/help/*.help"; then \
			if test ! -d $(DATADIR)/help; then \
				echo "Creating 'help' subdirectory."; \
				$(top_srcdir)/misc/mkinstalldirs $(DATADIR)/help; \
			fi; \
			for i in $(srcdir)/help/*.help; do \
				$(INSTALL_DATA) $$i $(DATADIR)/help/; \
			done; \
		fi; \
		if test ! "x`echo $(srcdir)/help/msg/*.help`" = "x$(srcdir)/help/msg/*.help"; then \
			if test ! -d $(DATADIR)/help/msg; then \
				echo "Creating 'help/msg' subdirectory."; \
				$(top_srcdir)/misc/mkinstalldirs $(DATADIR)/help/msg; \
			fi; \
			for i in $(srcdir)/help/msg/*.help; do \
				$(INSTALL_DATA) $$i $(DATADIR)/help/msg/; \
			done; \
		fi; \
		if test ! "x`echo $(srcdir)/help/set/*.help`" = "x$(srcdir)/help/set/*.help"; then \
			if test ! -d $(DATADIR)/help/set; then \
				echo "Creating 'help/set' subdirectory."; \
				$(top_srcdir)/misc/mkinstalldirs $(DATADIR)/help/set; \
			fi; \
			for i in $(srcdir)/help/set/*.help; do \
				$(INSTALL_DATA) $$i $(DATADIR)/help/set/; \
			done; \
		fi; \
	fi

#safety hash
