#
# Makefile
#
# Makefile for edict project
#
# Created:  Mon Dec  9 16:18:29 PST 2002
# Authors:  Vishal Verma
#

prefix = /usr/bin
exec = edict
thes = ethes
version = 
export version

all:
	@echo "Run \"make install\" as root if you want to install edict."
	@echo "edict will be installed by default in $(prefix). To change that use:"
	@echo "make prefix=/my/path install"

install:
	@echo "------------------------------------------------------"
	@echo "Please view the README file, before using the program."
	@echo "------------------------------------------------------"
	@echo "Installing as $(prefix)/$(exec)"
	@install -D $(exec) $(prefix)/$(exec)
	@[ -f $(prefix)/$(thes) ] || ln -s $(prefix)/$(exec) $(prefix)/$(thes)
	@echo "Install successful"
	@echo "Now you can run edict as:"
	@echo "    edict <word>"
	@echo "which will show the meaning of <word>"
	@echo "You can also run ethes as:"
	@echo "    ethes <word>"
	@echo "which will show the synonyms/antonyms for <word>"
	

dist:
	@cd ..;	\
	mv src edict;	\
	echo; echo Creating tar.gz ...;	\
	version=;	\
	tar --exclude edict/CVS -zcvf edict-`grep 'version =' edict/edict | awk '{print $4;}' | cut -d\' -f2`.tar.gz edict;	\
	echo; echo Creating .zip ...;	\
	zip -r edict-`grep 'version =' edict/edict | awk '{print $4;}' | cut -d\' -f2`.zip edict -x edict/CVS/\*;	\
	mv edict src
