pjs/xpinstall/packager/Makefile.in

127 строки
3.2 KiB
Makefile
Исходник Обычный вид История

#
# 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 Communicator client code,
# released March 31, 1998.
#
# 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):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
#
# This is how we create the Unix binary packages we release to the public.
# Currently the only format is tar.gz (TGZ), but it should be fairly easy
# to add .rpm (RPM) and .deb (DEB) later.
#
ifndef MOZ_PKG_FORMAT
MOZ_PKG_FORMAT = TGZ
endif
ifeq ($(MOZ_PKG_FORMAT),TGZ)
PKG_SUFFIX = .tar.gz
endif
ifeq ($(MOZ_PKG_FORMAT),RPM)
PKG_SUFFIX = .rpm
endif
ifeq ($(MOZ_PKG_FORMAT),DEB)
PKG_SUFFIX = .deb
endif
PKG_BASENAME := mozilla-$(shell $(topsrcdir)/build/autoconf/config.guess)
1999-08-22 00:06:08 +04:00
PACKAGE := $(PKG_BASENAME)$(PKG_SUFFIX)
ifdef BUILD_OFFICIAL
1999-08-22 00:06:08 +04:00
TARGETS = $(PACKAGE)
endif
NSPR_DIR = $(DIST)/bin
ifndef EXCLUDE_NSPR_LIBS
NSPR_LDIR = $(findstring -L,$(NSPR_LIBS))
ifneq ($(NSPR_LDIR),)
1999-08-22 00:06:08 +04:00
NSPR_DIR = $(patsubst %lib,%bin,$(subst -L,,$(word 1,$(NSPR_LIBS))))
endif
endif
1999-08-24 03:46:37 +04:00
EXCLUDE_LIST = \
$(DIST)/bin/core \
$(DIST)/bin/bsdecho \
$(DIST)/bin/gtscc \
$(DIST)/bin/jscpucfg \
$(DIST)/bin/nsinstall \
1999-08-24 03:46:37 +04:00
$(DIST)/bin/viewer \
$(NULL)
include $(topsrcdir)/config/rules.mk
1999-08-22 00:06:08 +04:00
GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE)
ifeq ($(OS_ARCH),IRIX)
STRIP_FLAGS = -f
endif
1999-08-22 00:06:08 +04:00
all export libs install:: $(TARGETS)
$(PACKAGE): $(DIST)/bin/mozilla-bin
ifneq ($(NSPR_DIR),$(DIST)/bin)
@chmod 755 $(NSPR_DIR)/*
@echo "Copying NSPR..."
@cp -p $(NSPR_DIR)/* $(DIST)/bin/.
endif
@rm -rf $(DIST)/package $(DIST)/$(PKG_BASENAME).tar $@ $(EXCLUDE_LIST)
# NOTE: this must be a cp now that dist links into the tree so that we
# do not strip the binaries actually in the tree.
@echo "Creating package directory..."
@cp -rp ${DIST}/bin $(DIST)/package
@echo "Stripping package directory..."
@cd $(DIST)/package; find . ! -type d \
! -name "*.js" \
! -name "*.xpt" \
! -name "*.gif" \
! -name "*.jpg" \
! -name "*.png" \
! -name "*.xpm" \
! -name "*.txt" \
! -name "*.rdf" \
! -name "*.sh" \
! -name "*.properties" \
! -name "*.dtd" \
! -name "*.html" \
! -name "*.xul" \
! -name "*.css" \
! -name "*.xml" \
! -name "*.jar" \
! -name "*.dat" \
! -name "*.tbl" \
! -name "*.src" \
! -name "*.reg" \
-exec strip $(STRIP_FLAGS) {} >/dev/null 2>&1 \;
ifeq ($(MOZ_PKG_FORMAT),TGZ)
cd $(DIST); tar -cvhf - package | gzip -vf9 > $@
endif
ifeq ($(MOZ_PKG_FORMAT),RPM)
@echo "Sorry, don't know how to build an RPM file yet...."
endif
ifeq ($(MOZ_PKG_FORMAT),DEB)
@echo "Sorry, don't know how to build a DEB file yet...."
endif