# Makefile for ILISP/Inferior Lisp code
# Version: 5.10.1
#
# Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
#               1993, 1994 Ivan Vasquez
#               1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
#               1996-2000 Marco Antoniotti and Rick Campbell
#
# Send mail to 'majordomo@cons.org' to be included in the
# ILISP mailing list.

# Note: this makefile assumes GNU make

# XEmacs is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

# You should have received a copy of the GNU General Public License
# along with XEmacs; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

VERSION = 1.16
AUTHOR_VERSION = 5.10.1
MAINTAINER = ilisp Maintainers <ilisp@cons.org>
PACKAGE = ilisp
PKG_TYPE = regular
REQUIRES = xemacs-base mail-lib fsf-compat eterm
CATEGORY = os

ELCS =  bridge.elc comint-ipc.elc completer.elc custom-ilisp.elc \
	ilisp-acl.elc ilisp-aut.elc ilisp-chs.elc ilisp-cl.elc \
	ilisp-cmp.elc ilisp-cmt.elc ilisp-cmu.elc ilisp-def.elc \
	ilisp-dia.elc ilisp-doc.elc ilisp-ext.elc ilisp-hi.elc \
	ilisp-hlw.elc ilisp-hnd.elc ilisp-ind.elc ilisp-inp.elc \
	ilisp-kcl.elc ilisp-key.elc ilisp-kil.elc ilisp-low.elc \
	ilisp-luc.elc ilisp-mnb.elc ilisp-mod.elc ilisp-mov.elc \
	ilisp-out.elc ilisp-prc.elc ilisp-prn.elc ilisp-rng.elc \
	ilisp-sbcl.elc ilisp-sch.elc ilisp-snd.elc ilisp-sym.elc \
	ilisp-utl.elc ilisp-val.elc ilisp-xfr.elc ilisp-xls.elc \
	ilisp.elc

ELCS_1 = extra/hyperspec.elc
ELCS_1_DEST = ilisp/extra/
ELCS_1_FILES = extra/README extra/hyperspec*

INFO_FILES = docs/$(PACKAGE).info*
TEXI_FILES = docs/$(PACKAGE).texi docs/README docs/doc-changes.txt \
	docs/ilisp-refcard.tgz docs/Makefile
MANUAL = $(PACKAGE)

EXTRA_SOURCES = *.lisp COPYING INSTALLATION HISTORY README Welcome \
	GETTING-ILISP ilisp.emacs Makefile comint-v18.el ilcompat.el \
	ild.el ilfsf18.el ilfsf19.el ilfsf20.el ilisp-bat.el \
	ilisp-bug.el ilisp-cl-easy-menu.el ilisp-imenu.el \
	ilisp-mak.el ilisp-menu.el ilisp-s2c.el \
	ilisp-scheme-easy-menu.el ilisp-src.el illuc19.el ilxemacs.el

DATA_FILES = pictures/ilisp*
DATA_DEST = ilisp/

rules-file = $(wildcard ../../XEmacs.rules)
ifeq ($(rules-file),)
        XEMACS ?= xemacs
	DOCS = ../../man/ilisp
else
        include ../../XEmacs.rules
	DOCS = docs
endif

# If your operating system does not support file links (e.g. Windows),
# change this to an ordinary copy command
LN = ln -s

# Pick the HyperSpec access package you prefer among the ones available in
# directory `extra'
HyperSpec = hyperspec-naggum.el

# APA: XEmacs native NT currently (2000-06-23) has shortcomings we
# need to temporarily work around.
ifeq ($(XEMACS_NATIVE_NT),t)
# APA: XEmacs native NT currently needs this quoting of
# command-line-rguments.
PRELOADS = -eval "(push (expand-file-name \\\".\\\") load-path)"
else
PRELOADS = -eval "(push (expand-file-name \".\") load-path)"
endif

all:: compile $(ELCS_1) auto-autoloads.elc $(DOCS)/ilisp.info

compile:
	$(XEMACS) -batch -l ilisp-mak.el
	(cd extra; $(LN) -f $(HyperSpec) hyperspec.el;true)
	$(XEMACS) -batch --eval '(byte-compile-file "extra/hyperspec.el")'

srckit: srckit-std

binkit: binkit-common

clean::
	rm -f $(ELCS) $(ELCS_1)
	$(MAKE) $(MFLAGS) -C $(DOCS) clean
	rm -f extra/hyperspec.el
