# Makefile for Wanderlust lisp code

# This file is part of XEmacs.

# XEmacs is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.

# 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.10
AUTHOR_VERSION = 2.15.9
MAINTAINER = Kazuhiko Kiriyama <kiri@truefc.org>
PACKAGE = wl
PKG_TYPE = regular
REQUIRES = apel xemacs-base mail-lib bbdb w3 flim semi fsf-compat gnus net-utils spamfilter texinfmt w3m
CATEGORY = standard

include ../../Local.rules.inc

AUTOLOAD_PATH = wl

ELCS=	wl/elmo/acap.elc \
	wl/elmo/elmo-access.elc \
	wl/elmo/elmo-archive.elc \
	wl/elmo/elmo-cache.elc \
	wl/elmo/elmo-database.elc \
	wl/elmo/elmo-date.elc \
	wl/elmo/elmo-dop.elc \
	wl/elmo/elmo-file.elc \
	wl/elmo/elmo-filter.elc \
	wl/elmo/elmo-flag.elc \
	wl/elmo/elmo-imap4.elc \
	wl/elmo/elmo-internal.elc \
	wl/elmo/elmo-localdir.elc \
	wl/elmo/elmo-localnews.elc \
	wl/elmo/elmo-maildir.elc \
	wl/elmo/elmo-map.elc \
	wl/elmo/elmo-mime.elc \
	wl/elmo/elmo-msgdb.elc \
	wl/elmo/elmo-multi.elc \
	wl/elmo/elmo-net.elc \
	wl/elmo/elmo-nntp.elc \
	wl/elmo/elmo-null.elc \
	wl/elmo/elmo-pipe.elc \
	wl/elmo/elmo-pop3.elc \
	wl/elmo/elmo-rss.elc \
	wl/elmo/elmo-search.elc \
	wl/elmo/elmo-sendlog.elc \
	wl/elmo/elmo-shimbun.elc \
	wl/elmo/elmo-signal.elc \
	wl/elmo/elmo-spam.elc \
	wl/elmo/elmo-split.elc \
	wl/elmo/elmo-util.elc \
	wl/elmo/elmo-vars.elc \
	wl/elmo/elmo-version.elc \
	wl/elmo/elmo.elc \
	wl/elmo/elsp-bogofilter.elc \
	wl/elmo/elsp-bsfilter.elc \
	wl/elmo/elsp-sa.elc \
	wl/elmo/elsp-spamfilter.elc \
	wl/elmo/elsp-spamoracle.elc \
	wl/elmo/mmimap.elc \
	wl/elmo/modb-entity.elc \
	wl/elmo/modb-legacy.elc \
	wl/elmo/modb-standard.elc \
	wl/elmo/modb.elc \
	wl/elmo/pldap.elc \
	wl/elmo/slp.elc \
	wl/elmo/utf7.elc \
	wl/utils/bbdb-wl.elc \
	wl/utils/im-wl.elc \
	wl/utils/rfc2368.elc \
	wl/utils/ssl.elc \
	wl/utils/wl-addrbook.elc \
	wl/utils/wl-complete.elc \
	wl/utils/wl-mailto.elc \
	wl/wl/wl-acap.elc \
	wl/wl/wl-action.elc \
	wl/wl/wl-address.elc \
	wl/wl/wl-addrmgr.elc \
	wl/wl/wl-batch.elc \
	wl/wl/wl-demo.elc \
	wl/wl/wl-dnd.elc \
	wl/wl/wl-draft.elc \
	wl/wl/wl-e21.elc \
	wl/wl/wl-expire.elc \
	wl/wl/wl-fldmgr.elc \
	wl/wl/wl-folder.elc \
	wl/wl/wl-highlight.elc \
	wl/wl/wl-message.elc \
	wl/wl/wl-mime.elc \
	wl/wl/wl-mule.elc \
	wl/wl/wl-news.elc \
	wl/wl/wl-refile.elc \
	wl/wl/wl-score.elc \
	wl/wl/wl-spam.elc \
	wl/wl/wl-summary.elc \
	wl/wl/wl-template.elc \
	wl/wl/wl-thread.elc \
	wl/wl/wl-util.elc \
	wl/wl/wl-vars.elc \
	wl/wl/wl-version.elc \
	wl/wl/wl-xmas.elc \
	wl/wl/wl.elc

EXTRA_SOURCES =	wl/BUGS \
		wl/ChangeLog.org \
		wl/COPYING \
		wl/INSTALL \
		wl/NEWS \
		wl/README.md \
		wl/etc/ChangeLog.etc.2 \
		wl/etc/ChangeLog.etc.3 \
		wl/etc/VERSION \
		wl/doc/TODO \
		wl/elmo/ChangeLog.elmo \
		wl/utils/ChangeLog.utils \
		wl/wl/ChangeLog.wl

EXPLICIT_DOCS =	wl/doc/wl.texi

EXTRA_DOC_FILES = wl/doc/wl.pdf \
		  wl/doc/wl-refcard.pdf

EXTRA_DEPENDENCIES = wl/doc/wl.pdf \
		     wl/doc/wl-refcard.pdf

DATA_FILES = wl/etc/icons/access.xpm \
	     wl/etc/icons/archive.xpm \
	     wl/etc/icons/closed.xpm \
	     wl/etc/icons/draft.xpm \
	     wl/etc/icons/elmo.xpm \
	     wl/etc/icons/file.xpm \
	     wl/etc/icons/filter.xpm \
	     wl/etc/icons/imap.xpm \
	     wl/etc/icons/internal.xpm \
	     wl/etc/icons/letter.xpm \
	     wl/etc/icons/local.xpm \
	     wl/etc/icons/localnews.xpm \
	     wl/etc/icons/maildir.xpm \
	     wl/etc/icons/multi.xpm \
	     wl/etc/icons/news.xpm \
	     wl/etc/icons/nmz.xpm \
	     wl/etc/icons/no-letter.xpm \
	     wl/etc/icons/opened.xpm \
	     wl/etc/icons/pipe.xpm \
	     wl/etc/icons/plugged.xpm \
	     wl/etc/icons/pop.xpm \
	     wl/etc/icons/queue.xpm \
	     wl/etc/icons/shimbun.xpm \
	     wl/etc/icons/trash-e.xpm \
	     wl/etc/icons/trash.xpm \
	     wl/etc/icons/unplugged.xpm \
	     wl/etc/icons/wl-alpha-logo.img \
	     wl/etc/icons/wl-alpha-logo.xbm \
	     wl/etc/icons/wl-alpha-logo.xpm \
	     wl/etc/icons/wl-alpha-xmas-logo.img \
	     wl/etc/icons/wl-alpha-xmas-logo.xbm \
	     wl/etc/icons/wl-alpha-xmas-logo.xpm \
	     wl/etc/icons/wl-beta-logo.img \
	     wl/etc/icons/wl-beta-logo.xbm \
	     wl/etc/icons/wl-beta-logo.xpm \
	     wl/etc/icons/wl-beta-xmas-logo.img \
	     wl/etc/icons/wl-beta-xmas-logo.xbm \
	     wl/etc/icons/wl-beta-xmas-logo.xpm \
	     wl/etc/icons/wl-draft-insert-signature-up.xpm \
	     wl/etc/icons/wl-draft-kill-up.xpm \
	     wl/etc/icons/wl-draft-save-and-exit-up.xpm \
	     wl/etc/icons/wl-draft-send-from-toolbar-down.xpm \
	     wl/etc/icons/wl-draft-send-from-toolbar-up.xpm \
	     wl/etc/icons/wl-draft-up.xpm \
	     wl/etc/icons/wl-draft-yank-original-up.xpm \
	     wl/etc/icons/wl-exit-up.xpm \
	     wl/etc/icons/wl-folder-check-current-entity-up.xpm \
	     wl/etc/icons/wl-folder-empty-trash-up.xpm \
	     wl/etc/icons/wl-folder-goto-draft-folder-up.xpm \
	     wl/etc/icons/wl-folder-jump-to-current-entity-no-sync-up.xpm \
	     wl/etc/icons/wl-folder-jump-to-current-entity-up.xpm \
	     wl/etc/icons/wl-folder-next-entity-up.xpm \
	     wl/etc/icons/wl-folder-prev-entity-up.xpm \
	     wl/etc/icons/wl-folder-read-up.xpm \
	     wl/etc/icons/wl-folder-select-entity-up.xpm \
	     wl/etc/icons/wl-folder-sync-current-entity-up.xpm \
	     wl/etc/icons/wl-folder-zoom-entity-up.xpm \
	     wl/etc/icons/wl-message-extract-content-up.xpm \
	     wl/etc/icons/wl-message-next-content-up.xpm \
	     wl/etc/icons/wl-message-play-content-up.xpm \
	     wl/etc/icons/wl-message-prev-content-up.xpm \
	     wl/etc/icons/wl-message-quit-up.xpm \
	     wl/etc/icons/wl-message-read-up.xpm \
	     wl/etc/icons/wl-stable-logo.img \
	     wl/etc/icons/wl-stable-logo.xbm \
	     wl/etc/icons/wl-stable-logo.xpm \
	     wl/etc/icons/wl-stable-xmas-logo.img \
	     wl/etc/icons/wl-stable-xmas-logo.xbm \
	     wl/etc/icons/wl-stable-xmas-logo.xpm \
	     wl/etc/icons/wl-summary-delete-up.xpm \
	     wl/etc/icons/wl-summary-dispose-up.xpm \
	     wl/etc/icons/wl-summary-exit-up.xpm \
	     wl/etc/icons/wl-summary-forward-up.xpm \
	     wl/etc/icons/wl-summary-jump-to-current-message-up.xpm \
	     wl/etc/icons/wl-summary-next-page-up.xpm \
	     wl/etc/icons/wl-summary-next-up.xpm \
	     wl/etc/icons/wl-summary-prev-page-up.xpm \
	     wl/etc/icons/wl-summary-prev-up.xpm \
	     wl/etc/icons/wl-summary-read-up.xpm \
	     wl/etc/icons/wl-summary-reply-up.xpm \
	     wl/etc/icons/wl-summary-reply-with-citation-up.xpm \
	     wl/etc/icons/wl-summary-set-flags-up.xpm \
	     wl/etc/icons/wl-summary-sync-force-update-up.xpm \
	     wl/etc/icons/wl-write-current-folder-up.xpm
DATA_DEST =  $(PACKAGE)
DATA_1_FILES = wl/samples/en/dot.addresses \
	       wl/samples/en/dot.folders \
	       wl/samples/en/dot.wl
DATA_1_DEST =  $(PACKAGE)/samples/en

ifeq ($(BUILD_WITHOUT_MULE),)
REQUIRES += latin-euro-standards mule-ucs
COMPILE_INFO_AS_MULE = t
EXTRA_SOURCES += wl/BUGS.ja \
		 wl/INSTALL.ja \
		 wl/NEWS.ja \
		 wl/README.ja \
		 wl/doc/TODO.ja \
		 wl/etc/ja.Emacs \
		 wl/etc/ChangeLog.etc.1.ja \
		 wl/etc/ChangeLog.etc.2.ja \
		 wl/etc/ChangeLog.etc.3.ja

EXPLICIT_DOCS    += wl/doc/wl-ja.texi
EXTRA_TEXI_FILES += wl/doc/version.texi

EXTRA_DOC_FILES  += wl/doc/wl-ja.pdf \
		    wl/doc/wl-refcard-ja.pdf

EXTRA_DEPENDENCIES += wl/doc/wl-ja.pdf \
		      wl/doc/wl-refcard-ja.pdf
DATA_2_FILES = wl/samples/ja/dot.addresses \
	       wl/samples/ja/dot.folders \
	       wl/samples/ja/dot.wl
DATA_2_DEST =  $(PACKAGE)/samples/ja
PRELOADS = -l un-define -eval '(setq file-coding-system (quote utf-8))'
endif

PRELOADS += -eval '(setq load-path (append (list "./wl/elmo" "./wl/utils" "./wl/wl" "./wl") load-path))' -l WL-MK -f compile-wl-package-xmas NONE NONE \#

include ../../XEmacs.rules

wl/doc/wl-ja.dvi: wl/doc/wl-ja.texi
	cd ./wl/doc && genv TEX=ptex BIBTEX=pbibtex $(TEXI2DVI) -o `basename $@` `basename $<`

wl/doc/wl-ja.pdf: wl/doc/wl-ja.dvi
	cd ./wl/doc && dvipdfmx `basename $<`

wl/doc/wl-refcard-ja.pdf: wl/doc/wl-refcard-ja.tex
	cd ./wl/doc && ptex2pdf `basename $<`

wl/doc/wl-refcard.dvi: wl/doc/wl-refcard.tex
	cd ./wl/doc && tex `basename $<`

wl/doc/wl-refcard.pdf: wl/doc/wl-refcard.dvi
	cd ./wl/doc && dvipdfmx `basename $<`
