## -*- Mode: Makefile -*-
## 
## $Source: /u/hucka/Projects/Soar/Interface/Src/RCS/Makefile,v $
## $Id: Makefile,v 0.6 1994/06/08 17:34:15 hucka Exp $
## 
## Description       : Makefile for SDE
## Original author(s): Michael Hucka <hucka@pelican.eecs.umich.edu>
## Organization      : University of Michigan AI Lab
## 
## To use this makefile, first check the name of your emacs.  Then:
##
## 1) If the name of your emacs executable is the same as the
##    value of the definition of "EMACS" below, then you can make
##    this system by simply cd-ing to the directory of this file and
##    typing "make" in a shell.
##
## 2) If the name of your emacs executable is different, then
##    can make this system by typing
##               make EMACS=xxxx
##    where "xxxx" is the name of your emacs executable.

EMACS   = emacs

SRCS    = sde-compat.el \
	  sde-emacs19.el \
	  sde-feedback.el \
	  sde-find.el \
	  sde-header.el \
	  sde-highlight.el \
	  sde-lemacs.el \
	  sde-maint.el \
	  sde-repos.el \
	  sde-search.el \
	  sde-site.el \
	  sde-soar-mode.el \
	  sde-version.el \
	  sde.el \
          completer.el \
	  conversion.el \
	  header.el \
	  powerkey.el \
	  tagify.el \
          stags.c

MANUAL  = manual/README \
	  manual/bk11.sty \
	  manual/book.sty \
	  manual/format.sty \
	  manual/fullpage.sty \
	  manual/latexinfo.sty \
	  manual/sde.info \
	  manual/sde.ps \
	  manual/sde.tex

MISC 	= ANNOUNCEMENT \
	  COPYING \
	  Makefile \
	  README \
	  sde-refcard.ps \
	  completer.lcd \
	  conversion-notes.txt

#-----------------------------------------------------------------------------
# Basic rules & actions.
#-----------------------------------------------------------------------------

.SUFFIXES: .elc .el .tar .Z .uu .c

all:	compile stags permissions links tags notices

compile:
	make clean
	${EMACS} -batch -q -l sde-maint.el -f sde-maint-compile-distribution	

tags:
	etags *.el *.c

permissions:
	chmod a+r * */*

links:
	ln -s manual/sde.info sde.info

notices:
	@echo ""
	@echo "Finished compiling SDE."
	@echo "Don't forget to update \"sde-site.el\" for your installation."
	@echo ""

package: ${SRCS} ${MANUAL} ${MISC}
	rm -f sde.tar sde.tar.Z
	/bin/tar cLf sde.tar ${SRCS} ${MANUAL} ${MISC}
	compress sde.tar

clean:
	rm -f *.elc TAGS stags


#-----------------------------------------------------------------------------
# Special rules. 
#-----------------------------------------------------------------------------

stags: stags.c
	cc -DETAGS stags.c -o stags

