mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
make default build mode be "release"
This commit is contained in:
parent
52a7762610
commit
41f4a8b425
@ -4,24 +4,21 @@
|
||||
|
||||
topsrcdir = .
|
||||
|
||||
CP := cp -p
|
||||
|
||||
ifndef INCLUDED_CONFIG_MK
|
||||
include $(topsrcdir)/config/config.mk
|
||||
endif
|
||||
|
||||
CP := cp -p
|
||||
ECHO := /bin/echo
|
||||
|
||||
# dynamically find the optional directories names
|
||||
LIBGD_DIR = $(wildcard gd?.*)
|
||||
GNUPLOT_DIR = $(wildcard gnuplot-?.*)
|
||||
PERL_DIR = $(wildcard perl5.*)
|
||||
|
||||
# HACK, should figure out dynamically from PERL_DIR
|
||||
PERL_REV = 5.00503
|
||||
|
||||
# file that we package
|
||||
GDFILES = gd.txt gd.html gd.h libgd.* demoin.gif gddemo giftogd webgif
|
||||
GNUPLOTFILES = gnuplot gnuplot_x11 gnuplot.1 gnuplot.gih Copyright
|
||||
GDFILES = gd.txt gd.html libgd.* gd.h demoin.gif gddemo giftogd webgif
|
||||
GNUPLOTFILES = gnuplot Copyright gnuplot_x11 gnuplot.1 gnuplot.gih
|
||||
|
||||
VERSION = 4.2
|
||||
TARBALL = mstone-$(VERSION)-$(NSARCH)$(OBJDIR_TAG).tar.gz
|
||||
@ -68,7 +65,7 @@ gnuplot $(OBJDIR)/gnuplot/gnuplot::
|
||||
$(MAKE) -f gnuplot.mk LIBGD_DIR=$(LIBGD_DIR) GNUPLOT_DIR=$(GNUPLOT_DIR) gnuplot
|
||||
|
||||
perl $(OBJDIR)/perl/perl::
|
||||
$(MAKE) -f perl.mk PERL_DIR=$(PERL_DIR) PERL_REV=$(PERL_REV) perl
|
||||
$(MAKE) -f perl.mk PERL_DIR=$(PERL_DIR) perl
|
||||
|
||||
# Create packaging binary directories
|
||||
# Note: dont make gd or gnuplot here. For multi-OS, they are links
|
||||
@ -112,7 +109,6 @@ pkg-share-files:: mkpkgdirs
|
||||
$(CP) README $(PKGDIR)
|
||||
$(CP) ChangeLog $(PKGDIR)
|
||||
$(CP) LICENSE $(PKGDIR)
|
||||
@$(ECHO) "\n===== [`date`] making package share-files done.\n"
|
||||
|
||||
# split out OS specific file so that combined packaging possible (set PKGDIR)
|
||||
pkg-arch-files-gd:: $(PKGDIR)/gd $(OBJDIR)/gd/libgd.a
|
||||
@ -132,19 +128,18 @@ pkg-arch-files:: pkg-arch-files-gnuplot
|
||||
endif
|
||||
|
||||
pkg-arch-files:: $(PKGDIR)/bin $(OBJDIR)/mailclient
|
||||
@$(ECHO) "\n===== [`date`] making package arch-files...\n"
|
||||
$(CP) $(OBJDIR)/mailclient $(PKGDIR)/bin
|
||||
-$(STRIP) $(PKGDIR)/bin/mailclient
|
||||
@$(ECHO) "\n===== [`date`] making package arch-files done.\n"
|
||||
|
||||
pkg-perl-files:: $(PKGDIR)/bin $(OBJDIR)/perl/perl
|
||||
@$(ECHO) "\n===== [`date`] making package perl-files...\n"
|
||||
$(MAKE) -f perl.mk PERL_DIR=$(PERL_DIR) PERL_REV=$(PERL_REV) \
|
||||
$(MAKE) -f perl.mk PERL_DIR=$(PERL_DIR) \
|
||||
BUILD_VARIANT=$(BUILD_VARIANT) \
|
||||
OBJDIR=$(OBJDIR) PKGDIR=$(PKGDIR) package-perl
|
||||
find $(PKGDIR)/perl/lib -name .packlist -exec rm {} \; -print
|
||||
-$(STRIP) $(PKGDIR)/perl/bin/perl
|
||||
-$(STRIP) $(PKGDIR)/perl/bin/a2p
|
||||
@$(ECHO) "\n===== [`date`] making package perl-files done.\n"
|
||||
|
||||
# for combined packaging, this should not be part of pkg-arch-files
|
||||
# perl is handled seperately do to its size
|
||||
@ -152,14 +147,22 @@ ifneq (,$(PERL_DIR))
|
||||
pkg:: pkg-perl-files
|
||||
endif
|
||||
|
||||
pkg:: targets build/$(TARBALL)
|
||||
pkg:: targets pkg-share-files pkg-arch-files
|
||||
|
||||
build/$(TARBALL): pkg-share-files pkg-arch-files
|
||||
@$(ECHO) "\n===== [`date`] making os package file...\n"
|
||||
tarball: build/$(TARBALL)
|
||||
|
||||
build/$(TARBALL):
|
||||
@$(ECHO) "\n===== [`date`] making os tar file...\n"
|
||||
-rm -f build/$(TARBALL)
|
||||
cd $(dir $(PKGDIR)) && \
|
||||
tar cf - . | gzip > ../../$(TARBALL)
|
||||
@$(ECHO) "\n===== [`date`] making os package file done.\n"
|
||||
cd $(dir $(PKGDIR)) && tar cf - . | gzip > ../../$(TARBALL)
|
||||
|
||||
zipfile: build/$(ZIPFILE)
|
||||
|
||||
build/$(ZIPFILE):
|
||||
@$(ECHO) "\n===== [`date`] making os zip file...\n"
|
||||
-rm -f build/$(ZIPFILE)
|
||||
cd $(dir $(PKGDIR)) && zip -r -q ../../$(ZIPFILE) .
|
||||
|
||||
|
||||
########################################################################
|
||||
# Generate a combined build for every Unix OS that is already packaged
|
||||
@ -168,16 +171,18 @@ build/$(TARBALL): pkg-share-files pkg-arch-files
|
||||
# Finally, dont ship perl development headers and libraries
|
||||
all_DBG all_OPT::
|
||||
@$(ECHO) "===== [`date`] unified packaging for $@..."
|
||||
$(MAKE) NSARCH=$@ OBJDIR_TAG='' PKGDIR=$(topsrcdir)/build/package/$@.OBJ/mstone pkg-share-files
|
||||
./ospkg.sh $@.OBJ $(notdir $(shell ls -d build/package/[A-Z]*$(subst all,,$@.OBJ)))
|
||||
$(MAKE) NSARCH=$@ OBJDIR_TAG='' \
|
||||
PKGDIR=$(topsrcdir)/build/package/$@.OBJ/mstone pkg-share-files
|
||||
./ospkg.sh $@.OBJ \
|
||||
$(notdir $(shell ls -d build/package/[A-Z]*$(subst all,,$@.OBJ)))
|
||||
[ -d $(topsrcdir)/build/package/$@.OBJ/mstone/bin/WINNT4.0 ] \
|
||||
&& cp -p $(NTFILES) $(topsrcdir)/build/package/$@.OBJ/mstone; :
|
||||
-rm -f ./build/mstone-$(VERSION)-$@.tar.gz
|
||||
cd ./build/package/$@.OBJ && tar cf - . \
|
||||
| gzip > ../../mstone-$(VERSION)-$@.tar.gz
|
||||
cd ./build/package/$@.OBJ \
|
||||
&& tar cf - . | gzip > ../../mstone-$(VERSION)-$@.tar.gz
|
||||
-rm -f ./build/mstone-$(VERSION)-$@.zip
|
||||
cd ./build/package/$@.OBJ && zip -r -q ../../mstone-$(VERSION)-$@.zip .
|
||||
@$(ECHO) "===== [`date`] unified packaging for $@ done."
|
||||
cd ./build/package/$@.OBJ \
|
||||
&& zip -r -q ../../mstone-$(VERSION)-$@.zip .
|
||||
|
||||
|
||||
########################################################################
|
||||
@ -190,7 +195,7 @@ dist::
|
||||
@[ ! -d "$(DIST)" ] || ($(ECHO) "Error: $(DIST) already exists" && \
|
||||
$(MAKE) usage && /bin/false)
|
||||
mkdir -p $(DIST)
|
||||
cp -p build/mstone-$(VERSION)-all_*.tar.gz build/mstone-$(VERSION)-all_*.zip $(DIST)/
|
||||
cp -p build/mstone-$(VERSION)-all_*.*[a-z] $(DIST)/
|
||||
(cd build/package; tar cf - *.OBJ) | (cd $(DIST); tar xf - )
|
||||
for l in $(DIST)/*_???.OBJ ; do \
|
||||
(cd $$l; ln -s mstone mailstone); done
|
||||
@ -198,30 +203,32 @@ dist::
|
||||
nn=`echo $$l | sed -e 's/_OPT/_glibc_PTH_OPT/' | sed -e 's/_DBG/_glibc_PTH_DBG/'`; \
|
||||
ln -s $$l $$nn; done
|
||||
|
||||
# since the default is debug mode, start a make with the right mode
|
||||
release::
|
||||
@$(ECHO) "\n===== [`date`] making release build...\n"
|
||||
$(MAKE) BUILD_VARIANT=release OBJDIR_TAG=_OPT targets
|
||||
@$(ECHO) "\n===== [`date`] making release build done.\n"
|
||||
# since the default is release mode, this can just work off a dependency
|
||||
release:: targets
|
||||
#release::
|
||||
# @$(ECHO) "\n===== [`date`] making release build..."
|
||||
# $(MAKE) BUILD_VARIANT=release OBJDIR_TAG=_OPT targets
|
||||
@$(ECHO) "\n===== [`date`] making release build done."
|
||||
|
||||
rpackage:: release
|
||||
@$(ECHO) "\n===== [`date`] making release package...\n"
|
||||
$(MAKE) BUILD_VARIANT=release OBJDIR_TAG=_OPT pkg
|
||||
@$(ECHO) "\n===== [`date`] making release package done.\n"
|
||||
rpackage:: release pkg #tarball zipfile
|
||||
#rpackage:: release
|
||||
# @$(ECHO) "\n===== [`date`] making release package..."
|
||||
# $(MAKE) BUILD_VARIANT=release OBJDIR_TAG=_OPT pkg tarball zipfile
|
||||
@$(ECHO) "\n===== [`date`] making release package done."
|
||||
|
||||
# since the default is debug mode, this can just work off a dependency
|
||||
debug:: targets
|
||||
# @$(ECHO) "\n===== [`date`] making debug build...\n"
|
||||
# $(MAKE) BUILD_VARIANT=debug OBJDIR_TAG=_DBG targets
|
||||
# @$(ECHO) "\n===== [`date`] making debug build done.\n"
|
||||
# since the default is release mode, start a make with the right mode
|
||||
debug::
|
||||
@$(ECHO) "\n===== [`date`] making debug build..."
|
||||
$(MAKE) BUILD_VARIANT=debug OBJDIR_TAG=_DBG targets
|
||||
@$(ECHO) "\n===== [`date`] making debug build done."
|
||||
|
||||
# since the default is debug mode, this can just work off a dependency
|
||||
dpackage:: pkg
|
||||
#dpackage:: debug
|
||||
# @$(ECHO) "\n===== [`date`] making debug package...\n"
|
||||
# $(MAKE) BUILD_VARIANT=debug OBJDIR_TAG=_DBG pkg
|
||||
# @$(ECHO) "\n===== [`date`] making debug package done.\n"
|
||||
# We dont usually bother to tar up a debug build
|
||||
dpackage:: debug
|
||||
@$(ECHO) "\n===== [`date`] making debug package..."
|
||||
$(MAKE) BUILD_VARIANT=debug OBJDIR_TAG=_DBG pkg
|
||||
@$(ECHO) "\n===== [`date`] making debug package done."
|
||||
|
||||
# These are old and may be broken
|
||||
cleanvariant::
|
||||
(cd src; $(MAKE) OBJDIR=../$(OBJDIR) clean)
|
||||
rm -rf $(PKGDIR)
|
||||
|
@ -4,7 +4,8 @@
|
||||
INCLUDED_CONFIG_MK = 1
|
||||
|
||||
# These normally get overridden on the command line from ../Makefile
|
||||
BUILD_VARIANT = debug
|
||||
# This is the default build type
|
||||
BUILD_VARIANT = release
|
||||
ifeq ($(BUILD_VARIANT), debug)
|
||||
BUILD_TYPE = DEBUG
|
||||
OBJDIR_TAG = _DBG
|
||||
|
@ -11,6 +11,9 @@ endif
|
||||
PERL_OBJDIR = $(OBJDIR)/perl
|
||||
PERL_PKGDIR = $(PKGDIR)/perl
|
||||
|
||||
# HACK, should figure out dynamically from PERL_DIR
|
||||
PERL_REV = 5.00503
|
||||
|
||||
###package:: $(PERL_PKGDIR) package-perl
|
||||
|
||||
$(PERL_PKGDIR):
|
||||
|
Loading…
Reference in New Issue
Block a user