Commit ef548df9 authored by Chris Cooper's avatar Chris Cooper
Browse files

Merge build-system to mozilla-central

parents c8590c4f 15ddc7ae
Loading
Loading
Loading
Loading
+6 −36
Original line number Diff line number Diff line
#! /bin/sh
#
# ***** 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.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# 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 *****
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

# allmakefiles.sh - List of all makefiles.
#   Appends the list of makefiles to the variable, MAKEFILES.
@@ -67,7 +35,6 @@ config/autoconf.mk
config/nspr/Makefile
config/doxygen.cfg
config/expandlibs_config.py
config/tests/src-simple/Makefile
mfbt/Makefile
probes/Makefile
extensions/Makefile
@@ -140,6 +107,9 @@ fi
if [ "$ENABLE_TESTS" ]; then
  add_makefiles "
    build/autoconf/test/Makefile
    config/makefiles/test/Makefile
    config/tests/makefiles/autodeps/Makefile
    config/tests/src-simple/Makefile
  "
  if [ ! "$LIBXUL_SDK" ]; then 
    add_makefiles "
+8 −4
Original line number Diff line number Diff line
@@ -127,10 +127,14 @@ else
APPFILES = MacOS
endif

libs repackage::
	mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
libs-preqs = \
  $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/MacOS) \
  $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj) \
  $(NULL)

.PHONY: repackage
libs repackage:: $(libs-preqs)
	rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
	mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
	rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
	sed -e "s/%MOZ_APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/" -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" -e "s/%APP_BINARY%/$(APP_BINARY)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
	sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
@@ -140,7 +144,7 @@ ifdef LIBXUL_SDK
	cp $(LIBXUL_DIST)/bin/xulrunner$(BIN_SUFFIX) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
	rsync -a --exclude nsinstall --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks
else
	rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
	$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
	rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
endif
	printf "APPLMOZB" > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
+8 −5
Original line number Diff line number Diff line
@@ -102,8 +102,11 @@ REDIST_FILES = \
endif

ifdef REDIST_FILES
libs::
	mkdir -p $(FINAL_TARGET)
libs-preqs = \
  $(call mkdir_deps,$(FINAL_TARGET)) \
  $(NULL)

libs:: $(libs-preqs)
	install --preserve-timestamps $(foreach f,$(REDIST_FILES),"$(WIN32_REDIST_DIR)"/$(f)) $(FINAL_TARGET)
endif

+10 −6
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ ifeq (,$(strip $(AUTOCONF)))
AUTOCONF=$(error Could not find autoconf 2.13)
endif

MKDIR := mkdir
SH := /bin/sh
PERL ?= perl
PYTHON ?= python
@@ -181,6 +180,9 @@ OBJDIR_TARGETS = install export libs clean realclean distclean alldep maybe_clob
build::
	$(MAKE) -f $(TOPSRCDIR)/client.mk $(if $(MOZ_PGO),profiledbuild,realbuild)

# Define mkdir
include $(TOPSRCDIR)/config/makefiles/makeutils.mk
include $(TOPSRCDIR)/config/makefiles/autotargets.mk

# Print out any options loaded from mozconfig.
all realbuild clean depend distclean export libs install realclean::
@@ -316,11 +318,13 @@ endif

configure-files: $(CONFIGURES)

configure:: configure-files
ifdef MOZ_BUILD_PROJECTS
	@if test ! -d $(MOZ_OBJDIR); then $(MKDIR) $(MOZ_OBJDIR); else true; fi
endif
	@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
configure-preqs = \
  configure-files \
  $(call mkdir_deps,$(OBJDIR)) \
  $(if $(MOZ_BUILD_PROJECTS),$(call mkdir_deps,$(MOZ_OBJDIR))) \
  $(NULL)

configure:: $(configure-preqs)
	@echo cd $(OBJDIR);
	@echo $(CONFIGURE) $(CONFIGURE_ARGS)
	@cd $(OBJDIR) && $(BUILD_PROJECT_ARG) $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
+16 −3
Original line number Diff line number Diff line
# -*- Makefile -*-
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
@@ -117,8 +118,11 @@ else
endif

ifdef WRAP_SYSTEM_INCLUDES
export::
	if test ! -d system_wrappers; then mkdir system_wrappers; fi
export-preqs = \
  $(call mkdir_deps,system_wrappers) \
  $(NULL)

export:: $(export-preqs)
	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
		-DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
@@ -190,7 +194,13 @@ PYUNITS := \
  unit-writemozinfo.py \
  $(NULL)

check:: check-python-modules check-jar-mn
check-preqs = \
  check-python-modules \
  check-jar-mn \
  check-makefiles \
  $(NULL)

check:: $(check-preqs)

check-python-modules::
	@$(EXIT_ON_ERROR) \
@@ -205,3 +215,6 @@ check-jar-mn::
ifneq (,$(filter-out WINNT OS2,$(OS_ARCH)))
	$(MAKE) -C tests/src-simple check-symlink
endif

check-makefiles:
	$(MAKE) -C tests/makefiles/autodeps check
Loading