Bug 496271, automation config for Tb2.0.0.22 build1, p=joduinn, r=me
[mozilla-1.9.git] / extensions / java / xpcom / interfaces / Makefile.in
blobfced5435bfab13fc4e5c4c2764f0e5c5a14ec0f6
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is Java XPCOM Bindings.
16 # The Initial Developer of the Original Code is IBM Corporation.
17 # Portions created by the Initial Developer are Copyright (C) 2006
18 # IBM Corporation. All Rights Reserved.
20 # Contributor(s):
21 # Javier Pedemonte (jhpedemonte@gmail.com)
23 # Alternatively, the contents of this file may be used under the terms of
24 # either the GNU General Public License Version 2 or later (the "GPL"), or
25 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 # in which case the provisions of the GPL or the LGPL are applicable instead
27 # of those above. If you wish to allow use of your version of this file only
28 # under the terms of either the GPL or the LGPL, and not to allow others to
29 # use your version of this file under the terms of the MPL, indicate your
30 # decision by deleting the provisions above and replace them with the notice
31 # and other provisions required by the GPL or the LGPL. If you do not delete
32 # the provisions above, a recipient may use your version of this file under
33 # the terms of any one of the MPL, the GPL or the LGPL.
35 # ***** END LICENSE BLOCK *****
37 DEPTH = ../../../..
38 topsrcdir = @top_srcdir@
39 srcdir = @srcdir@
40 VPATH = @srcdir@
42 include $(DEPTH)/config/autoconf.mk
44 JAVA_LIBRARY_NAME = MozillaGlue
46 # Don't install MozillaGlue.jar in $(DIST)/bin
47 NO_DIST_INSTALL=1
48 NO_INSTALL=1
50 PACKAGE_DIR = org/mozilla/xpcom
52 JAVA_SRCS = \
53 $(PACKAGE_DIR)/Mozilla.java \
54 $(PACKAGE_DIR)/GREVersionRange.java \
55 $(PACKAGE_DIR)/IMozilla.java \
56 $(PACKAGE_DIR)/IGRE.java \
57 $(PACKAGE_DIR)/IXPCOM.java \
58 $(PACKAGE_DIR)/IJavaXPCOMUtils.java \
59 $(PACKAGE_DIR)/IAppFileLocProvider.java \
60 $(PACKAGE_DIR)/INIParser.java \
61 $(PACKAGE_DIR)/VersionComparator.java \
62 $(PACKAGE_DIR)/IXPCOMError.java \
63 $(PACKAGE_DIR)/ProfileLock.java \
64 $(PACKAGE_DIR)/XPCOMException.java \
65 $(PACKAGE_DIR)/XPCOMInitializationException.java \
66 $(NULL)
68 IFACES_JAR = MozillaInterfaces.jar
69 IFACES_JAR_SRC = $(patsubst %.jar,%-src.jar,$(IFACES_JAR))
71 JAVA_CLASSPATH += $(IFACES_JAR)
73 # install jars into SDK
74 SDK_LIBRARY = $(JAVA_LIBRARY_NAME).jar $(IFACES_JAR) $(IFACES_JAR_SRC)
76 GARBAGE += $(IFACES_JAR) $(IFACES_JAR_SRC) $(PACKAGE_DIR)/IXPCOMError.java java.files
78 include $(topsrcdir)/config/rules.mk
80 # MozillaGlue.jar depends on MozillaInterfaces.jar, so make sure to generate
81 # the Mozilla Java interfaces first.
82 $(addprefix $(_JAVA_DIR)/,$(JAVA_SRCS:.java=.class)): $(IFACES_JAR)
85 # Generate IXPCOMError.java
88 $(_JAVA_DIR)/$(PACKAGE_DIR)/Mozilla.class: $(PACKAGE_DIR)/IXPCOMError.java
90 $(PACKAGE_DIR)::
91 $(NSINSTALL) -D $@
93 $(PACKAGE_DIR)/IXPCOMError.java: $(topsrcdir)/xpcom/base/nsError.h gen-nsError.pl $(PACKAGE_DIR) Makefile Makefile.in
94 $(PERL) $(srcdir)/gen-nsError.pl < $< > $@
97 # Compile generated Java interfaces
100 IFACES_DIR = _ifaces
101 $(IFACES_DIR)::
102 $(NSINSTALL) -D $@
104 GARBAGE_DIRS += $(IFACES_DIR)
106 # Don't include the interface nsIPref, since it depends on the obsolete
107 # interface nsIFileSpec.
108 IGNORE_IFACES_NAMES = nsIPref
109 ifneq (,$(IGNORE_IFACES_NAMES))
110 IGNORE_IFACES = $(patsubst %, ! -name "*%.java", $(IGNORE_IFACES_NAMES))
111 endif
113 # Using the temporary "java.files" avoids an "argument list too long"
114 # error on Windows when using *.java
115 $(IFACES_DIR)/$(JAVA_IFACES_PKG_NAME)/nsISupports.class: $(IFACES_DIR) $(wildcard $(JAVA_DIST_DIR)/default/$(JAVA_IFACES_PKG_NAME)/*.java) Makefile Makefile.in
116 @echo Compiling Java interfaces
117 find $(JAVA_DIST_DIR)/default -name "*.java" $(IGNORE_IFACES) > java.files
118 $(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) -classpath $(IFACES_DIR) \
119 -d $(IFACES_DIR) -sourcepath $(JAVA_DIST_DIR)/default @java.files
121 $(IFACES_JAR): $(IFACES_DIR)/$(JAVA_IFACES_PKG_NAME)/nsISupports.class Makefile
122 $(JAR) cf $@ -C $(IFACES_DIR) org
124 $(IFACES_JAR_SRC): $(IFACES_JAR)
125 $(JAR) cf $@ -C $(JAVA_DIST_DIR)/default org
126 $(ZIP) -d $@ $(patsubst %, $(JAVA_IFACES_PKG_NAME)/%.java, $(IGNORE_IFACES_NAMES))
128 # Since we set NO_DIST_INSTALL above, the jars don't get copied into the SDK.
129 # Handle that here.
130 libs:: $(SDK_LIBRARY) $(SDK_LIB_DIR)
131 $(INSTALL) $(IFLAGS2) $^