📄 makefile
字号:
# CVS ID: $Id: makefile,v 1.13 2001/03/28 18:37:56 wastl Exp $
# Makefile for JWebMail
#
# Copyright (C) 2000 Sebastian Schaffert
#
# This program 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
# of the License, or (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.PHONY: compile compile-fast clean contrib dist dist-bin dist-src jar-fast jar
.PHONY: run doc parser readme xml debian lint
SHELL=/bin/bash
SUBDIRS_JAR_COMMON=ui server debug config misc storage xml exceptions
SUBDIRS_JAR_WEBENGRUVEN=auth
# Modified by exce, start.
# Add org.bulbul.webmail package.
SUBDIRS_JAR_BULBUL=xmlresource util
# Modified by exce, end.
SUBDIRS_JAR_STANDALONE=standalone
SUBDIRS_JAR_SERVLET=servlet
#FILES_JAR_POP3=dog/mail/util/*.class dog/mail/pop3/*.class META-INF/mime.types META-INF/javamail.providers
#FILES_JAR_MBOX=dog/mail/util/*.class dog/mail/mbox/*.class META-INF/mime.types META-INF/javamail.providers
#FILES_JAR_NNTP=dog/mail/nntp/*.class dog/util/*.class dog/mail/util/*.class META-INF/mime.types META-INF/javamail.providers
SUBDIRS_DISTCLEAN=standalone/
# Make those before compiling
SUBDIRS_PARSER=standalone/
# Make those after compiling
SUBDIRS_DATA=
# Modified by exce, start.
# Add a language
# LANGUAGES=en de es
LANGUAGES=en de es zh
DEFAULT_LANG=en
# Modified by exce, end.
THEMES=classic bibop
TAR=/bin/tar
UNZIP=unzip
ZIP=zip
# Recode needed to convert ISO-8859-1 templates to UTF-8
# comment out to disable
RECODE=recode
# BSD compatible install utility
INSTALL=install
BASEDIR:=$(shell cd .. && pwd)
CONTRIBDIR:=$(BASEDIR)/contrib
LIBDIR:=$(BASEDIR)/lib
DATADIR:=$(BASEDIR)/data
PKGDIR=net/wastl/webmail
BUILDDIR=build
WEBENGRUVEN_PKGDIR=org/webengruven/webmail
# Modified by exce, start.
# Add org.bulbul.webmail package.
BULBUL_PKGDIR=org/bulbul/webmail
# Modified by exce, end.
MAKETEST:=($shell make -v | grep GNU | sed 's/.*GNU.*/GNU/')
ifndef MAKETEST
$(error "This is not GNU make, aborting.")
endif
ifndef BASEDIR
$(error "Aborting, make would delete whole disk. Please use GNU make.")
endif
VERSION=$(shell grep "String VERSION" net/wastl/webmail/server/WebMailServer.java | cut --delimiter="\"" -f 2)
# 9/24/2000 devink - make it easier to install plugins and authenticators
# not stored in the main plugin directory
PLUGINDIRS=net/wastl/webmail/plugins org/webengruven/webmail/plugins
PLUGINLIST=$(shell find $(PLUGINDIRS) -name "*.java" -exec basename \{\} \; | sed 's/java/class/')
AUTHDIRS=net/wastl/webmail/authenticators org/webengruven/webmail/authenticators
AUTHLIST=$(shell find $(AUTHDIRS) -name "*.java" -exec basename \{\} \; | sed 's/java/class/')
# Modified by exce, start.
# We use JDK's javac compiler.
# Usage of javac is default now
JAVAC=javac -deprecation
# Warning: jikes seems to produce some weird code on Solaris :-(
#JAVAC=jikes
# Modified by exce, end.
# Which java interpreter to use
JAVA=java
# Generate debugging information
JFLAGS=-g
# Show deprecated API usage
#JFLAGS="-deprecation"
# Enable to do optimization
#JFLAGS="-O"
# Modified by exce, start.
# We use JDK's jar tool.
# Use JDK's jar, tool
#JAR=jar
# or try fastjar (http://fastjar.sourceforge.net)
#JAR=fastjar
JAR=jar
# Modified by exce, end.
JAVACUP="$(JAVA) -classpath $(CONTRIBDIR)/compile/JavaCUP.jar:${CLASSPATH} java_cup.Main -nowarn"
JFLEX="$(JAVA) -classpath $(CONTRIBDIR)/compile/JFlex.jar:${CLASSPATH} JFlex.Main -q"
XSLT=$(JAVA) -classpath $(CONTRIBDIR)/xalan.jar:$(CONTRIBDIR)/xerces.jar:${CLASSPATH} org.apache.xalan.xslt.Process
# Set the classpath to all our required files
# TODO:
# Remove xercesSamples.jar from source and dist.
CLASSPATH=.:$(CONTRIBDIR)/servlet-2.0.jar:$(LIBDIR)/mail.jar:$(LIBDIR)/ssl/itissl.jar:$(LIBDIR)/Tidy.jar:$(LIBDIR)/activation.jar:$(LIBDIR)/gnu-regexp-1.0.8.jar:$(LIBDIR)/java_cup.jar:$(PKGDIR)/authenticators/:$(PKGDIR)/plugins/:$(LIBDIR)/mm.mysql.jar:$(LIBDIR)/xalan.jar:$(LIBDIR)/xerces.jar:$(LIBDIR)/xercesSamples.jar:$(LIBDIR)/javaOTP.jar:$(WEBENGRUVEN_PKGDIR)/plugins/:$(shell echo $$CLASSPATH)
# Modified by exce, start
# Comments from exce:
# use "install-fast" target to make without clean.
# Modified by exce, end
all: install
compile:
@if [ "${JAVAC}" = "jikes" ]; then ( echo "*** Warning: jikes seems to produce some weird code. Please use javac. ***" ) fi;
@echo ================================================================ ;\
echo === Compiling all java files for WebMail ${VERSION} ; \
echo ================================================================
@echo - WebMail core files
# Modified by exce, start
@find "org" -name "*.java" | xargs ${JAVAC} -d $(BUILDDIR) -classpath ${CLASSPATH} ${JFLAGS}
@find "net" -name "*.java" | xargs ${JAVAC} -d $(BUILDDIR) -classpath ${CLASSPATH} ${JFLAGS}
# Modified by exce, end
parser:
@for i in ${SUBDIRS_PARSER}; do \
( \
echo "make[1]: Entering directory \`$(PKGDIR)/$$i'" ; \
cd $(PKGDIR)/$$i ; \
JAVACUP=${JAVACUP} JFLEX=${JFLEX} make parser; \
echo "make[1]: Leaving directory \`$(PKGDIR)/$$i'" ; \
) ; \
done
contrib:
@echo ================================================================ ;\
echo === Unpacking libraries and support files for WebMail ${VERSION} ; \
echo ================================================================
@echo "- creating lib/ and lib/ssl/ directories..."
@$(INSTALL) -d -m 0755 $(LIBDIR)
@$(INSTALL) -d -m 0755 $(LIBDIR)/ssl
@echo "- unzipping JavaMail API (v1.1.3) ..."
-@rm -f $(LIBDIR)/mail.jar
@${UNZIP} -j -q -d $(LIBDIR) $(CONTRIBDIR)/javamail-1_2.zip javamail-1.2/mail.jar
@${UNZIP} -j -q -d $(BASEDIR) $(CONTRIBDIR)/javamail-1_2.zip javamail-1.2/LICENSE.txt
@mv $(BASEDIR)/LICENSE.txt $(BASEDIR)/LICENSE.javamail
@echo "- unzipping JavaBeans Activation Framework (v1.0.1) ..."
-@rm -f $(LIBDIR)/activation.jar
@${UNZIP} -j -q -d $(LIBDIR) $(CONTRIBDIR)/jaf101.zip ./jaf-1.0.1/activation.jar
@${UNZIP} -j -q -d $(BASEDIR) $(CONTRIBDIR)/jaf101.zip ./jaf-1.0.1/LICENSE.txt
@mv $(BASEDIR)/LICENSE.txt $(BASEDIR)/LICENSE.jaf
#@echo "- unzipping JavaMail POP3 provider (v1.1.3) ..."
-@rm -f $(LIBDIR)/pop3.jar
#@${UNZIP} -j -q -d $(LIBDIR) $(CONTRIBDIR)/pop31_1_1.zip ./pop3-1.1.1/pop3.jar
#@${UNZIP} -j -q -d $(BASEDIR) $(CONTRIBDIR)/pop31_1_1.zip ./pop3-1.1.1/LICENSE.txt
#@mv $(BASEDIR)/LICENSE.txt $(BASEDIR)/LICENSE.pop3
@echo "- copying ITI-SSL library..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/itissl.jar $(LIBDIR)/ssl/
@echo "- copying JSDK library..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/servlet-2.0.jar $(LIBDIR)/
@echo "- copying Xerces XML parser..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/xerces.jar $(LIBDIR)/
@echo "- copying Xalan XSL Processor..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/xalan.jar $(LIBDIR)/
@echo "- copying GNU RegExp package..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/gnu-regexp-1.0.8.jar $(LIBDIR)
@echo "- copying JavaCUP parser generator support classes..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/java_cup.jar $(LIBDIR)
@echo "- copying MySQL library classes..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/mm.mysql*.jar $(LIBDIR)
@echo "- copying mime.types ..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/mime.types $(LIBDIR)
@echo "- copying javaOTP ..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/javaOTP.jar $(LIBDIR)
@echo "- copying Tidy HTML parser ..."
@$(INSTALL) -m 0644 $(CONTRIBDIR)/Tidy.jar $(LIBDIR)
install: clean contrib parser install-fast
# Modified by exce, start.
# Add org.bulbul.webmail package.
# Modified by exce, end.
jar-fast: compile
@echo "Creating lib/ directory ... "; \
$(INSTALL) -d -m 0755 $(LIBDIR)
@echo "Creating WebMail distribution (JAR) in \`$(BASEDIR)' ..." ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -