Makefile at [7cfeb53c9c]

File client/Makefile artifact fec1dfff01 part of check-in 7cfeb53c9c


include ../Makefile.defs

all:
	@echo 'Nothing to do.'

install:
	@echo TCLDIR="$(TCLDIR)"; \
	TCLDIR="$(TCLDIR)"; \
	if test -z "$${TCLDIR}"; then \
		for dir in $(TCLCONFIGPATH); do \
			if test -f "$${dir}/tclConfig.sh"; then \
				echo source "$${dir}/tclConfig.sh"; \
				source "$${dir}/tclConfig.sh"; \
				echo TCLDIR="$${TCL_PACKAGE_PATH}"; \
				TCLDIR="$${TCL_PACKAGE_PATH}"; \
				break; \
			fi; \
		done; \
	fi; \
	TCLDIR=$$(echo "$${TCLDIR}" | sed 's@^ *@@;s@ *$$@@'); \
	test -n "$${TCLDIR}" || (echo Unable to locate tclConfig.sh.  Try specifying TCLDIR.; exit 1) || exit 1; \
	if test ! -e "$(DESTDIR)$${TCLDIR}/teapotclient$(TEAPOTCLIENTVERS)"; then \
		echo mkdir -p "$(DESTDIR)$${TCLDIR}/teapotclient$(TEAPOTCLIENTVERS)"; \
		mkdir -p "$(DESTDIR)$${TCLDIR}/teapotclient$(TEAPOTCLIENTVERS)" || exit 1; \
	fi; \
	echo cp "lib/teapotclient$(TEAPOTCLIENTVERS)"/*.tcl "$(DESTDIR)$${TCLDIR}/teapotclient$(TEAPOTCLIENTVERS)/"; \
	cp "lib/teapotclient$(TEAPOTCLIENTVERS)"/*.tcl "$(DESTDIR)$${TCLDIR}/teapotclient$(TEAPOTCLIENTVERS)/" || exit 1
	cp teapot-client.tcl "$(DESTDIR)$(prefix)/bin/teapot-client"
	chmod 755 "$(DESTDIR)$(prefix)/bin/teapot-client"

teapot-client.kit: teapot-client.tcl lib/teapotclient0.1/pkgIndex.tcl lib/teapotclient0.1/teapotclient.tcl
	rm -rf teapot-client-tmp.vfs
	mkdir teapot-client-tmp.vfs
	cp -r lib teapot-client.tcl teapot-client-tmp.vfs/
	echo 'package require starkit' > teapot-client-tmp.vfs/main.tcl
	echo 'starkit::startup' >> teapot-client-tmp.vfs/main.tcl
	echo 'source $$starkit::topdir/teapot-client.tcl' >> teapot-client-tmp.vfs/main.tcl
	./teapot-client.tcl get teapot-client-tmp.vfs/ tcl tcl md5 fileutil vfs::zip || \
		teapot-client get teapot-client-tmp.vfs/ tcl tcl md5 fileutil vfs::zip
	$(TCLKIT) support/sdx.kit wrap teapot-client-tmp.kit
	rm -rf teapot-client-tmp.vfs
	mv teapot-client-tmp.kit teapot-client.kit

clean:
	rm -f teapot-client.kit
	rm -rf teapot-client-tmp.vfs

distclean: clean

.PHONY: all install clean distclean