From 7a97c993d43b613d264b0296104d7b0c9bf01353 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 20 Jun 2012 10:55:59 +0200 Subject: [PATCH] Backout changeset 6984dace6afb (bug 763987) because of OSX opt jsreftest bustage --- browser/app/Makefile.in | 2 +- build/macosx/js-icc-flight.mk | 14 +++ build/macosx/universal/flight.mk | 6 +- client.mk | 12 +- config/autoconf.mk.in | 106 +++++++++++----- config/baseconfig.mk | 25 ---- config/config.mk | 12 +- configure.in | 134 +++++++++++---------- js/src/config/autoconf.mk.in | 57 +++++++-- js/src/config/baseconfig.mk | 28 ----- js/src/config/check-sync-exceptions | 1 - js/src/config/config.mk | 12 +- js/src/configure.in | 39 +++--- layout/media/Makefile.in | 4 + mozglue/build/Makefile.in | 2 +- mozglue/tests/Makefile.in | 2 +- other-licenses/bsdiff/Makefile.in | 4 +- rdf/tests/rdfcat/Makefile.in | 2 +- rdf/tests/triplescat/Makefile.in | 2 +- toolkit/library/Makefile.in | 8 +- toolkit/mozapps/update/updater/Makefile.in | 4 +- toolkit/toolkit-makefiles.sh | 8 +- 22 files changed, 264 insertions(+), 220 deletions(-) create mode 100644 build/macosx/js-icc-flight.mk delete mode 100644 config/baseconfig.mk delete mode 100644 js/src/config/baseconfig.mk diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 8cf7a27ea53..dad211ef0ff 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -55,7 +55,7 @@ LIBS += \ $(NULL) ifdef MOZ_LINKER -LIBS += $(MOZ_ZLIB_LIBS) +LIBS += $(ZLIB_LIBS) endif ifndef MOZ_WINCONSOLE diff --git a/build/macosx/js-icc-flight.mk b/build/macosx/js-icc-flight.mk new file mode 100644 index 00000000000..fea73c63710 --- /dev/null +++ b/build/macosx/js-icc-flight.mk @@ -0,0 +1,14 @@ +# 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/. + +OBJDIR_ICC = $(MOZ_OBJDIR)/js-icc +OBJDIR_X86 = $(MOZ_OBJDIR)/i386 + +include $(OBJDIR_X86)/config/autoconf.mk +include $(TOPSRCDIR)/config/config.mk + +# Just copy the icc-produced libmozjs.dylib over +postflight_all: + echo "Postflight: copying libmozjs.dylib..." + $(INSTALL) $(OBJDIR_ICC)/dist/bin/libmozjs.dylib $(OBJDIR_X86)/dist/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/ diff --git a/build/macosx/universal/flight.mk b/build/macosx/universal/flight.mk index 235f3275857..ee0c2fe0c49 100644 --- a/build/macosx/universal/flight.mk +++ b/build/macosx/universal/flight.mk @@ -66,14 +66,14 @@ postflight_all: $(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk # The only difference betewen the two trees now should be the # about:buildconfig page. Fix it up. - $(topsrcdir)/build/macosx/universal/fix-buildconfig $(FIX_MODE) \ + $(TOPSRCDIR)/build/macosx/universal/fix-buildconfig $(FIX_MODE) \ $(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG) \ $(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG) mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME) rm -f $(DIST_ARCH_2)/universal ln -s $(DIST_UNI) $(DIST_ARCH_2)/universal rm -rf $(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME) - $(topsrcdir)/build/macosx/universal/unify \ + $(TOPSRCDIR)/build/macosx/universal/unify \ --unify-with-sort "\.manifest$$" \ --unify-with-sort "components\.list$$" \ $(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME) \ @@ -94,7 +94,7 @@ ifdef ENABLE_TESTS $(DIST_ARCH_2)/test-package-stage/mochitest/; \ cp $(DIST_ARCH_1)/test-package-stage/reftest/automation.py \ $(DIST_ARCH_2)/test-package-stage/reftest/; \ - $(topsrcdir)/build/macosx/universal/unify \ + $(TOPSRCDIR)/build/macosx/universal/unify \ --unify-with-sort "all-test-dirs\.list$$" \ $(DIST_ARCH_1)/test-package-stage \ $(DIST_ARCH_2)/test-package-stage \ diff --git a/client.mk b/client.mk index a3738e3300d..6783784867f 100644 --- a/client.mk +++ b/client.mk @@ -219,14 +219,14 @@ ifndef MOZ_BUILD_PROJECTS # Building a single project, OBJDIR is usable. set -e; \ for mkfile in $(MOZ_PREFLIGHT_ALL); do \ - $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all topsrcdir=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ + $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ done else # OBJDIR refers to the project-specific OBJDIR, which is not available at # this point when building multiple projects. Only MOZ_OBJDIR is available. set -e; \ for mkfile in $(MOZ_PREFLIGHT_ALL); do \ - $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all topsrcdir=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \ + $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \ done endif endif @@ -338,7 +338,7 @@ realbuild alldep preflight:: ifdef MOZ_PREFLIGHT set -e; \ for mkfile in $(MOZ_PREFLIGHT); do \ - $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight topsrcdir=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ + $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ done endif @@ -362,7 +362,7 @@ realbuild alldep postflight:: ifdef MOZ_POSTFLIGHT set -e; \ for mkfile in $(MOZ_POSTFLIGHT); do \ - $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight topsrcdir=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ + $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ done endif @@ -379,14 +379,14 @@ ifndef MOZ_BUILD_PROJECTS # Building a single project, OBJDIR is usable. set -e; \ for mkfile in $(MOZ_POSTFLIGHT_ALL); do \ - $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all topsrcdir=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ + $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \ done else # OBJDIR refers to the project-specific OBJDIR, which is not available at # this point when building multiple projects. Only MOZ_OBJDIR is available. set -e; \ for mkfile in $(MOZ_POSTFLIGHT_ALL); do \ - $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all topsrcdir=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \ + $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \ done endif endif diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index d1888cf6980..8ecf15cfaa7 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -5,6 +5,9 @@ # A netscape style .mk file for autoconf builds +INCLUDED_AUTOCONF_MK = 1 +USE_AUTOCONF = 1 +MOZILLA_CLIENT = 1 target = @target@ ac_configure_args = @ac_configure_args@ MOZILLA_VERSION = @MOZILLA_VERSION@ @@ -33,11 +36,16 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ -includedir = @includedir@ +includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) libdir = @libdir@ datadir = @datadir@ mandir = @mandir@ +idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + +DIST = $(DEPTH)/dist LIBXUL_SDK = @LIBXUL_SDK@ MOZ_FS_LAYOUT = @MOZ_FS_LAYOUT@ @@ -172,14 +180,16 @@ MOZ_GL_PROVIDER = @MOZ_GL_PROVIDER@ MOZ_GL_DEFAULT_PROVIDER = @MOZ_GL_DEFAULT_PROVIDER@ -JAVA=@JAVA@ -JAVAC=@JAVAC@ -JAR=@JAR@ +JAVA="@JAVA@" +JAVAC="@JAVAC@" +JAR="@JAR@" TAR=@TAR@ MAKENSISU=@MAKENSISU@ +RM = rm -f + # The MOZ_UI_LOCALE var is used to build a particular locale. Do *not* # use the var to change any binary files. Do *not* use this var unless you # write rules for the "clean-locale" and "locale" targets. @@ -210,7 +220,7 @@ NECKO_COOKIES = @NECKO_COOKIES@ NECKO_WIFI = @NECKO_WIFI@ MOZ_AUTH_EXTENSION = @MOZ_AUTH_EXTENSION@ -MOZ_NATIVE_HUNSPELL = @MOZ_NATIVE_HUNSPELL@ +MOZ_NATIVE_HUNSPELL = @SYSTEM_HUNSPELL@ MOZ_HUNSPELL_LIBS = @MOZ_HUNSPELL_LIBS@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLAGS@ @@ -222,10 +232,10 @@ MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@ MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@ MOZ_LIBVPX_INCLUDES = @MOZ_LIBVPX_INCLUDES@ -MOZ_NATIVE_ZLIB = @MOZ_NATIVE_ZLIB@ -MOZ_NATIVE_BZ2 = @MOZ_NATIVE_BZ2@ -MOZ_NATIVE_JPEG = @MOZ_NATIVE_JPEG@ -MOZ_NATIVE_PNG = @MOZ_NATIVE_PNG@ +MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@ +MOZ_NATIVE_BZ2 = @SYSTEM_BZ2@ +MOZ_NATIVE_JPEG = @SYSTEM_JPEG@ +MOZ_NATIVE_PNG = @SYSTEM_PNG@ MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@ MOZ_TREE_PIXMAN = @MOZ_TREE_PIXMAN@ @@ -282,16 +292,17 @@ CROSS_COMPILE = @CROSS_COMPILE@ WCHAR_CFLAGS = @WCHAR_CFLAGS@ -OS_CPPFLAGS = @OS_CPPFLAGS@ -OS_CFLAGS = @OS_CFLAGS@ -OS_CXXFLAGS = @OS_CXXFLAGS@ -OS_LDFLAGS = @OS_LDFLAGS@ +OS_CPPFLAGS = @CPPFLAGS@ +OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@ +OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@ +OS_LDFLAGS = @LDFLAGS@ -OS_COMPILE_CFLAGS = @OS_COMPILE_CFLAGS@ -OS_COMPILE_CXXFLAGS = @OS_COMPILE_CXXFLAGS@ +OS_COMPILE_CFLAGS = $(OS_CPPFLAGS) @COMPILE_CFLAGS@ +OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @COMPILE_CXXFLAGS@ -OS_LIBS = @OS_LIBS@ -ACDEFINES = @ACDEFINES@ +OS_INCLUDES = $(NSPR_CFLAGS) $(NSS_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) +OS_LIBS = @LIBS@ +ACDEFINES = @MOZ_DEFINES@ WARNINGS_AS_ERRORS = @WARNINGS_AS_ERRORS@ @@ -342,7 +353,10 @@ _MSC_VER = @_MSC_VER@ DLL_PREFIX = @DLL_PREFIX@ LIB_PREFIX = @LIB_PREFIX@ -OBJ_SUFFIX = @OBJ_SUFFIX@ +# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't +# manually use it before config.mk inclusion +OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX) +_OBJ_SUFFIX = @OBJ_SUFFIX@ LIB_SUFFIX = @LIB_SUFFIX@ DLL_SUFFIX = @DLL_SUFFIX@ BIN_SUFFIX = @BIN_SUFFIX@ @@ -407,23 +421,43 @@ ZIP = @ZIP@ XARGS = @XARGS@ STRIP = @STRIP@ DOXYGEN = @DOXYGEN@ -PBBUILD_BIN = @PBBUILD_BIN@ +PBBUILD_BIN = @PBBUILD@ SDP = @SDP@ NSINSTALL_BIN = @NSINSTALL_BIN@ WGET = @WGET@ RPMBUILD = @RPMBUILD@ -MOZ_JPEG_CFLAGS = @MOZ_JPEG_CFLAGS@ -MOZ_JPEG_LIBS = @MOZ_JPEG_LIBS@ +ifdef MOZ_NATIVE_JPEG +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +else +JPEG_CFLAGS = @MOZ_JPEG_CFLAGS@ +JPEG_LIBS = @MOZ_JPEG_LIBS@ +endif -MOZ_ZLIB_CFLAGS = @MOZ_ZLIB_CFLAGS@ +ifdef MOZ_NATIVE_ZLIB +ZLIB_CFLAGS = @ZLIB_CFLAGS@ +ZLIB_LIBS = @ZLIB_LIBS@ +else +ZLIB_CFLAGS = @MOZ_ZLIB_CFLAGS@ MOZ_ZLIB_LIBS = @MOZ_ZLIB_LIBS@ +endif -MOZ_BZ2_CFLAGS = @MOZ_BZ2_CFLAGS@ -MOZ_BZ2_LIBS = @MOZ_BZ2_LIBS@ +ifdef MOZ_NATIVE_BZ2 +BZ2_CFLAGS = @BZ2_CFLAGS@ +BZ2_LIBS = @BZ2_LIBS@ +else +BZ2_CFLAGS = @MOZ_BZ2_CFLAGS@ +BZ2_LIBS = @MOZ_BZ2_LIBS@ +endif -MOZ_PNG_CFLAGS = @MOZ_PNG_CFLAGS@ -MOZ_PNG_LIBS = @MOZ_PNG_LIBS@ +ifdef MOZ_NATIVE_PNG +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +else +PNG_CFLAGS = @MOZ_PNG_CFLAGS@ +PNG_LIBS = @MOZ_PNG_LIBS@ +endif QCMS_LIBS = @QCMS_LIBS@ @@ -480,6 +514,9 @@ QT_CONFIG = @QT_CONFIG@ TK_CFLAGS = @TK_CFLAGS@ TK_LIBS = @TK_LIBS@ +MOZ_TOOLKIT_REGISTRY_CFLAGS = \ + $(TK_CFLAGS) + CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@ MOZ_TREE_FREETYPE = @MOZ_TREE_FREETYPE@ @@ -540,9 +577,9 @@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@ -MOZ_NATIVE_MAKEDEPEND = @MOZ_NATIVE_MAKEDEPEND@ +MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@ -CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@ +export CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@ MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@ COMPILER_DEPEND = @COMPILER_DEPEND@ @@ -660,4 +697,15 @@ MOZ_PACKAGE_JSSHELL = @MOZ_PACKAGE_JSSHELL@ MOZ_LINKER_EXTRACT = @MOZ_LINKER_EXTRACT@ -include $(topsrcdir)/config/baseconfig.mk +# We only want to do the pymake sanity on Windows, other os's can cope +ifeq ($(HOST_OS_ARCH),WINNT) +# Ensure invariants between GNU Make and pymake +# Checked here since we want the sane error in a file that +# actually can be found regardless of path-style. +ifeq (_:,$(.PYMAKE)_$(findstring :,$(srcdir))) +$(error Windows-style srcdir being used with GNU make. Did you mean to run $(topsrcdir)/build/pymake/make.py instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake]) +endif +ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir)))) +$(error MSYS-style srcdir being used with Pymake. Did you mean to run GNU Make instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake]) +endif +endif # WINNT diff --git a/config/baseconfig.mk b/config/baseconfig.mk deleted file mode 100644 index ae69bae9283..00000000000 --- a/config/baseconfig.mk +++ /dev/null @@ -1,25 +0,0 @@ -INCLUDED_AUTOCONF_MK = 1 - -includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -DIST = $(DEPTH)/dist - -# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't -# manually use it before config.mk inclusion -_OBJ_SUFFIX := $(OBJ_SUFFIX) -OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX) - -# We only want to do the pymake sanity on Windows, other os's can cope -ifeq ($(HOST_OS_ARCH),WINNT) -# Ensure invariants between GNU Make and pymake -# Checked here since we want the sane error in a file that -# actually can be found regardless of path-style. -ifeq (_:,$(.PYMAKE)_$(findstring :,$(srcdir))) -$(error Windows-style srcdir being used with GNU make. Did you mean to run $(topsrcdir)/build/pymake/make.py instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake]) -endif -ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir)))) -$(error MSYS-style srcdir being used with Pymake. Did you mean to run GNU Make instead? [see-also: https://developer.mozilla.org/ en/Gmake_vs._Pymake]) -endif -endif # WINNT diff --git a/config/config.mk b/config/config.mk index 4763b4c34f7..cbec1f34224 100644 --- a/config/config.mk +++ b/config/config.mk @@ -370,8 +370,6 @@ JAVA_GEN_DIR = _javagen JAVA_DIST_DIR = $(DEPTH)/$(JAVA_GEN_DIR) JAVA_IFACES_PKG_NAME = org/mozilla/interfaces -OS_INCLUDES += $(NSPR_CFLAGS) $(NSS_CFLAGS) $(MOZ_JPEG_CFLAGS) $(MOZ_PNG_CFLAGS) $(MOZ_ZLIB_CFLAGS) - INCLUDES = \ $(LOCAL_INCLUDES) \ -I$(srcdir) \ @@ -383,8 +381,8 @@ INCLUDES = \ include $(topsrcdir)/config/static-checking-config.mk -CFLAGS = $(OS_CPPFLAGS) $(OS_CFLAGS) -CXXFLAGS = $(OS_CPPFLAGS) $(OS_CXXFLAGS) +CFLAGS = $(OS_CFLAGS) +CXXFLAGS = $(OS_CXXFLAGS) LDFLAGS = $(OS_LDFLAGS) $(MOZ_FIX_LINK_PATHS) # Allow each module to override the *default* optimization settings @@ -491,8 +489,8 @@ OS_COMPILE_CMMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch endif endif -COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_CPPFLAGS) $(OS_COMPILE_CFLAGS) -COMPILE_CXXFLAGS = $(STL_FLAGS) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(RTL_FLAGS) $(OS_CPPFLAGS) $(OS_COMPILE_CXXFLAGS) +COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS) +COMPILE_CXXFLAGS = $(STL_FLAGS) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS) COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS) COMPILE_CMMFLAGS = $(OS_COMPILE_CMMFLAGS) @@ -795,5 +793,3 @@ EXPAND_MOZLIBNAME = $(foreach lib,$(1),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUF ifndef MOZ_SYSTEM_PLY PLY_INCLUDE = -I$(topsrcdir)/other-licenses/ply endif - -export CL_INCLUDES_PREFIX diff --git a/configure.in b/configure.in index 604bf005bc8..9b515d78bc4 100644 --- a/configure.in +++ b/configure.in @@ -871,7 +871,7 @@ MOZ_PATH_PROGS(ZIP, zip) if test -z "$ZIP" -o "$ZIP" = ":"; then AC_MSG_ERROR([zip not found in \$PATH]) fi -MOZ_PATH_PROG(MOZ_NATIVE_MAKEDEPEND, makedepend) +MOZ_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend) MOZ_PATH_PROG(XARGS, xargs) if test -z "$XARGS" -o "$XARGS" = ":"; then AC_MSG_ERROR([xargs not found in \$PATH .]) @@ -912,7 +912,7 @@ from building Mozilla. Upgrade to Xcode 2.1 or later.]) dnl xcodebuild needs GCC_VERSION defined in the environment, since it dnl doesn't respect the CC/CXX setting. With GCC_VERSION set, it will use dnl /usr/bin/g(cc|++)-$GCC_VERSION. - MOZ_PATH_PROGS(PBBUILD_BIN, pbbuild xcodebuild pbxbuild) + MOZ_PATH_PROGS(PBBUILD, pbbuild xcodebuild pbxbuild) dnl sdp was formerly in /Developer/Tools. As of Mac OS X 10.4 (Darwin 8), dnl it has moved into /usr/bin. @@ -2095,7 +2095,7 @@ ia64*-hpux*) MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@' fi MOZ_FIX_LINK_PATHS= - MOZ_NATIVE_MAKEDEPEND= + SYSTEM_MAKEDEPEND= AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) AC_DEFINE(_LARGEFILE64_SOURCE) ;; @@ -2184,7 +2184,7 @@ ia64*-hpux*) MC=mc.exe # certain versions of cygwin's makedepend barf on the # #include vs -I./dist/include/string issue so don't use it - MOZ_NATIVE_MAKEDEPEND= + SYSTEM_MAKEDEPEND= if test -n "$GNU_CC"; then CC="$CC -mwindows" CXX="$CXX -mwindows" @@ -2465,7 +2465,7 @@ ia64*-hpux*) *-solaris*) AC_DEFINE(SOLARIS) TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"' - MOZ_NATIVE_MAKEDEPEND= + SYSTEM_MAKEDEPEND= MOZ_FIX_LINK_PATHS= # $ORIGIN/.. is for shared libraries under components/ to locate shared # libraries one level up (e.g. libnspr4.so) @@ -4038,28 +4038,29 @@ if test -n "${JPEG_DIR}" -a "${JPEG_DIR}" != "yes"; then LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS" fi if test -z "$JPEG_DIR" -o "$JPEG_DIR" = no; then - MOZ_NATIVE_JPEG= + SYSTEM_JPEG= else - AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [MOZ_NATIVE_JPEG=1 MOZ_JPEG_LIBS="-ljpeg"], MOZ_NATIVE_JPEG=) + AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS"], SYSTEM_JPEG=, $JPEG_LIBS) fi -if test "$MOZ_NATIVE_JPEG" = 1; then +if test "$SYSTEM_JPEG" = 1; then + LIBS="$JPEG_LIBS $LIBS" AC_TRY_COMPILE([ #include #include #include ], [ #if JPEG_LIB_VERSION < $MOZJPEG #error "Insufficient JPEG library version ($MOZJPEG required)." #endif ], - MOZ_NATIVE_JPEG=1, + SYSTEM_JPEG=1, AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg])) fi CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS LIBS=$_SAVE_LIBS -if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$MOZ_NATIVE_JPEG" = 1; then - MOZ_JPEG_CFLAGS="-I${JPEG_DIR}/include" - MOZ_JPEG_LIBS="-L${JPEG_DIR}/lib ${MOZ_JPEG_LIBS}" +if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then + JPEG_CFLAGS="-I${JPEG_DIR}/include" + JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}" fi dnl system ZLIB support @@ -4077,12 +4078,13 @@ if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS" fi if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then - MOZ_NATIVE_ZLIB= + SYSTEM_ZLIB= else - AC_CHECK_LIB(z, gzread, [MOZ_NATIVE_ZLIB=1 MOZ_ZLIB_LIBS="-lz"], - [MOZ_NATIVE_ZLIB=]) + AC_CHECK_LIB(z, gzread, [SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS"], + [SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=], $ZLIB_LIBS) fi -if test "$MOZ_NATIVE_ZLIB" = 1; then +if test "$SYSTEM_ZLIB" = 1; then + LIBS="$ZLIB_LIBS $LIBS" MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'` AC_TRY_COMPILE([ #include #include @@ -4090,19 +4092,19 @@ if test "$MOZ_NATIVE_ZLIB" = 1; then [ #if ZLIB_VERNUM < $MOZZLIBNUM #error "Insufficient zlib version ($MOZZLIBNUM required)." #endif ], - MOZ_NATIVE_ZLIB=1, + SYSTEM_ZLIB=1, AC_MSG_ERROR([Insufficient zlib version for --with-system-zlib ($MOZZLIB required)])) fi CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS LIBS=$_SAVE_LIBS -if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$MOZ_NATIVE_ZLIB" = 1; then - MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" +if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then + ZLIB_CFLAGS="-I${ZLIB_DIR}/include" + ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" fi -if test "$MOZ_LINKER" = 1 -a "$MOZ_NATIVE_ZLIB" != 1; then +if test "$MOZ_LINKER" = 1 -a "$SYSTEM_ZLIB" != 1; then AC_MSG_ERROR([Custom dynamic linker requires --with-system-zlib]) fi @@ -4121,18 +4123,18 @@ if test -n "${BZ2_DIR}" -a "${BZ2_DIR}" != "yes"; then LDFLAGS="-L${BZ2_DIR}/lib $LDFLAGS" fi if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then - MOZ_NATIVE_BZ2= + SYSTEM_BZ2= else - AC_CHECK_LIB(bz2, BZ2_bzread, [MOZ_NATIVE_BZ2=1 MOZ_BZ2_LIBS="-lbz2"], - [MOZ_NATIVE_BZ2= MOZ_BZ2_CFLAGS= MOZ_BZ2_LIBS=]) + AC_CHECK_LIB(bz2, BZ2_bzread, [SYSTEM_BZ2=1 BZ2_LIBS="-lbz2"], + [SYSTEM_BZ2= BZ2_CFLAGS= BZ2_LIBS=]) fi CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS LIBS=$_SAVE_LIBS -if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$MOZ_NATIVE_BZ2" = 1; then - MOZ_BZ2_CFLAGS="-I${BZ2_DIR}/include" - MOZ_BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}" +if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$SYSTEM_BZ2" = 1; then + BZ2_CFLAGS="-I${BZ2_DIR}/include" + BZ2_LIBS="-L${BZ2_DIR}/lib ${BZ2_LIBS}" fi dnl system PNG Support @@ -4145,19 +4147,25 @@ MOZ_ARG_WITH_STRING(system-png, _SAVE_CFLAGS=$CFLAGS _SAVE_LDFLAGS=$LDFLAGS _SAVE_LIBS=$LIBS +CFLAGS="$ZLIB_CFLAGS $CFLAGS" +LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" if test -n "${PNG_DIR}" -a "${PNG_DIR}" != "yes"; then CFLAGS="-I${PNG_DIR}/include $CFLAGS" LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" fi if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then - MOZ_NATIVE_PNG= + SYSTEM_PNG= else - AC_CHECK_LIB(png, png_get_valid, [MOZ_NATIVE_PNG=1 MOZ_PNG_LIBS="-lpng"], - AC_MSG_ERROR([--with-system-png requested but no working libpng found])) + _SAVE_PNG_LIBS=$PNG_LIBS + AC_CHECK_LIB(png, png_get_valid, [SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS"], + AC_MSG_ERROR([--with-system-png requested but no working libpng found]), + $PNG_LIBS) AC_CHECK_LIB(png, png_get_acTL, , - AC_MSG_ERROR([--with-system-png won't work because the system's libpng doesn't have APNG support])) + AC_MSG_ERROR([--with-system-png won't work because the system's libpng doesn't have APNG support]), + $_SAVE_PNG_LIBS) fi -if test "$MOZ_NATIVE_PNG" = 1; then +if test "$SYSTEM_PNG" = 1; then + LIBS="$PNG_LIBS $LIBS" AC_TRY_COMPILE([ #include #include #include ], @@ -4167,16 +4175,16 @@ if test "$MOZ_NATIVE_PNG" = 1; then #ifndef PNG_UINT_31_MAX #error "Insufficient libpng version." #endif ], - MOZ_NATIVE_PNG=1, + SYSTEM_PNG=1, AC_MSG_ERROR([--with-system-png requested but no working libpng found])) fi CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS LIBS=$_SAVE_LIBS -if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$MOZ_NATIVE_PNG" = 1; then - MOZ_PNG_CFLAGS="-I${PNG_DIR}/include" - MOZ_PNG_LIBS="-L${PNG_DIR}/lib ${MOZ_PNG_LIBS}" +if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then + PNG_CFLAGS="-I${PNG_DIR}/include" + PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}" fi fi # SKIP_LIBRARY_CHECKS @@ -4186,13 +4194,13 @@ dnl ======================================================== MOZ_ARG_ENABLE_BOOL(system-hunspell, [ --enable-system-hunspell Use system hunspell (located with pkgconfig)], - MOZ_NATIVE_HUNSPELL=1 ) + SYSTEM_HUNSPELL=1 ) -if test -n "$MOZ_NATIVE_HUNSPELL"; then +if test -n "$SYSTEM_HUNSPELL"; then PKG_CHECK_MODULES(MOZ_HUNSPELL, hunspell) fi -AC_SUBST(MOZ_NATIVE_HUNSPELL) +AC_SUBST(SYSTEM_HUNSPELL) dnl ======================================================== dnl system libffi Support @@ -5870,7 +5878,7 @@ dnl ======================================================== dnl = libjpeg-turbo configuration dnl ======================================================== MOZ_LIBJPEG_TURBO= -if test -z "$MOZ_NATIVE_JPEG"; then +if test -z "$SYSTEM_JPEG"; then MOZ_LIBJPEG_TURBO=1 fi @@ -5879,7 +5887,7 @@ MOZ_ARG_DISABLE_BOOL(libjpeg_turbo, MOZ_LIBJPEG_TURBO=, MOZ_LIBJPEG_TURBO=1) -if test "$MOZ_NATIVE_JPEG" = 1 -a "$MOZ_LIBJPEG_TURBO" = 1; then +if test "$SYSTEM_JPEG" = 1 -a "$MOZ_LIBJPEG_TURBO" = 1; then AC_MSG_ERROR([cannot use --with-system-jpeg with --enable-libjpeg-turbo.]) fi @@ -8476,12 +8484,21 @@ COMPILE_CXXFLAGS=`echo \ $_DEPEND_CFLAGS \ $COMPILE_CXXFLAGS` -AC_SUBST(MOZ_NATIVE_MAKEDEPEND) +AC_SUBST(SYSTEM_MAKEDEPEND) AC_SUBST(SYSTEM_LIBXUL) -AC_SUBST(MOZ_NATIVE_JPEG) -AC_SUBST(MOZ_NATIVE_PNG) -AC_SUBST(MOZ_NATIVE_ZLIB) -AC_SUBST(MOZ_NATIVE_BZ2) +AC_SUBST(SYSTEM_JPEG) +AC_SUBST(SYSTEM_PNG) +AC_SUBST(SYSTEM_ZLIB) +AC_SUBST(SYSTEM_BZ2) + +AC_SUBST(JPEG_CFLAGS) +AC_SUBST(JPEG_LIBS) +AC_SUBST(ZLIB_CFLAGS) +AC_SUBST(ZLIB_LIBS) +AC_SUBST(BZ2_CFLAGS) +AC_SUBST(BZ2_LIBS) +AC_SUBST(PNG_CFLAGS) +AC_SUBST(PNG_LIBS) AC_SUBST(MOZ_FLEXBOX) AC_SUBST(MOZ_JPEG_CFLAGS) @@ -8503,20 +8520,13 @@ AC_SUBST(NSS_DEP_LIBS) AC_SUBST(MOZ_NATIVE_NSS) AC_SUBST(NSS_DISABLE_DBM) -OS_CFLAGS="$CFLAGS" -OS_CXXFLAGS="$CXXFLAGS" -OS_CPPFLAGS="$CPPFLAGS" -OS_COMPILE_CFLAGS="$COMPILE_CFLAGS" -OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS" -OS_LDFLAGS="$LDFLAGS" -OS_LIBS="$LIBS" -AC_SUBST(OS_CFLAGS) -AC_SUBST(OS_CXXFLAGS) -AC_SUBST(OS_CPPFLAGS) -AC_SUBST(OS_COMPILE_CFLAGS) -AC_SUBST(OS_COMPILE_CXXFLAGS) -AC_SUBST(OS_LDFLAGS) -AC_SUBST(OS_LIBS) +AC_SUBST(CFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(COMPILE_CFLAGS) +AC_SUBST(COMPILE_CXXFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) AC_SUBST(CROSS_COMPILE) AC_SUBST(WCHAR_CFLAGS) @@ -8817,8 +8827,8 @@ if test "$?" != 0; then AC_MSG_ERROR([Error outputting confdefs.h]) fi AC_OUTPUT_MAKE_DEFS() -ACDEFINES=$DEFS -AC_SUBST(ACDEFINES) +MOZ_DEFINES=$DEFS +AC_SUBST(MOZ_DEFINES) rm -f confdefs.h mv confdefs.h.save confdefs.h diff --git a/js/src/config/autoconf.mk.in b/js/src/config/autoconf.mk.in index 64c405a2afa..970e140a842 100644 --- a/js/src/config/autoconf.mk.in +++ b/js/src/config/autoconf.mk.in @@ -5,6 +5,9 @@ # A netscape style .mk file for autoconf builds +INCLUDED_AUTOCONF_MK = 1 +USE_AUTOCONF = 1 +MOZILLA_CLIENT = 1 target = @target@ ac_configure_args = @ac_configure_args@ MOZILLA_VERSION = @MOZILLA_VERSION@ @@ -24,7 +27,15 @@ libdir = @libdir@ datadir = @datadir@ mandir = @mandir@ +installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + TOP_DIST = @TOP_DIST@ +ifneq (,$(filter /%,$(TOP_DIST))) +DIST = $(TOP_DIST) +else +DIST = $(DEPTH)/$(TOP_DIST) +endif MOZ_JS_LIBS = @MOZ_JS_LIBS@ @@ -56,6 +67,8 @@ ENABLE_TESTS = @ENABLE_TESTS@ TAR=@TAR@ +RM = rm -f + # The MOZ_UI_LOCALE var is used to build a particular locale. Do *not* # use the var to change any binary files. Do *not* use this var unless you # write rules for the "clean-locale" and "locale" targets. @@ -81,16 +94,17 @@ MOZ_NATIVE_NSPR = @MOZ_NATIVE_NSPR@ CROSS_COMPILE = @CROSS_COMPILE@ -OS_CPPFLAGS = @OS_CPPFLAGS@ -OS_CFLAGS = @OS_CFLAGS@ -OS_CXXFLAGS = @OS_CXXFLAGS@ -OS_LDFLAGS = @OS_LDFLAGS@ +OS_CPPFLAGS = @CPPFLAGS@ +OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@ +OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@ +OS_LDFLAGS = @LDFLAGS@ -OS_COMPILE_CFLAGS = @OS_COMPILE_CFLAGS@ -OS_COMPILE_CXXFLAGS = @OS_COMPILE_CXXFLAGS@ +OS_COMPILE_CFLAGS = $(OS_CPPFLAGS) @COMPILE_CFLAGS@ +OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @COMPILE_CXXFLAGS@ -OS_LIBS = @OS_LIBS@ -ACDEFINES = @ACDEFINES@ +OS_INCLUDES = $(NSPR_CFLAGS) +OS_LIBS = @LIBS@ +ACDEFINES = @MOZ_DEFINES@ WARNINGS_AS_ERRORS = @WARNINGS_AS_ERRORS@ FAIL_ON_WARNINGS = @FAIL_ON_WARNINGS@ @@ -128,7 +142,10 @@ _MSC_VER = @_MSC_VER@ DLL_PREFIX = @DLL_PREFIX@ LIB_PREFIX = @LIB_PREFIX@ -OBJ_SUFFIX = @OBJ_SUFFIX@ +# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't +# manually use it before config.mk inclusion +OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX) +_OBJ_SUFFIX = @OBJ_SUFFIX@ LIB_SUFFIX = @LIB_SUFFIX@ DLL_SUFFIX = @DLL_SUFFIX@ BIN_SUFFIX = @BIN_SUFFIX@ @@ -184,7 +201,7 @@ RANLIB = @RANLIB@ XARGS = @XARGS@ STRIP = @STRIP@ DOXYGEN = @DOXYGEN@ -PBBUILD_BIN = @PBBUILD_BIN@ +PBBUILD_BIN = @PBBUILD@ SDP = @SDP@ NSINSTALL_BIN = @NSINSTALL_BIN@ @@ -219,9 +236,12 @@ DLL_SUFFIX = @DLL_SUFFIX@ NO_LD_ARCHIVE_FLAGS = @NO_LD_ARCHIVE_FLAGS@ -MOZ_NATIVE_MAKEDEPEND = @MOZ_NATIVE_MAKEDEPEND@ +MOZ_TOOLKIT_REGISTRY_CFLAGS = \ + $(TK_CFLAGS) -CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@ +MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@ + +export CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@ MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@ COMPILER_DEPEND = @COMPILER_DEPEND@ @@ -284,4 +304,15 @@ MOZ_METRO = @MOZ_METRO@ MOZ_ASAN = @MOZ_ASAN@ -include $(topsrcdir)/config/baseconfig.mk +# We only want to do the pymake sanity on Windows, other os's can cope +ifeq ($(HOST_OS_ARCH),WINNT) +# Ensure invariants between GNU Make and pymake +# Checked here since we want the sane error in a file that +# actually can be found regardless of path-style. +ifeq (_:,$(.PYMAKE)_$(findstring :,$(srcdir))) +$(error Windows-style srcdir being used with GNU make. Did you mean to run $(topsrcdir)/build/pymake/make.py instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake]) +endif +ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir)))) +$(error MSYS-style srcdir being used with Pymake. Did you mean to run GNU Make instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake]) +endif +endif # WINNT diff --git a/js/src/config/baseconfig.mk b/js/src/config/baseconfig.mk deleted file mode 100644 index 6ca9f60e851..00000000000 --- a/js/src/config/baseconfig.mk +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDED_AUTOCONF_MK = 1 - -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - -ifneq (,$(filter /%,$(TOP_DIST))) -DIST = $(TOP_DIST) -else -DIST = $(DEPTH)/$(TOP_DIST) -endif - -# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't -# manually use it before config.mk inclusion -_OBJ_SUFFIX := $(OBJ_SUFFIX) -OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX) - -# We only want to do the pymake sanity on Windows, other os's can cope -ifeq ($(HOST_OS_ARCH),WINNT) -# Ensure invariants between GNU Make and pymake -# Checked here since we want the sane error in a file that -# actually can be found regardless of path-style. -ifeq (_:,$(.PYMAKE)_$(findstring :,$(srcdir))) -$(error Windows-style srcdir being used with GNU make. Did you mean to run $(topsrcdir)/build/pymake/make.py instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake]) -endif -ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir)))) -$(error MSYS-style srcdir being used with Pymake. Did you mean to run GNU Make instead? [see-also: https://developer.mozilla.org/ en/Gmake_vs._Pymake]) -endif -endif # WINNT diff --git a/js/src/config/check-sync-exceptions b/js/src/config/check-sync-exceptions index 79fcaa8fa57..05e83273758 100644 --- a/js/src/config/check-sync-exceptions +++ b/js/src/config/check-sync-exceptions @@ -2,7 +2,6 @@ Makefile.in Makefile autoconf.mk.in autoconf.mk -baseconfig.mk check-sync-dirs.py static-checking-config.mk nsinstall diff --git a/js/src/config/config.mk b/js/src/config/config.mk index 4763b4c34f7..cbec1f34224 100644 --- a/js/src/config/config.mk +++ b/js/src/config/config.mk @@ -370,8 +370,6 @@ JAVA_GEN_DIR = _javagen JAVA_DIST_DIR = $(DEPTH)/$(JAVA_GEN_DIR) JAVA_IFACES_PKG_NAME = org/mozilla/interfaces -OS_INCLUDES += $(NSPR_CFLAGS) $(NSS_CFLAGS) $(MOZ_JPEG_CFLAGS) $(MOZ_PNG_CFLAGS) $(MOZ_ZLIB_CFLAGS) - INCLUDES = \ $(LOCAL_INCLUDES) \ -I$(srcdir) \ @@ -383,8 +381,8 @@ INCLUDES = \ include $(topsrcdir)/config/static-checking-config.mk -CFLAGS = $(OS_CPPFLAGS) $(OS_CFLAGS) -CXXFLAGS = $(OS_CPPFLAGS) $(OS_CXXFLAGS) +CFLAGS = $(OS_CFLAGS) +CXXFLAGS = $(OS_CXXFLAGS) LDFLAGS = $(OS_LDFLAGS) $(MOZ_FIX_LINK_PATHS) # Allow each module to override the *default* optimization settings @@ -491,8 +489,8 @@ OS_COMPILE_CMMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch endif endif -COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_CPPFLAGS) $(OS_COMPILE_CFLAGS) -COMPILE_CXXFLAGS = $(STL_FLAGS) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(RTL_FLAGS) $(OS_CPPFLAGS) $(OS_COMPILE_CXXFLAGS) +COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS) +COMPILE_CXXFLAGS = $(STL_FLAGS) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS) COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS) COMPILE_CMMFLAGS = $(OS_COMPILE_CMMFLAGS) @@ -795,5 +793,3 @@ EXPAND_MOZLIBNAME = $(foreach lib,$(1),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUF ifndef MOZ_SYSTEM_PLY PLY_INCLUDE = -I$(topsrcdir)/other-licenses/ply endif - -export CL_INCLUDES_PREFIX diff --git a/js/src/configure.in b/js/src/configure.in index d6d867c35eb..e240ab0bf34 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -728,7 +728,7 @@ AC_SUBST(NSINSTALL_BIN) MOZ_PATH_PROG(DOXYGEN, doxygen, :) MOZ_PATH_PROG(AUTOCONF, autoconf, :) -MOZ_PATH_PROG(MOZ_NATIVE_MAKEDEPEND, makedepend) +MOZ_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend) MOZ_PATH_PROG(XARGS, xargs) if test -z "$XARGS" -o "$XARGS" = ":"; then AC_MSG_ERROR([xargs not found in \$PATH .]) @@ -766,7 +766,7 @@ from building Mozilla. Upgrade to Xcode 2.1 or later.]) dnl xcodebuild needs GCC_VERSION defined in the environment, since it dnl doesn't respect the CC/CXX setting. With GCC_VERSION set, it will use dnl /usr/bin/g(cc|++)-$GCC_VERSION. - MOZ_PATH_PROGS(PBBUILD_BIN, pbbuild xcodebuild pbxbuild) + MOZ_PATH_PROGS(PBBUILD, pbbuild xcodebuild pbxbuild) dnl sdp was formerly in /Developer/Tools. As of Mac OS X 10.4 (Darwin 8), dnl it has moved into /usr/bin. @@ -1704,7 +1704,7 @@ ia64*-hpux*) MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@' fi MOZ_FIX_LINK_PATHS= - MOZ_NATIVE_MAKEDEPEND= + SYSTEM_MAKEDEPEND= AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) AC_DEFINE(_LARGEFILE64_SOURCE) ;; @@ -1784,7 +1784,7 @@ ia64*-hpux*) MC=mc.exe # certain versions of cygwin's makedepend barf on the # #include vs -I./dist/include/string issue so don't use it - MOZ_NATIVE_MAKEDEPEND= + SYSTEM_MAKEDEPEND= if test -n "$GNU_CC"; then CC="$CC -mwindows" CXX="$CXX -mwindows" @@ -2063,7 +2063,7 @@ ia64*-hpux*) NO_NSPR_CONFIG_SYSTEM_CFLAGS="-I/usr/include/mps" NO_NSPR_CONFIG_SYSTEM_VERSION=["`pkgparam SUNWpr SUNW_PRODVERS | sed -e 's/^[1-9][0-9]*\.[0-9][0-9]*$/&.0/'`"] fi - MOZ_NATIVE_MAKEDEPEND= + SYSTEM_MAKEDEPEND= MOZ_FIX_LINK_PATHS= # $ORIGIN/.. is for shared libraries under components/ to locate shared # libraries one level up (e.g. libnspr4.so) @@ -4361,7 +4361,9 @@ AC_SUBST(MOZ_POST_PROGRAM_COMMAND) AC_SUBST(MOZ_APP_NAME) AC_SUBST(MOZ_APP_DISPLAYNAME) +AC_SUBST(MOZ_APP_UA_NAME) AC_SUBST(MOZ_APP_VERSION) +AC_SUBST(FIREFOX_VERSION) AC_SUBST(MOZ_PKG_SPECIAL) @@ -4392,26 +4394,19 @@ COMPILE_CXXFLAGS=`echo \ $_DEPEND_CFLAGS \ $COMPILE_CXXFLAGS` -AC_SUBST(MOZ_NATIVE_MAKEDEPEND) +AC_SUBST(SYSTEM_MAKEDEPEND) AC_SUBST(NSPR_CFLAGS) AC_SUBST(NSPR_LIBS) AC_SUBST(MOZ_NATIVE_NSPR) -OS_CFLAGS="$CFLAGS" -OS_CXXFLAGS="$CXXFLAGS" -OS_CPPFLAGS="$CPPFLAGS" -OS_COMPILE_CFLAGS="$COMPILE_CFLAGS" -OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS" -OS_LDFLAGS="$LDFLAGS" -OS_LIBS="$LIBS" -AC_SUBST(OS_CFLAGS) -AC_SUBST(OS_CXXFLAGS) -AC_SUBST(OS_CPPFLAGS) -AC_SUBST(OS_COMPILE_CFLAGS) -AC_SUBST(OS_COMPILE_CXXFLAGS) -AC_SUBST(OS_LDFLAGS) -AC_SUBST(OS_LIBS) +AC_SUBST(CFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(COMPILE_CFLAGS) +AC_SUBST(COMPILE_CXXFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) AC_SUBST(CROSS_COMPILE) AC_SUBST(MOZ_METRO) @@ -4622,8 +4617,8 @@ if test "$?" != 0; then AC_MSG_ERROR([Error outputting confdefs.h]) fi AC_OUTPUT_MAKE_DEFS() -ACDEFINES=$DEFS -AC_SUBST(ACDEFINES) +MOZ_DEFINES=$DEFS +AC_SUBST(MOZ_DEFINES) rm -f confdefs.h mv confdefs.h.save confdefs.h diff --git a/layout/media/Makefile.in b/layout/media/Makefile.in index 01dfece10c8..88b03f550b2 100644 --- a/layout/media/Makefile.in +++ b/layout/media/Makefile.in @@ -118,7 +118,11 @@ EXTRA_DSO_LDOPTS = $(MOZALLOC_LIB) $(NSPR_LIBS) OS_LIBS += $(call EXPAND_LIBNAME,usp10 ole32) # OTS uses uncompress2() from libz, so we need to link with this +ifdef MOZ_NATIVE_ZLIB +EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) +else EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS) +endif DEFFILE = symbols.def endif diff --git a/mozglue/build/Makefile.in b/mozglue/build/Makefile.in index 94f348694dc..0eee7613c62 100644 --- a/mozglue/build/Makefile.in +++ b/mozglue/build/Makefile.in @@ -67,7 +67,7 @@ endif ifeq (android, $(MOZ_WIDGET_TOOLKIT)) # Add Android specific code -EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS) +EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,../android) endif diff --git a/mozglue/tests/Makefile.in b/mozglue/tests/Makefile.in index 983be17e4d0..aced00867e1 100644 --- a/mozglue/tests/Makefile.in +++ b/mozglue/tests/Makefile.in @@ -24,7 +24,7 @@ MOZ_GLUE_PROGRAM_LDFLAGS = MOZ_GLUE_LDFLAGS = LIBS += $(call EXPAND_LIBNAME_PATH,linker,../linker) -EXTRA_LIBS = $(MOZ_ZLIB_LIBS) +EXTRA_LIBS = $(ZLIB_LIBS) endif include $(topsrcdir)/config/rules.mk diff --git a/other-licenses/bsdiff/Makefile.in b/other-licenses/bsdiff/Makefile.in index 5cf0a6ca9b1..8964bf573d6 100644 --- a/other-licenses/bsdiff/Makefile.in +++ b/other-licenses/bsdiff/Makefile.in @@ -35,7 +35,7 @@ HOST_PROGRAM = mbsdiff$(BIN_SUFFIX) HOST_CSRCS = bsdiff.c ifdef MOZ_NATIVE_BZ2 -HOST_LIBS += $(MOZ_BZ2_LIBS) +HOST_LIBS += $(BZ2_LIBS) else HOST_LIBS += $(DIST)/host/lib/$(LIB_PREFIX)hostbz2.$(LIB_SUFFIX) endif @@ -48,4 +48,4 @@ LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/mozapps/update/updater include $(topsrcdir)/config/rules.mk -CXXFLAGS += $(MOZ_BZ2_CFLAGS) +CXXFLAGS += $(BZ2_CFLAGS) diff --git a/rdf/tests/rdfcat/Makefile.in b/rdf/tests/rdfcat/Makefile.in index 8eb4c176cef..3ed1a6c359a 100644 --- a/rdf/tests/rdfcat/Makefile.in +++ b/rdf/tests/rdfcat/Makefile.in @@ -27,4 +27,4 @@ endif include $(topsrcdir)/config/rules.mk -CXXFLAGS += $(TK_CFLAGS) +CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS) diff --git a/rdf/tests/triplescat/Makefile.in b/rdf/tests/triplescat/Makefile.in index 3c17f1e8af1..aa96427fd29 100644 --- a/rdf/tests/triplescat/Makefile.in +++ b/rdf/tests/triplescat/Makefile.in @@ -27,4 +27,4 @@ endif include $(topsrcdir)/config/rules.mk -CXXFLAGS += $(TK_CFLAGS) +CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS) diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index a44ebec97e8..2c940ae629f 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -348,14 +348,18 @@ EXTRA_DSO_LDOPTS += \ $(NULL) ifdef MOZ_NATIVE_JPEG -EXTRA_DSO_LDOPTS += $(MOZ_JPEG_LIBS) +EXTRA_DSO_LDOPTS += $(JPEG_LIBS) endif ifdef MOZ_NATIVE_PNG -EXTRA_DSO_LDOPTS += $(MOZ_PNG_LIBS) +EXTRA_DSO_LDOPTS += $(PNG_LIBS) endif +ifdef MOZ_NATIVE_ZLIB +EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) +else EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS) +endif ifdef MOZ_NATIVE_HUNSPELL EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS) diff --git a/toolkit/mozapps/update/updater/Makefile.in b/toolkit/mozapps/update/updater/Makefile.in index 035e99f4fb3..b34002f30ef 100644 --- a/toolkit/mozapps/update/updater/Makefile.in +++ b/toolkit/mozapps/update/updater/Makefile.in @@ -35,7 +35,7 @@ LOCAL_INCLUDES += \ LIBS += \ ../common/$(LIB_PREFIX)updatecommon.$(LIB_SUFFIX) \ $(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \ - $(MOZ_BZ2_LIBS) \ + $(BZ2_LIBS) \ $(NULL) ifeq ($(OS_ARCH),WINNT) @@ -129,7 +129,7 @@ EXTRA_LIBS += $(call EXPAND_LIBNAME,crypt32) EXTRA_LIBS += $(call EXPAND_LIBNAME,advapi32) endif -CXXFLAGS += $(MOZ_BZ2_CFLAGS) +CXXFLAGS += $(BZ2_CFLAGS) ifneq (,$(filter beta release esr,$(MOZ_UPDATE_CHANNEL))) RCFLAGS += -DMAR_SIGNING_RELEASE_BETA=1 diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index 74b4a064fb9..3ea1b59035f 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -1329,7 +1329,7 @@ if [ "$MOZ_UPDATER" ]; then modules/libmar/src/Makefile modules/libmar/tool/Makefile " - if [ ! "$MOZ_NATIVE_BZ2" ]; then + if [ ! "$SYSTEM_BZ2" ]; then add_makefiles " modules/libbz2/Makefile modules/libbz2/src/Makefile @@ -1464,14 +1464,14 @@ if [ "$MOZ_PSM" ]; then " fi -if [ ! "$MOZ_NATIVE_JPEG" ]; then +if [ ! "$SYSTEM_JPEG" ]; then add_makefiles " media/libjpeg/Makefile media/libjpeg/simd/Makefile " fi -if [ ! "$MOZ_NATIVE_ZLIB" ]; then +if [ ! "$SYSTEM_ZLIB" ]; then add_makefiles " modules/zlib/Makefile modules/zlib/src/Makefile @@ -1484,7 +1484,7 @@ if [ "$MOZ_UPDATE_PACKAGING" ]; then " fi -if [ ! "$MOZ_NATIVE_PNG" ]; then +if [ ! "$SYSTEM_PNG" ]; then add_makefiles " media/libpng/Makefile "