# $Id: SysDefs 615 2010-09-30 15:49:42Z florenz@TU-BERLIN.DE $

NODENAME = javabind
SUBNODES  = 

PIZZASOURCES =  \
	NoSuchElementException.pizza Enumeration.pizza \
	Enumerator.pizza EmptyEnumerator.pizza CompositeEnumerator.pizza \
	ListEnumerator.pizza \
	Set.pizza Hashtable.pizza \
        AuxJ.pizza Config.pizza BindProp.pizza \
	Absy.pizza \
        Name.pizza Origin.pizza Kind.pizza Type.pizza Var.pizza \
        CodeWriter.pizza CCodeWriter.pizza JniCodeWriter.pizza \
        OcsJniCodeWriter.pizza SysDefsWriter.pizza \
        StructureGenerator.pizza OpalGenerator.pizza \
        FunGenerator.pizza \
        Driver.pizza

JAVACCSOURCES = Parser.jj

JAVACCOBJECTS = ParserConstants.java Parser.java ParserTokenManager.java \
                Token.java ASCII_UCodeESC_CharStream.java \
		ParseException.java TokenMgrError.java

SOURCES = $(PIZZASOURCES) $(JAVACCSOURCES) javabind SysDefs SysDefs.install

COMPONENTS = $(SOURCES) patchCCPC

CLASSDIR = ./classes
PIZZACLASSES = $(PIZZAHOME)/classes
PIZZAPC = $(JAVA) -ms8m pizza.compiler.Main

# The default target

_default: all


_all:
	@if [ -z "$(JAVACC)" ] || [ -z "$(PIZZAHOME)" ] ; then \
	   echo "You must define JAVACC and PIZZAHOME to compile javabind"; \
	   exit 1; \
        fi ; \
	mkdir $(CLASSDIR) 2>/dev/null; \
	$(JAVACC) Parser.jj && \
	CLASSDIR=$(CLASSDIR) CLASSPATH="$(CLASSDIR):$(PIZZACLASSES):$$CLASSPATH" \
             $(PIZZAPC) -nowarn -d ./classes $(PIZZASOURCES) $(JAVACCOBJECTS)

# The action on this node associated with 'clean'

_clean:
	@rm -rf $(CLASSDIR) $(JAVACCOBJECTS)


# The action associated with 'install' (_installmanuals is generic)

_install: 
	@if [ -z "$(INSTALLBINPATH)" ] || [ -z "$(INSTALLLIBPATH)" ] ; then \
	    echo "You must define INSTALL{BIN,LIB}PATH"; exit 1;  \
	 else \
	    echo "Installing javabind in $(INSTALLBINPATH)"; \
	    $(OCSOM)/etc/xinstall $(INSTALLBINFLAGS) \
			javabind $(INSTALLBINPATH); \
	    echo "Installing classes in $(INSTALLLIBPATH)/classes"; \
	    mkdir $(INSTALLLIBPATH)/classes 2>/dev/null; \
	    cp -rp $(CLASSDIR)/* $(INSTALLLIBPATH)/classes; \
	 fi

	
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Release management definitions (fill out if required)

# Path to this node relative to the root of the release tree

RELEASENODEPATH = src/om/scripts

# Derived objects which shall be included into the release

RELEASEOBJECTS =



# Path to the boot area for this node relative to the release tree

RELEASEBOOTPATH = 

# Sources which shall be included into the boot area of a release

BOOTSOURCES =

# Derived objects which shall be included into the boot area of a release

BOOTOBJECTS =


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Release management rules (fill out if required)


# The action to derive the release objects

_releaseobjects:

# The action to derive the boot objects

_bootobjects:


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Include generic rules (do not change)

include $(OMLIBPATH)/GlobalRules

