Here's the makefile.master.

#
# Copyright (C) 1999 Grace Software
#
# The contents of this file are subject to the Grace Software Public
# License Version 1.0 (the "GracePL"); you may not use this file
# except in compliance with the GracePL. You may obtain a copy of the
# GracePL at http:#www.homestead.com/javalog/files/license.html
#
# Software distributed under the GracePL is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the GracePL for the specific language governing rights and
# limitations under the GracePL.
#
# The Original Code is Grace Software's JavaLog code, released March
# 21, 1999. The Initial Developer of the Original Code is Grace
# Software. Portions created by Grace Software are Copyright (C)
# 1999 Grace Software. All Rights Reserved.
#
# Contributor(s):
#
###########################################################################
#
# This file serves as a common include file for all of the makefiles
# in the grace source tree.
#
# The following variables are imported from the user's shell environment.
#
# JAVA_HOME defines the top directory of the JDK. The classpath is
# set automatically.
#
# The following variables can be set in a makefile that includes this
# master:
#
# TOP the top directory of the source and class tree
# PACKAGE the package name of the code in the current directory
# CLASSES list of each .class files to make (default all .java files)
# SUBDIRS list of each sub dir that should be cd'd to and made
# RMI_CLASSES list of each stub file that should be generated
# BEANS list of each Bean name to deploy
#
###########################################################################

#
# The following variables should be configured
#
TOOLS = /usr/local/packages
POSTGRES_HOME = /usr/lib/pgsql
JNDI_HOME = $(TOOLS)/jndi-1.2beta
BULL_EJB_HOME = $(TOOLS)/bullejb
SWING_EJB_HOME = $(TOOLS)/swing-1.1.1beta2
JAVA_1_1_HOME = /usr/local/

#
# The following variables are used internally and should only be
# changed if you really know what you are doing.
#

#
# Utility packages
#
REGEXP_PACKAGE = $(TOOLS)/gnu.regexp-1.0.8/lib/gnu-regexp-1.0.8.jar
#ZQL_PACKAGE = $(TOOLS)/zql/classes
POSTGRES_PACKAGE = $(POSTGRES_HOME)/lib/postgresql.jar
SWING_PACKAGE = $(SWING_EJB_HOME)/swingall.jar

UTILITY_PACKAGES = $(REGEXP_PACKAGE):$(ZQL_PACKAGE):$(POSTGRES_PACKAGE):$(SWING_PACKAGE)

#
# APIs for EJB
#
JTA_PACKAGE = $(TOOLS)/jta-1.0.1/lib/jta.jar
JNDI_PACKAGE = $(JNDI_HOME)/lib/jndi.jar:$(JNDI_HOME)/lib/providerutil.jar:$(JNDI_HOME)/lib/rmi
registry.jar
JDBC_STDEXT_PACKAGE = $(TOOLS)/jdbc-stdext-2.0/lib/jdbc-stdext.jar

#EXTENSION_PACKAGES = $(JTA_PACKAGE):$(JNDI_PACKAGE):$(JDBC_STDEXT_PACKAGE)

#
# Setup for Bull EJB
#
#BULL_EJB_PACKAGES = $(BULL_EJB_HOME)/classes/bullejb.jar:$(BULL_EJB_HOME)/classes
CREATE_BULL_EJB_DEPLOYMENT_DESCRIPTOR = $(BULL_EJB_HOME)/bin/GenDD
DEPLOY_BULL_EJB_BEANS = $(BULL_EJB_HOME)/bin/GenIC -verbose -d $(BULL_EJB_HOME)/classes

#
# Set this variable to whatever EJB system is being used
#
EJB_SYSTEM = bullejb
EJB_PACKAGES = $(BULL_EJB_PACKAGES)
CREATE_DEPLOYMENT_DESCRIPTOR = $(CREATE_BULL_EJB_DEPLOYMENT_DESCRIPTOR)
DEPLOY_BEANS = $(DEPLOY_BULL_EJB_BEANS)

#
# The BEANS variable can be overriden to provide the acutal bean names
#
BEANS = $(shell ls *Bean.java 2> /dev/null | sed 's/\.java//g')
BEAN_DEPLOYMENT_TEXT = $(shell ls *Bean.java 2> /dev/null | sed 's/\.java/.txt/g')
BEAN_DEPLOYMENT_DESCRIPTORS = $(shell ls *Bean.java 2> /dev/null | sed 's/\.java/.ser/g')

#
# Java development setup. This uses the JAVA_HOME environment
# variable from the user's shell environment.
#
RMIC = $(JAVA_HOME)/bin/rmic
JAR = $(JAVA_HOME)/bin/jar
JAVAC = $(JAVA_HOME)/bin/javac
FLAGS = -g
CLASSPATH = $(JAVA_HOME)/lib/classes.zip:$(EXTENSION_PACKAGES):$(UTILITY_PACKAGES):$(EJB_PACKAG
ES):$(TOP):.

all: doDisplayHeader classes rmi all.sub $(BEAN_DEPLOYMENT_DESCRIPTORS)

deploy: deploy-$(EJB_SYSTEM)

deploy-bullejb: FORCE
@for bean in $(BEAN_DEPLOYMENT_DESCRIPTORS); do \ echo $(DEPLOY_BULL_EJB_BEANS) $$bean; \ $(DEPLOY_BULL_EJB_BEANS) $$bean; \ done

classes:: $(CLASSES)
@if [ ! "$(CLASSES)" ]; then \ / /g'`"; \ CLASSES="`ls *.java 2>/dev/null | sed 's/\.java/.class/g; s/
if [ "$$CLASSES" ]; then \ echo JAVA_HOME=$(JAVA_HOME); \ echo CLASSPATH=$(CLASSPATH); \ $(MAKE) $$CLASSES; \ fi; \ if [ "$(RMI_CLASSES)" ]; then \ $(MAKE) $(RMI_CLASSES); \ fi; \ fi

rmi:: $(RMI_CLASSES)

doDisplayHeader:

clean:: clean.sub
-rm -f *.class core $(BEAN_DEPLOYMENT_DESCRIPTORS) 2> /dev/null

%.ser: %.class %.txt
$(CREATE_DEPLOYMENT_DESCRIPTOR) $*.txt

%_Stub.class: %.class
@echo rmic $*
@$(RMIC) $(PACKAGE).$*

%.class: %.java
@echo javac $(FLAGS) $<
@$(JAVAC) $(FLAGS) -classpath $(CLASSPATH) $<

#
# This is so the .class files are not deleted when they are viewed as
# intermediate files for stubs or .ser files.
#
.PRECIOUS: %.class

%.sub::
@subs="$(SUBDIRS)"; \ if [ "$$subs" = "" ]; then \ subs="$$(ls */[mM]akefile 2> /dev/null | sed 's:/[mM]akefile::g')"; \ if [ "$$subs" != "" ]; then \ $(MAKE) $$subs TARGET=$(@:%.sub=%); \ fi; \ else \ $(MAKE) $$subs TARGET=$(@:%.sub=%); \ fi; \

$(SUBDIRS):: FORCE
@-if [ -f $@/[mM]akefile ]; then \ cd $@; \ $(MAKE) $(TARGET); \ fi

FORCE: