# Generated automatically from Makefile.in by configure.
#                                                    -*-makefile-*-
# Makefile for Color-Mate
#
#$Id: Makefile.in,v 1.4 2003/09/19 14:48:24 elca Exp $

VERSION = 10.6.4#

EMACS = mule -q
INSTALLPATH = /home/vbuilder/elisp/color-mate
SHELL = /bin/sh
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644

#
RGB_EL = color-mate-rgb.el
SRCS_EL = color-mate.el color-mate-face.el \
	color-mate-util.el \
	color-mate-frame-emacs.el color-mate-frame-xemacs.el \
	color-mate-fontset-mule.el color-mate-fontset-emacs.el \
	color-mate-fontset-xemacs.el color-mate-fontset-meadow.el \
	color-mate-fontset-mule-win32.el
COMPILE_PARAM_FILE = color-mate-compile.el
SRCS_OTHER = rgb2el.pl Dot.emacs.default.in \
	color-mate-rgb.el.std Makefile.in \
	configure configure.in install-sh Dot.emacs.default.in
RC_EL = Dot.emacs.default
RC_X = Dot.Xdefaults.default

DOCS = README.color-mate QuickStart.color-mate Q_and_A.color-mate \
	Customize.txt Windows.txt README.color-mate.eng \
	ChangeLog
SRCS = $(SRCS_EL) $(SRCS_OTHER) $(COMPILE_PARAM_FILE)

ALLDIR = kanakan-cursor contrib theme

TARGETS = $(SRCS_EL:.el=.elc) $(RGB_EL:.el=.elc)
LIBS = -l color-mate-rgb.el -l color-mate-face.el \
	-l color-mate-frame-emacs.el -l color-mate-frame-xemacs.el \
	-l color-mate-fontset-xemacs.el \
	-l color-mate-util.el

SUBDIR =  contrib theme

.SUFFIXES: .el .elc

all:: $(TARGETS)

all:: dummy
	for i in $(SUBDIR); do (cd $$i; $(MAKE) all) || exit 1; done
	(rm -f Dot.Xdefaults.default ; ln -s theme/SunnyDay.X Dot.Xdefaults.default) || exit 1

$(RGB_EL): rgb2el.pl
	( showrgb | perl ./rgb2el.pl > ./$(RGB_EL) ) || ( echo "Make rgb table from color-mate-rgb.el.std" ; cp ./color-mate-rgb.el.std ./color-mate-rgb.el) || exit 1

$(TARGETS): $(COMPILE_PARAM_FILE) $(SRCS_EL) $(RGB_EL)
	$(EMACS) -batch -l ./$(COMPILE_PARAM_FILE) $(LIBS) -f batch-byte-compile $(SRCS_EL) $(RGB_EL)

#
clean:
	rm -f $(COLOR_MATE) $(TARGETS) $(RGB_EL) $(XDEFAULTS)
	for i in $(SUBDIR); do (cd $$i; $(MAKE) clean) || exit 1; done

$(INSTALLPATH):
	$(INSTALL) -d $(INSTALLPATH)

install: $(TARGETS) $(SRCS_EL) $(RGB_EL) $(RC_EL) $(INSTALLPATH)
	$(INSTALL_DATA) $(SRCS_EL) $(RGB_EL) $(RC_EL) $(COLOR_MATE) $(TARGETS) $(INSTALLPATH)
	for i in $(SUBDIR) ; do (cd $$i; $(MAKE) install) || exit 1; done
	(cd $(INSTALLPATH) ; rm -f $(RC_X) ; ln -s theme/SunnyDay.X $(RC_X)) || exit 1

#
tar:
	if [ ! -d ../color-mate-$(VERSION)/ ] ; then \
		 mkdir ../color-mate-$(VERSION)/ ; \
	fi
	for i in $(DOCS) $(SRCS); do ( \
	  rm -f ../color-mate-$(VERSION)/$$i ; \
	  cp -p $$i ../color-mate-$(VERSION)/ ; \
	  chmod u+w ../color-mate-$(VERSION)/$$i ; \
	) || exit 1; done
	for i in $(ALLDIR); do (cd $$i; $(MAKE) VERSION="$(VERSION)" tar) || exit 1; done
	( rm -f ../color-mate-$(VERSION).tar.gz ; cd ../ ; tar cvf color-mate-$(VERSION).tar color-mate-$(VERSION) ; gzip -v9 color-mate-$(VERSION).tar )


dummy:

# end
