head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	98.06.18.09.18.50;	author ross;	state Exp;
branches;
next	1.4;

1.4
date	98.06.18.08.40.26;	author ross;	state Exp;
branches;
next	1.3;

1.3
date	98.06.16.22.07.34;	author tim;	state Exp;
branches;
next	1.2;

1.2
date	98.06.16.01.14.03;	author tim;	state Exp;
branches;
next	1.1;

1.1
date	98.06.16.01.08.35;	author tim;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Fixed installation of JSDK classes
@
text
@#----------------------------------------
# Macro Settings
#----------------------------------------

# where to install Apache JServ 
PREFIX=/usr/local/java-lib/jserv

# packages about which we care
PACKAGES = \
    org.apache.util.recycle \
    org.apache.util \
    org.apache.util.pool \
    org.apache.util.ajp \
    org.apache.util.template \
    org.apache.jserv \
    org.apache.jserv.servlets \
    org.apache.test.client \
    org.apache.test.server \
    org.apache.test

# Name of file containing JSDK classes
JSDK_FILE=../../bin/java/servlet.jar

# top-level directory
ifndef TOP
export TOP = $(shell pwd)
endif

# specify class / servlet class directory
SRCDIR = .
CLASSPATH := $(TOP)/classes:$(TOP)/servlets:$(CLASSPATH):$(SRCDIR)
CLEANME += classes servlets
ifeq ($(PACKAGE),org.apache.jserv.servlets)
    CLASSDIR = $(TOP)/servlets
else
    CLASSDIR = $(TOP)/classes
endif

# add servlet class file directory to classpath
SERVCLASSES = $(TOP)/$(JSDK_FILE)
export CLASSPATH := $(SERVCLASSES):$(CLASSPATH)

# java compiler
JAVAC = javac

# avoid noisy recursion
export MAKEFLAGS=--no-print-directory

#----------------------------------------
# Rules
#----------------------------------------

# compile all java packages
all: $(PACKAGES)
CLEANME += $(patsubst %,$(SRCDIR)/%/.package,$(subst .,/,$(PACKAGES)))
$(PACKAGES):
	@@echo "** building $@@"
	@@$(MAKE) PACKAGE=$@@ \
	    -C $(SRCDIR)/$(subst .,/,$@@) -f $(TOP)/GNUmakefile \
	    .package
	@@echo

# compile one java package
ifdef PACKAGE
.package: $(wildcard *.java)
	@@[ -d $(CLASSDIR) ] || mkdir $(CLASSDIR)
	$(JAVAC) -d $(CLASSDIR) -deprecation $?
	@@touch $@@
endif

# create documentation
APIDIR = ../../docs/api
CLEANME += $(APIDIR)
docs:
	[ -d $(APIDIR) ] || mkdir $(APIDIR)
	javadoc -author -version -d $(APIDIR) $(PACKAGES)

# installation
install: all doinstall mod-jserv-msg

# copy various things into structure
doinstall:
	@@echo "** installing Apache JServ into $(PREFIX)"
	[ -d $(PREFIX) ] || install -m 755 -d $(PREFIX)
	tar cf - classes servlets | (cd $(PREFIX); tar xf -)
	chmod -R go-w $(PREFIX)/classes $(PREFIX)/servlets
	#[ -d $(PREFIX)/api ] || install -m 755 -d $(PREFIX)/api
	#install -m 644 doc/* $(PREFIX)/api
	[ -d $(PREFIX)/lib ] || install -m 755 -d $(PREFIX)/lib
	install -m 644 $(JSDK_FILE) $(PREFIX)/lib
	@@echo

# tell the user good job, now do mod_jserv
mod-jserv-msg:
	@@echo "** Looks like everything has compiled correctly!"; echo
	@@echo "To make mod_jserv, copy mod_jserv.c to your Apache src "
	@@echo "directory. Add the following line to the Configuration file"
	@@echo
	@@echo "Module jserv_module mod_jserv.o"
	@@echo
	@@echo "Run Configure to create a new Makefile, then recompile Apache."

# cleanup
clean:
	rm -rf $(CLEANME)

.PHONY: doc
@


1.4
log
@Included template package into build
@
text
@d21 3
d40 1
a40 1
SERVCLASSES = $(TOP)/servclasses.zip
d90 1
a90 1
	install -m 644 servclasses.zip $(PREFIX)/lib
@


1.3
log
@Adding now-corrected package names for building.
@
text
@a0 1

d14 1
@


1.2
log
@Improved rule for java API documentation generation.
@
text
@d1 1
d14 1
d17 2
@


1.1
log
@File to build jserv core, servlet, and helper classes.
@
text
@d65 2
a66 1
CLEANME += docs
d68 2
a69 2
	[ -d doc ] || mkdir doc
	javadoc -author -version -d $@@ $(PACKAGES)
@

