# $Header: /home/cvs/giza/component/platform/wonka/test_java/gnu/testlet/wonka/lang/ClassLoader/Makefile,v 1.1 2001/05/23 07:51:36 ruelens Exp $
# Makefile for wonka/test_java/gnu/testlet/wonka/lang/ClassLoader

#+++ configurable variables for this Makefile +++

# where are we relative to the top directory in the tree?
TOPDIR = ../../../../../..

# explicit list of sources to be compiled (can be empty); 
# if not empty, should be relative to CLASSPATH, for example:
#  java/lang/Object.java
SOURCES = \
gnu/testlet/wonka/lang/ClassLoader/AcuniaClassLoaderTest.java \
gnu/testlet/wonka/lang/ClassLoader/BadClassLoader.java \
gnu/testlet/wonka/lang/ClassLoader/ExClassLoader.java \

#gnu/testlet/wonka/lang/ClassLoader/TestClass1.java \
#gnu/testlet/wonka/lang/ClassLoader/TestClass2.java \
#gnu/testlet/wonka/lang/ClassLoader/TestInterface1.java \
#gnu/testlet/wonka/lang/ClassLoader/TestInterface2.java \
#gnu/testlet/wonka/lang/ClassLoader/BasicInterface.java \
#gnu/testlet/wonka/lang/ClassLoader/AbstractBaseClass.java \
#gnu/testlet/wonka/lang/ClassLoader/AbstractClass1.java \
#gnu/testlet/wonka/lang/ClassLoader/AbstractClass2.java \
#gnu/testlet/wonka/lang/ClassLoader/AbstractEvol1.java \
#gnu/testlet/wonka/lang/ClassLoader/Evol1Interface.java \

# explicit list of subdirectories to navigate (can be empty)
SUBDIRS =

# Enable test environment

TESTENVIRONMENT = true

#--- end configurable variables for this Makefile ---

# defaults
CPU ?= x86
BOARD ?= ibmpc
HOSTOS ?= linux
AWT ?= rudolph
ifeq ($(CPU),arm)
FILESYSTEM ?= vfs
else
FILESYSTEM ?= native
endif

# set directories and include common stuff
CONFIGDIR = $(TOPDIR)/config
include $(CONFIGDIR)/Defs.make
include $(CONFIGDIR)/which_config.make
include $(CONFIGDIR)/Rules.make
include $(CONFIGDIR)/Exports.make

# here's the approximate list of targets, generated from the SOURCES list
TARGET_LIST = $(SOURCES:%.java=$(CLASSDESTDIR)/%.class)

# list of files to delete when cleaning
CLEAN_LIST = $(addsuffix *.class, $(sort $(dir $(TARGET_LIST))))

# we look here in our search for the java sources
vpath %.java = $(JAVASRCDIR)

# declare our imaginary targets
.PHONY : all build_targets clean doc initial_check jtarget otarget 

# we want to build all our (java) targets
all jtarget : initial_check  build_targets
ifneq ($(SUBDIRS),)
	@for d in $(SUBDIRS); do \
		$(MAKE) $(MAKECMDGOALS) -C $$d; \
		if [ $$? -ne 0 ]; then \
			exit 42; \
		fi \
	done
endif
	
# check validity of options, tool availability, etc.
initial_check :
ifeq ($(INITIATINGDIR),$(YOUAREHERE))
	@$(TOPDIR)/check-env.sh 
	$(CHECK_OUTPUT_DIRS_EXIST) 
endif

# and build the targets
build_targets : $(TARGET_LIST) 

# whereas we don't want to do anything for our non-java stuff;
# if this is an intermediate directory, go straight to subdirectories
otarget :
ifneq ($(SUBDIRS),)
	@for d in $(SUBDIRS); do \
		$(MAKE) $(MAKECMDGOALS) -C $$d; \
		if [ $$? -ne 0 ]; then \
			exit 42; \
		fi \
	done
endif
	@echo "Nothing to be done for '$(MAKECMDGOALS)'"

# we currently don't want to do anything for our doc -- this will change soon;
# if this is an intermediate directory, go straight to subdirectories
doc : 
ifneq ($(SUBDIRS),)
	@for d in $(SUBDIRS); do \
		$(MAKE) $(MAKECMDGOALS) -C $$d; \
	done
endif
	@echo "Nothing to be done for '$(MAKECMDGOALS)'"

# clean up target files and working files
clean :
ifneq ($(SUBDIRS),)
	@for d in $(SUBDIRS); do \
		$(MAKE) $(MAKECMDGOALS) -C $$d; \
	done
endif
	$(RM) $(CLEAN_LIST)

# $Log: Makefile,v $
# Revision 1.1  2001/05/23 07:51:36  ruelens
# added ClassLoader Test (some basic tests)
#
# Revision 1.1.1.1  2001/03/26 23:27:58  johan
# Import of wonka
#
#
# Revision 1.8  2001/03/13 09:01:48  pollock
# added check for empty SUBDIRS before executing for loops
#
# Revision 1.7  2001/02/21 14:06:01  pollock
# chgd FILESYSTEM defaults to depend on CPU type
#
# Revision 1.6  2000/11/30 10:15:12  ruelens
# changed the order of building classes
#
# Revision 1.5  2000/11/30 10:10:49  ruelens
# updated test-classes
#
# Revision 1.4  2000/11/13 16:10:17  pollock
# added FILESYSTEM default and chgd AWT default if needed
#
# Revision 1.3  2000/10/20 13:30:29  pollock
# fixed unwanted spaces in initial_check section
#
# Revision 1.2  2000/10/20 12:02:57  pollock
# added optimization to only check output dirs at top level Makefile, or
# if invoked at lower level (same check as for check-env.sh)
#
# Revision 1.1  2000/10/09 12:55:29  ruelens
# the makefile for this dir
#
