#
#	$Date: 2002/02/16 08:20:44 $
#	$Revision: 1.4 $
#
VERSION = 1.2.6

all:
	cd romakana; make
	cd asearch; make
	cd server; make
	cd Emacs; make

clean:
	cd romakana; make clean
	cd asearch; make clean
	cd server; make clean
	cd Emacs; make clean
	-\rm -f *~
	-\rm -f #* 
	-\rm -f config.cache config.log config.status

FILES=	OpenPOBox/index.html \
	OpenPOBox/diary.html \
	OpenPOBox/Makefile \
	OpenPOBox/configure \
	OpenPOBox/configure.in \
	OpenPOBox/include \
	OpenPOBox/Emacs/Makefile \
	OpenPOBox/Emacs/index.html \
	OpenPOBox/Emacs/dictionary.html \
	OpenPOBox/Emacs/history.html \
	OpenPOBox/Emacs/install.html \
	OpenPOBox/Emacs/sources.html \
	OpenPOBox/Emacs/usage.html \
	OpenPOBox/Emacs/emacs.png \
	OpenPOBox/PalmInline/dictionary.html \
	OpenPOBox/PalmInline/history.html \
	OpenPOBox/PalmInline/index.html \
	OpenPOBox/PalmInline/install.html \
	OpenPOBox/PalmInline/links.html \
	OpenPOBox/PalmInline/module.html \
	OpenPOBox/PalmInline/pbinline.html \
	OpenPOBox/PalmInline/pref.html \
	OpenPOBox/PalmInline/tips.html \
	OpenPOBox/PalmInline/todo.html \
	OpenPOBox/PalmInline/usage.html \
	OpenPOBox/PalmInline/figures/*.gif \
	OpenPOBox/PalmRecog/index.html \
	OpenPOBox/PalmRecog/*.gif \
	OpenPOBox/asearch/Makefile \
	OpenPOBox/asearch/asearch.html \
	OpenPOBox/romakana/index.html \
	OpenPOBox/romakana/Makefile \
	OpenPOBox/romakana/rklist2rkc.in \
	OpenPOBox/romakana/rklist2rkel.in \
	OpenPOBox/romakana/rklist2rkpl.in \
	OpenPOBox/romakana/romakana.pl \
	OpenPOBox/romakana/romakana.h \
	OpenPOBox/romakana/rklist \
	OpenPOBox/romakana/rklist_pbt \
	OpenPOBox/romakana/codeconv.pl \
	OpenPOBox/doc/api.html \
	OpenPOBox/doc/index.html \
	OpenPOBox/doc/papers.html \
	OpenPOBox/doc/techfaq.html \
	OpenPOBox/doc/kanakanpobox.pdf \
	OpenPOBox/doc/*.gif \
	OpenPOBox/info/* \
	OpenPOBox/dict/index.html \
	OpenPOBox/dict/data/index.html \
	OpenPOBox/dict/data/fugodic \
	OpenPOBox/dict/tools/index.html \
	OpenPOBox/dict/tools/dicmerge.in \
	OpenPOBox/dict/tools/dicand.in \
	OpenPOBox/dict/tools/dicdiff.in \
	OpenPOBox/dict/tools/kanadic2romadic.in \
	OpenPOBox/dict/tools/romadic2kanadic.in \
	OpenPOBox/dict/tools/skkdic2kanadic.in \
	OpenPOBox/dict/tools/prc2dic.in \
	OpenPOBox/dict/tools/pdb2dic.in \
	OpenPOBox/dict/tools/dic2pdb.in \
	OpenPOBox/implementations/PenUNIX.html \
	OpenPOBox/implementations/index.html \
	OpenPOBox/implementations/*.gif \
	OpenPOBox/implementations/*.jpg \
	OpenPOBox/server/Makefile.in \
	OpenPOBox/server/gc.h \
	OpenPOBox/server/history.html \
	OpenPOBox/server/index.html \
	OpenPOBox/server/install.html \
	OpenPOBox/server/pbserver.html \
	OpenPOBox/server/poboxlib.html \
	OpenPOBox/server/protocol.html \
	OpenPOBox/server/server.html \
	OpenPOBox/server/template.html \
	OpenPOBox/server/lookup.[ch] \
	OpenPOBox/wtangle/wtangle.in \
	OpenPOBox/wtangle/wtangle.html.in \
	OpenPOBox/wtangle/*.gif \
	OpenPOBox/ML/*

SRC=/home/masui/OpenPOBox
DEST=/www/www.pitecan.com

makeinfo:
	tar cvf - info | (cd $(DEST)/OpenPOBox; tar xvf -)
	-\cp diary.html $(DEST)/OpenPOBox/diary.html

makedist:
	autoconf
	cd ..; tar cvf - $(FILES) | gzip > $(SRC)/dist/pobox-$(VERSION).tgz
	-\cp $(SRC)/dist/pobox-$(VERSION).tgz $(SRC)/dist/pobox.tgz
web: makedist
	cd $(DEST); \rm -r -f OpenPOBox
	cd $(DEST); gzip -d < $(SRC)/dist/pobox-$(VERSION).tgz | tar xvf -
	mkdir $(DEST)/OpenPOBox/dist
	-\cp dist/pobox-*.tgz $(DEST)/OpenPOBox/dist
	-\cp dist/pbinline*.lzh $(DEST)/OpenPOBox/dist
	cd $(DEST)/OpenPOBox/dist; ln pobox-$(VERSION).tgz pobox.tgz
	cp $(SRC)/dict/data/*.roma $(DEST)/OpenPOBox/dict/data
	cp $(SRC)/dict/data/*.ascii $(DEST)/OpenPOBox/dict/data
	mkdir $(DEST)/OpenPOBox/dict/data/rail
	cp $(SRC)/dict/data/rail/* $(DEST)/OpenPOBox/dict/data/rail
	cp $(SRC)/implementations/*.lzh $(DEST)/OpenPOBox/implementations
	cp $(SRC)/implementations/*.tar.gz $(DEST)/OpenPOBox/implementations
	pbinline

