1999-10-14 18:50:38 +04:00
|
|
|
#! gmake
|
|
|
|
|
|
|
|
#
|
2004-04-25 19:03:26 +04:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2000-06-21 01:48:45 +04:00
|
|
|
# The Original Code is the Netscape Portable Runtime (NSPR).
|
2004-04-25 19:03:26 +04:00
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Netscape Communications Corporation.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
2000-06-14 00:59:02 +04:00
|
|
|
# Contributor(s):
|
2004-04-25 19:03:26 +04:00
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
2000-06-14 00:59:02 +04:00
|
|
|
|
1999-10-14 18:50:38 +04:00
|
|
|
|
|
|
|
MOD_DEPTH = .
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(MOD_DEPTH)/config/autoconf.mk
|
|
|
|
|
2002-03-15 01:47:19 +03:00
|
|
|
MAKE := $(patsubst -j%,,$(MAKE)) -j1
|
|
|
|
|
1999-10-14 18:50:38 +04:00
|
|
|
DIRS = config pr lib
|
|
|
|
|
|
|
|
ifdef MOZILLA_CLIENT
|
2003-02-26 18:13:59 +03:00
|
|
|
# Make nsinstall use absolute symlinks by default for Mozilla OSX builds
|
|
|
|
# http://bugzilla.mozilla.org/show_bug.cgi?id=193164
|
2003-02-26 03:48:56 +03:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
|
|
|
ifndef NSDISTMODE
|
|
|
|
NSDISTMODE=absolute_symlink
|
|
|
|
export NSDISTMODE
|
|
|
|
endif
|
|
|
|
endif
|
1999-10-14 18:50:38 +04:00
|
|
|
endif
|
|
|
|
|
2000-04-06 00:18:13 +04:00
|
|
|
DIST_GARBAGE = config.cache config.log config.status
|
2000-03-17 01:46:02 +03:00
|
|
|
|
2001-02-06 05:33:34 +03:00
|
|
|
all:: config.status export
|
|
|
|
|
1999-10-14 18:50:38 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2001-02-06 05:33:34 +03:00
|
|
|
config.status:: configure
|
2001-05-12 04:55:48 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
sh $(srcdir)/configure --no-create --no-recursion
|
|
|
|
else
|
2001-02-06 05:33:34 +03:00
|
|
|
./config.status --recheck && ./config.status
|
2001-05-12 04:55:48 +04:00
|
|
|
endif
|
2001-02-06 05:33:34 +03:00
|
|
|
|
1999-10-14 18:50:38 +04:00
|
|
|
#
|
|
|
|
# The -ll option of zip converts CR LF to LF.
|
|
|
|
#
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
ZIP_ASCII_OPT = -ll
|
|
|
|
endif
|
|
|
|
|
2000-03-17 01:46:02 +03:00
|
|
|
# Delete config/autoconf.mk last because it is included by every makefile.
|
2000-04-06 00:18:13 +04:00
|
|
|
distclean::
|
2000-03-17 01:46:02 +03:00
|
|
|
@echo "cd pr/tests; $(MAKE) $@"
|
|
|
|
@$(MAKE) -C pr/tests $@
|
|
|
|
rm -f config/autoconf.mk
|
|
|
|
|
1999-10-14 18:50:38 +04:00
|
|
|
release::
|
|
|
|
echo $(BUILD_NUMBER) > $(RELEASE_DIR)/$(BUILD_NUMBER)/version.df
|
|
|
|
@if test -f imports.df; then \
|
|
|
|
echo "cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
|
|
|
|
cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
|
|
|
|
else \
|
|
|
|
echo "echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
|
|
|
|
echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
|
|
|
|
fi
|
|
|
|
cd $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
|
|
|
|
rm -rf META-INF; mkdir META-INF; cd META-INF; \
|
|
|
|
echo "Manifest-Version: 1.0" > MANIFEST.MF; \
|
|
|
|
echo "" >> MANIFEST.MF; \
|
|
|
|
cd ..; rm -f mdbinary.jar; zip -r mdbinary.jar META-INF bin lib; \
|
|
|
|
rm -rf META-INF; \
|
|
|
|
cd include; \
|
|
|
|
rm -rf META-INF; mkdir META-INF; cd META-INF; \
|
|
|
|
echo "Manifest-Version: 1.0" > MANIFEST.MF; \
|
|
|
|
echo "" >> MANIFEST.MF; \
|
|
|
|
cd ..; rm -f mdheader.jar; zip $(ZIP_ASCII_OPT) -r mdheader.jar *; \
|
|
|
|
rm -rf META-INF
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
|
|
|
|
rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
|
2001-06-14 09:49:20 +04:00
|
|
|
echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)"; \
|
2002-01-24 03:50:32 +03:00
|
|
|
$(topsrcdir)/config/prmkdir.bat $(MDIST_DOS)\\$(MOD_NAME)\\$(BUILD_NUMBER); \
|
1999-10-14 18:50:38 +04:00
|
|
|
fi
|
2001-06-14 09:49:20 +04:00
|
|
|
@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); then \
|
|
|
|
rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
|
|
|
|
echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)"; \
|
2002-01-24 03:50:32 +03:00
|
|
|
$(topsrcdir)/config/prmkdir.bat $(MDIST_DOS)\\$(MOD_NAME)\\$(BUILD_NUMBER)\\$(RELEASE_OBJDIR_NAME); \
|
1999-10-14 18:50:38 +04:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
|
|
|
|
rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
|
2001-06-14 09:49:20 +04:00
|
|
|
echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)"; \
|
1999-10-14 18:50:38 +04:00
|
|
|
$(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
|
|
|
|
chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
|
|
|
|
fi
|
2001-06-14 09:49:20 +04:00
|
|
|
@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); then \
|
|
|
|
rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
|
|
|
|
echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)"; \
|
|
|
|
$(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
|
|
|
|
chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
|
1999-10-14 18:50:38 +04:00
|
|
|
fi
|
|
|
|
endif
|
|
|
|
cd $(RELEASE_DIR)/$(BUILD_NUMBER); \
|
|
|
|
cp -f version.df imports.df $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
|
|
|
|
chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/version.df; \
|
|
|
|
chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/imports.df; \
|
|
|
|
cd $(OBJDIR_NAME); \
|
2001-06-14 09:49:20 +04:00
|
|
|
cp -f mdbinary.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
|
|
|
|
chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)/mdbinary.jar; \
|
1999-10-14 18:50:38 +04:00
|
|
|
cd include; \
|
2001-06-14 09:49:20 +04:00
|
|
|
cp -f mdheader.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
|
|
|
|
chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)/mdheader.jar
|
1999-10-14 18:50:38 +04:00
|
|
|
|
2003-02-04 04:45:28 +03:00
|
|
|
package:
|
|
|
|
@echo "cd pkg; $(MAKE) publish"
|
|
|
|
$(MAKE) -C pkg publish
|
2003-01-04 05:14:13 +03:00
|
|
|
|
2000-02-24 02:38:19 +03:00
|
|
|
depend:
|
1999-10-14 18:50:38 +04:00
|
|
|
@echo "NSPR20 has no dependencies. Skipped."
|