gecko-dev/java/build/Makefile.in

268 строки
14 KiB
Makefile

# 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):
DEPTH = ../..
topsrcdir = $(DEPTH)
JAVAHOME = $(JDKHOME)
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
PACKAGE_DIR=$(topsrcdir)/dist/javadev
PACKAGE_LIB=$(PACKAGE_DIR)/lib
PACKAGE_EXAMPLE=$(PACKAGE_DIR)/example
ifeq ($(PACKAGE_VER),)
PACKAGE_VER=1.0
endif
ifeq ($(OS_ARCH),Linux)
PACKAGE_OS=linux
else
PACKAGE_OS=solaris
endif
buildRunems:
ifneq ($(BUILD_DOM_ONLY),)
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
cp -R $(DIST)/classes/org/mozilla/dom $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
cd $(DIST)/../java/build
jar -cvfM0 JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
cp JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar
rm -Rf $(DIST)/../java/build/org
rm -f $(DIST)/../java/build/JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
chmod 775 $(PACKAGE_LIB)/libjavadom.so
cp $(DIST)/../java/build/install_dom_unix.js $(DIST)/install.js
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
chmod 775 $(DIST)/symlink.sh
cp $(DIST)/../java/build/README.DOM $(PACKAGE_DIR)/README.DOM
cd $(DIST) ; \
zip -r JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
else
ifneq ($(BUILD_PLUGLETS_ONLY),)
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/mozilla/dom $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/mozilla/plugins $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
cd $(DIST)/../java/build
jar -cvfM0 Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
cp Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar
rm -Rf $(DIST)/../java/build/org
rm -f $(DIST)/../java/build/Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
cp $(DIST)/bin/libplugletjni.so $(PACKAGE_LIB)/libplugletjni.so
cp $(DIST)/bin/components/libpluglet.so $(PACKAGE_LIB)/libpluglet.so
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
chmod 775 $(PACKAGE_LIB)/libjavadom.so
chmod 775 $(PACKAGE_LIB)/libplugletjni.so
chmod 775 $(PACKAGE_LIB)/libpluglet.so
cp $(DIST)/../java/build/install_pluglet_unix.js $(DIST)/install.js
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
chmod 775 $(DIST)/symlink.sh
cp $(DIST)/../java/build/README.PLUGLET $(PACKAGE_DIR)/README.PLUGLET
cd $(DIST) ; \
zip -r Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
else
ifneq ($(BUILD_WEBCLIENT_ONLY),)
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/mozilla/dom $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/mozilla/webclient $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/mozilla/xpcom $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
cd $(DIST)/../java/build
jar -cvfM0 Webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
cp Webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/Webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar
rm -Rf $(DIST)/../java/build/org
rm -f $(DIST)/../java/build/Webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
cp $(DIST)/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so
cp $(DIST)/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so
cp $(DIST)/lib/libwc_share.a $(PACKAGE_LIB)/libwc_share.a
cp $(DIST)/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so
cp $(DIST)/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so
cp $(DIST)/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so
cp $(DIST)/bin/components/libjavaSample.so $(PACKAGE_LIB)/libjavaSample.so
cp $(DIST)/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so
cp $(DIST)/bin/regxpcom $(PACKAGE_LIB)/regxpcom
chmod 775 $(PACKAGE_LIB)/libbcorb.so
chmod 775 $(PACKAGE_LIB)/libbcjavastubs.so
chmod 775 $(PACKAGE_LIB)/libjavaloader.so
chmod 775 $(PACKAGE_LIB)/libjavaSample.so
chmod 775 $(PACKAGE_LIB)/libbcxpcomstubs.so
chmod 775 $(PACKAGE_LIB)/regxpcom
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
chmod 775 $(PACKAGE_LIB)/libjavadom.so
chmod 775 $(PACKAGE_LIB)/libwebclient.so
chmod 775 $(PACKAGE_LIB)/libwebclientstub.so
chmod 775 $(PACKAGE_LIB)/libwc_share.a
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
rm -f runem_unix_commercial.bat
@echo copy ../lib/libwebclient.so ../.. >> runem_unix_commercial.bat
@echo copy ../lib/libwebclientstub.so ../.. >> runem_unix_commercial.bat
@echo copy ../lib/libjavadom.so ../../components >> runem_unix_commercial.bat
@echo copy ../lib/libjavadomjni.so ../.. >> runem_unix_commercial.bat
@echo setenv CLASSPATH ../lib/Webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar>> runem_unix_commercial.bat
@echo $(PERL) ./runem.pl org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem_unix_commercial.bat
cp -f runem_unix_commercial.bat $(PACKAGE_EXAMPLE)/runem.bat
cp -f $(DIST)/../java/webclient/src_share/runem.pl $(PACKAGE_EXAMPLE)/runem.pl
chmod 775 $(PACKAGE_EXAMPLE)/runem.bat
chmod 775 $(PACKAGE_EXAMPLE)/runem.pl
cp $(DIST)/../java/build/install_webclient_unix.js $(DIST)/install.js
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
chmod 775 $(DIST)/symlink.sh
cp $(DIST)/../java/build/README.WEBCLIENT $(PACKAGE_DIR)/README.WEBCLIENT
cd $(DIST) ; \
zip -r Webclient_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
else
ifneq ($(BUILD_BLACKCONNECT_ONLY),)
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
cp -R $(DIST)/classes/org/mozilla/xpcom $(DIST)/../java/build/org/mozilla
cd $(DIST)/../java/build
jar -cvfM0 Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
cp Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar
rm -Rf $(DIST)/../java/build/org
rm -f $(DIST)/../java/build/Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar
cp $(DIST)/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so
cp $(DIST)/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so
cp $(DIST)/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so
cp $(DIST)/bin/components/libjavaSample.so $(PACKAGE_LIB)/libjavaSample.so
cp $(DIST)/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so
cp $(DIST)/bin/regxpcom $(PACKAGE_LIB)/regxpcom
chmod 775 $(PACKAGE_LIB)/libbcorb.so
chmod 775 $(PACKAGE_LIB)/libbcjavastubs.so
chmod 775 $(PACKAGE_LIB)/libjavaloader.so
chmod 775 $(PACKAGE_LIB)/libjavaSample.so
chmod 775 $(PACKAGE_LIB)/libbcxpcomstubs.so
chmod 775 $(PACKAGE_LIB)/regxpcom
cp $(DIST)/../java/build/install_blackconnect_unix.js $(DIST)/install.js
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
chmod 775 $(DIST)/symlink.sh
cp $(DIST)/../java/build/README.BLACKCONNECT $(PACKAGE_DIR)/README.BLACKCONNECT
cd $(DIST) ; \
zip -r Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
else
ifneq ($(BUILD_BLACKWOOD),)
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
cp -R $(DIST)/classes/org/mozilla $(DIST)/../java/build/org
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
cd $(DIST)/../java/build
jar -cvfM0 Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
cp Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar
rm -Rf $(DIST)/../java/build/org
rm -f $(DIST)/../java/build/Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
cp $(DIST)/bin/libplugletjni.so $(PACKAGE_LIB)/libplugletjni.so
cp $(DIST)/bin/components/libpluglet.so $(PACKAGE_LIB)/libpluglet.so
cp $(DIST)/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so
cp $(DIST)/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so
cp $(DIST)/lib/libwc_share.a $(PACKAGE_LIB)/libwc_share.a
cp $(DIST)/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so
cp $(DIST)/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so
cp $(DIST)/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so
cp $(DIST)/bin/components/libjavaSample.so $(PACKAGE_LIB)/libjavaSample.so
cp $(DIST)/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so
cp $(DIST)/bin/regxpcom $(PACKAGE_LIB)/regxpcom
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
chmod 775 $(PACKAGE_LIB)/libjavadom.so
chmod 775 $(PACKAGE_LIB)/libplugletjni.so
chmod 775 $(PACKAGE_LIB)/libpluglet.so
chmod 775 $(PACKAGE_LIB)/libwebclient.so
chmod 775 $(PACKAGE_LIB)/libwebclientstub.so
chmod 775 $(PACKAGE_LIB)/libwc_share.a
chmod 775 $(PACKAGE_LIB)/libbcorb.so
chmod 775 $(PACKAGE_LIB)/libbcjavastubs.so
chmod 775 $(PACKAGE_LIB)/libjavaloader.so
chmod 775 $(PACKAGE_LIB)/libjavaSample.so
chmod 775 $(PACKAGE_LIB)/libbcxpcomstubs.so
chmod 775 $(PACKAGE_LIB)/regxpcom
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
rm -f runem_unix_commercial.bat
@echo copy ../lib/libwebclient.so ../.. >> runem_unix_commercial.bat
@echo copy ../lib/libwebclientstub.so ../.. >> runem_unix_commercial.bat
@echo copy ../lib/libjavadom.so ../../components >> runem_unix_commercial.bat
@echo copy ../lib/libjavadomjni.so ../.. >> runem_unix_commercial.bat
@echo copy ../lib/libplugletjni.so ../.. >> runem_unix_commercial.bat
@echo copy ../lib/libpluglet.so ../../components >> runem_unix_commercial.bat
@echo setenv CLASSPATH ../lib/Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar>> runem_unix_commercial.bat
@echo $(PERL) ./runem.pl org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem_unix_commercial.bat
cp -f runem_unix_commercial.bat $(PACKAGE_EXAMPLE)/runem.bat
cp -f $(DIST)/../java/webclient/src_share/runem.pl $(PACKAGE_EXAMPLE)/runem.pl
chmod 775 $(PACKAGE_EXAMPLE)/runem.bat
chmod 775 $(PACKAGE_EXAMPLE)/runem.pl
cp $(DIST)/../java/build/install_blackwood_unix.js $(DIST)/install.js
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
chmod 775 $(DIST)/symlink.sh
cp $(DIST)/../java/build/README.BLACKWOOD $(PACKAGE_DIR)/README.BLACKWOOD
cd $(DIST) ; \
zip -r Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
endif #BLACKWOOD
endif #BLACKCONNECT
endif #WEBCLIENT
endif #PLUGLETS
endif #DOM
install::buildRunems
clobber::
rm -f $(DIST)/*.zip
rm -f $(DIST)/*.js
rm -rf $(DIST)/javadev
rm -f $(DIST)/symlink.sh
clobber_all::clobber
clean::clobber