#!make
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Igor Kushnirskiy <idk@eng.sun.com>
# Brad GNUberg <bkn3@columbia.edu>
#

DEPTH	= ../../../..
topsrcdir	= ../../../..
VPATH		= .
srcdir		= .

include $(DEPTH)/config/autoconf.mk

JAVASRCS = \
	org/mozilla/xpcom/CID.java \
	org/mozilla/xpcom/ComponentLoader.java \
	org/mozilla/xpcom/Components.java \
	org/mozilla/xpcom/Debug.java \
	org/mozilla/xpcom/ID.java \
	org/mozilla/xpcom/IID.java \
	org/mozilla/xpcom/InterfaceRegistry.java \
	org/mozilla/xpcom/ProxyFactory.java \
	org/mozilla/xpcom/ProxyHandler.java \
	org/mozilla/xpcom/Utilities.java \
	org/mozilla/xpcom/nsIComponentManager.java \
	org/mozilla/xpcom/nsIServiceManager.java \
	org/mozilla/xpcom/nsISupports.java \
	org/mozilla/xpcom/nsIXPIDLServiceManager.java \
	org/mozilla/xpcom/XPCOMException.java \
	$(NULL)

include $(DEPTH)/config/rules.mk

#Creates the dist/classes/org/mozilla/xpcom directories if they don't exist yet
export::
	@if test ! -d $(DIST)/classes; \
	then echo Creating $(DIST)/classes; \
	mkdir $(DIST)/classes; \
	fi
	@if test ! -d $(DIST)/classes/org; \
	then echo Creating $(DIST)/classes/org/mozilla/xpcom; \
	mkdir $(DIST)/classes/org; \
	mkdir $(DIST)/classes/org/mozilla; \
	mkdir $(DIST)/classes/org/mozilla/xpcom; \
	fi
	@touch $@
	@#For some reason a file named 'export' is left behind; delete it
	@rm -f export

libs::
	cp org/mozilla/xpcom/*.class $(DIST)/classes/org/mozilla/xpcom

