Make it so the jni headers are built in src_share.
git-svn-id: svn://10.0.0.236/trunk@75937 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -71,49 +71,13 @@ EXTRA_DSO_LDOPTS += -L$(DEPTH)/dist/bin/components -lwidget_gtk -lwc_share
|
||||
INCLUDES := -I$(JDKHOME)/include -I$(JDKHOME)/include/solaris $(INCLUDES) \
|
||||
-I$(DEPTH)/widget/src/gtk -I../src_share
|
||||
|
||||
JAVAH_CLS= \
|
||||
"-o BookmarksImpl.h org.mozilla.webclient.wrapper_native.BookmarksImpl" \
|
||||
"-o CurrentPageImpl.h org.mozilla.webclient.wrapper_native.CurrentPageImpl" \
|
||||
"-o HistoryImpl.h org.mozilla.webclient.wrapper_native.HistoryImpl" \
|
||||
"-o WrapperFactoryImpl.h org.mozilla.webclient.wrapper_native.WrapperFactoryImpl" \
|
||||
"-o NavigationImpl.h org.mozilla.webclient.wrapper_native.NavigationImpl" \
|
||||
"-o RDFEnumeration.h org.mozilla.webclient.wrapper_native.RDFEnumeration" \
|
||||
"-o RDFTreeNode.h org.mozilla.webclient.wrapper_native.RDFTreeNode" \
|
||||
"-o ISupportsPeer.h org.mozilla.webclient.wrapper_native.ISupportsPeer" \
|
||||
"-o WindowControlImpl.h org.mozilla.webclient.wrapper_native.WindowControlImpl" \
|
||||
"-o NativeEventThread.h org.mozilla.webclient.wrapper_native.NativeEventThread" \
|
||||
$(NULL)
|
||||
|
||||
JAVAH_FILES=\
|
||||
BookmarksImpl.h \
|
||||
CurrentPageImpl.h \
|
||||
HistoryImpl.h \
|
||||
WrapperFactoryImpl.h \
|
||||
NavigationImpl.h \
|
||||
RDFEnumeration.h \
|
||||
RDFTreeNode.h \
|
||||
ISupportsPeer.h \
|
||||
WindowControlImpl.h \
|
||||
NativeEventThread.h \
|
||||
$(NULL)
|
||||
|
||||
JAVAH_PROG=$(JDKHOME)/bin/javah
|
||||
JAVAH_FLAGS=-jni -classpath $(CLASSPATH):$(JAVA_DESTPATH)
|
||||
|
||||
export:: $(JAVAH_FILES) linkSetupRegistry
|
||||
export:: linkSetupRegistry
|
||||
|
||||
linkSetupRegistry:
|
||||
rm -f nsSetupRegistry.cpp
|
||||
ln -s $(DEPTH)/xpfe/bootstrap/nsSetupRegistry.cpp .
|
||||
|
||||
$(JAVAH_FILES):
|
||||
@for c in $(JAVAH_CLS); do \
|
||||
echo $(JAVAH_PROG) $(JAVAH_FLAGS) $$c; \
|
||||
$(JAVAH_PROG) $(JAVAH_FLAGS) $$c; \
|
||||
done
|
||||
|
||||
clobber_all::
|
||||
rm -f $(JAVAH_FILES)
|
||||
rm -f nsSetupRegistry.cpp
|
||||
|
||||
buildRunems:
|
||||
@@ -121,7 +85,7 @@ ifeq ($(BAL_INTERFACE),)
|
||||
@echo +++ Creating runem. Use this to run the test browser.
|
||||
rm -f runem
|
||||
@echo #!/bin/sh > runem
|
||||
@echo $(PERL) runem.pl $(DIST)/bin org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) "$$"1 "$$"2 "$$"3 "$$"4 "$$"4 "$$"6 >> runem
|
||||
@echo $(PERL) ../src_share/runem.pl $(DIST)/bin org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) "$$"1 "$$"2 "$$"3 "$$"4 "$$"4 "$$"6 >> runem
|
||||
chmod 755 runem
|
||||
endif
|
||||
|
||||
|
||||
@@ -84,12 +84,6 @@ WIN_LIBS = \
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
include <$(DEPTH)\java\config\localdefs.mak>
|
||||
|
||||
!ifdef CLASSPATH
|
||||
JAVAC_CLASSPATH=$(JAVAC_CLASSPATH);$(CLASSPATH)
|
||||
!endif
|
||||
|
||||
!ifdef BAL_INTERFACE
|
||||
INCS = \
|
||||
-I..\bal\ \
|
||||
@@ -112,47 +106,7 @@ INCS = \
|
||||
!CMDSWITCHES -S
|
||||
|
||||
# generate the jni header
|
||||
export:: BookmarksImpl.h CurrentPageImpl.h HistoryImpl.h WrapperFactoryImpl.h WindowControlImpl.h NavigationImpl.h NativeEventThread.h RDFEnumeration.h RDFTreeNode.h ISupportsPeer.h nsSetupRegistry.cpp
|
||||
|
||||
BookmarksImpl.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.BookmarksImpl is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.BookmarksImpl
|
||||
|
||||
CurrentPageImpl.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.CurrentPageImpl is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.CurrentPageImpl
|
||||
|
||||
HistoryImpl.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.HistoryImpl is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.HistoryImpl
|
||||
|
||||
WrapperFactoryImpl.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.WrapperFactoryImpl is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.WrapperFactoryImpl
|
||||
|
||||
NavigationImpl.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.NavigationImpl is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.NavigationImpl
|
||||
|
||||
RDFEnumeration.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.RDFEnumeration is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.RDFEnumeration
|
||||
|
||||
RDFTreeNode.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.RDFTreeNode is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.RDFTreeNode
|
||||
|
||||
ISupportsPeer.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.ISupportsPeer is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.ISupportsPeer
|
||||
|
||||
WindowControlImpl.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.WindowControlImpl is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.WindowControlImpl
|
||||
|
||||
NativeEventThread.h:
|
||||
@echo Assuming class org.mozilla.webclient.wrapper_native.NativeEventThread is in $(JAVAH_FLAGS)
|
||||
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.wrapper_native.NativeEventThread
|
||||
export:: nsSetupRegistry.cpp
|
||||
|
||||
nsSetupRegistry.cpp:
|
||||
copy $(MOZ_SRC)\mozilla\xpfe\bootstrap\nsSetupRegistry.cpp
|
||||
@@ -162,7 +116,7 @@ buildRunems:
|
||||
!else
|
||||
@echo +++ Creating runem.bat. Use this to run the test browser.
|
||||
rm -f runem.bat
|
||||
@echo $(PERL) runem.pl $(DIST)\bin org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem.bat
|
||||
@echo $(PERL) ..\src_share\runem.pl $(DIST)\bin org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem.bat
|
||||
!endif
|
||||
|
||||
install:: $(DLL) buildRunems
|
||||
@@ -173,16 +127,6 @@ clobber_all:: clobber
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
rm -f BookmarksImpl.h
|
||||
rm -f CurrentPageImpl.h
|
||||
rm -f HistoryImpl.h
|
||||
rm -f WrapperFactoryImpl.h
|
||||
rm -f NavigationImpl.h
|
||||
rm -f WindowControlImpl.h
|
||||
rm -f NativeEventThread.h
|
||||
rm -f RDFEnumeration.h
|
||||
rm -f RDFTreeNode.h
|
||||
rm -f ISupportsPeer.h
|
||||
rm -f nsSetupRegistry.cpp
|
||||
rm -f runem.bat
|
||||
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
# The contents of this file are subject to the Mozilla 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/MPL/
|
||||
#
|
||||
# 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 Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ed Burns <edburns@acm.org>
|
||||
|
||||
|
||||
|
||||
# this script must be run in the directory in which it resides.
|
||||
|
||||
#
|
||||
# Verification, usage checking
|
||||
#
|
||||
$ARGC = $#ARGV + 1;
|
||||
$MIN_ARGC = 3;
|
||||
|
||||
if ($MIN_ARGC > $ARGC) {
|
||||
print "usage runem.pl <mozilla bin dir> <class name> <depth>\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
#
|
||||
# Constant definitions
|
||||
#
|
||||
|
||||
$CLASSNAME = $ARGV[1];
|
||||
$DEPTH = $ARGV[2];
|
||||
|
||||
# determine the path separator
|
||||
$_ = $ENV{PATH};
|
||||
if (m|/|) {
|
||||
$SEP = "/";
|
||||
$CPSEP = ":";
|
||||
}
|
||||
else {
|
||||
$SEP = "\\";
|
||||
$CPSEP = ";";
|
||||
}
|
||||
|
||||
if ($SEP eq "/") {
|
||||
$IS_UNIX = 1;
|
||||
}
|
||||
|
||||
if ($IS_UNIX) {
|
||||
$BINDIR = $ENV{"PWD"} . $SEP . $ARGV[0];
|
||||
}
|
||||
else {
|
||||
open(CD, "cd |");
|
||||
$_ = <CD>;
|
||||
chop;
|
||||
close(CD);
|
||||
$BINDIR = $_ . $SEP . $ARGV[0];
|
||||
}
|
||||
$JAVA_CMD = $ENV{"JDKHOME"} . $SEP . "bin" . $SEP . "java";
|
||||
|
||||
#
|
||||
# set up environment vars
|
||||
#
|
||||
|
||||
$ENV{"MOZILLA_FIVE_HOME"} = $BINDIR;
|
||||
|
||||
# prepend mozilla dist to path
|
||||
$ENV{PATH} = $BINDIR . $CPSEP . $ENV{PATH};
|
||||
|
||||
# if on UNIX, stock the LD_LIBRARY_PATH
|
||||
if ($IS_UNIX) {
|
||||
# append the GTK lib dirs
|
||||
open(GTK_CONFIG, "gtk-config --libs |");
|
||||
$_ = <GTK_CONFIG>;
|
||||
close(GTK_CONFIG);
|
||||
@libs = split;
|
||||
foreach $_ (@libs) {
|
||||
if (/-L/) {
|
||||
$ENV{"LD_LIBRARY_PATH"} = $ENV{"LD_LIBRARY_PATH"} . ":" . substr($_,2);
|
||||
}
|
||||
}
|
||||
|
||||
# append the JDK lib dirs
|
||||
$ENV{"LD_LIBRARY_PATH"} = $ENV{"LD_LIBRARY_PATH"} . ":" .
|
||||
$ENV{"JDKHOME"} . $SEP . "jre" . $SEP . "lib" . $SEP . "sparc";
|
||||
$ENV{"LD_LIBRARY_PATH"} = $ENV{"LD_LIBRARY_PATH"} . ":" .
|
||||
$ENV{"JDKHOME"} . $SEP . "jre" . $SEP . "lib" . $SEP . "sparc" . $SEP .
|
||||
"native_threads";
|
||||
$ENV{"LD_LIBRARY_PATH"} = $ENV{"LD_LIBRARY_PATH"} . ":" .
|
||||
$ENV{"JDKHOME"} . $SEP . "jre" . $SEP . "lib" . $SEP . "sparc" . $SEP .
|
||||
"classic";
|
||||
}
|
||||
|
||||
# stock the CLASSPATH
|
||||
$ENV{"CLASSPATH"} = $ENV{"JDKHOME"} . $SEP . "lib" . $SEP . "tools.jar" .
|
||||
$CPSEP . $ENV{"JDKHOME"} . $SEP . "lib" . $SEP . "rt.jar" . $CPSEP .
|
||||
$ENV{"CLASSPATH"};
|
||||
if ($IS_UNIX) {
|
||||
$ENV{"CLASSPATH"} = $ENV{"CLASSPATH"} . $CPSEP . $BINDIR . $SEP . ".." .
|
||||
$SEP . "classes";
|
||||
}
|
||||
else {
|
||||
$ENV{"CLASSPATH"} = $ENV{"CLASSPATH"} . $CPSEP . $DEPTH . $SEP . "dist" .
|
||||
$SEP . "classes";
|
||||
}
|
||||
|
||||
# build up the command invocation string
|
||||
|
||||
$cmd = $JAVA_CMD;
|
||||
# if on UNIX, append the -native argument
|
||||
if ($SEP eq "/") {
|
||||
$cmd = $cmd . " -native";
|
||||
}
|
||||
#tack on the java library path
|
||||
$cmd = $cmd . " -Djava.library.path=" . $BINDIR;
|
||||
#tack on the classpath, class name, and bin dir
|
||||
$cmd = $cmd . " -classpath " . $ENV{"CLASSPATH"} . " " . $CLASSNAME . " " .
|
||||
$BINDIR;
|
||||
|
||||
# tack on any additional arguments
|
||||
if ($MIN_ARGC < $ARGC) {
|
||||
for ($i = $MIN_ARGC; $i < $ARGC; $i++) {
|
||||
$cmd = $cmd . " " . $ARGV[$i];
|
||||
}
|
||||
}
|
||||
|
||||
print $cmd . "\n";
|
||||
|
||||
exec $cmd;
|
||||
Reference in New Issue
Block a user