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

SHELL = @SHELL@
top_srcdir = @top_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-2.2d.tcl \
klined.tcl notes2.tcl ques5.tcl sentinel1.54.tcl userinfo1.0.tcl

EXESCRIPTS = autobotchk botchk weed

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

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

clean:
	@rm -f *~

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

#safety hash
