Bug 1049281 - Move third-party build system "drivers" to config/external, and stop using static dirs. r=gps

--HG--
rename : intl/icu/Makefile.in => config/external/icu/Makefile.in
rename : config/nspr/Makefile.in => config/external/nspr/Makefile.in
rename : config/nspr/moz.build => config/external/nspr/moz.build
rename : security/build/Makefile.in => config/external/nss/Makefile.in
rename : security/build/moz.build => config/external/nss/moz.build
rename : security/build/nspr-dummy.def => config/external/nss/nspr-dummy.def
rename : security/build/nss.def => config/external/nss/nss.def
rename : security/build/nss.mk => config/external/nss/nss.mk
This commit is contained in:
Mike Hommey 2014-08-07 02:58:52 +09:00
parent 41ab4d6824
commit 3a0a51dc58
16 changed files with 45 additions and 23 deletions

View File

@ -332,7 +332,7 @@ toolkit/library/target: ../ldap/target
endif endif
ifndef MOZ_FOLD_LIBS ifndef MOZ_FOLD_LIBS
ifndef MOZ_NATIVE_SQLITE ifndef MOZ_NATIVE_SQLITE
security/build/target: db/sqlite3/src/target config/external/nss/target: db/sqlite3/src/target
endif endif
endif endif
ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library) ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library)

6
config/external/ffi/Makefile.in vendored Normal file
View File

@ -0,0 +1,6 @@
# 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/.
target::
$(MAKE) -C $(DEPTH)/js/src/ctypes/libffi

5
config/external/ffi/moz.build vendored Normal file
View File

@ -0,0 +1,5 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

6
config/external/freetype2/Makefile.in vendored Normal file
View File

@ -0,0 +1,6 @@
# 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/.
target::
$(MAKE) -C $(DEPTH)/modules/freetype2

5
config/external/freetype2/moz.build vendored Normal file
View File

@ -0,0 +1,5 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

View File

@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
STANDALONE_MAKEFILE = 1
# Ensure that this happens before including rules.mk # Ensure that this happens before including rules.mk
ifdef ENABLE_INTL_API ifdef ENABLE_INTL_API
ifndef MOZ_NATIVE_ICU ifndef MOZ_NATIVE_ICU
@ -29,7 +27,7 @@ ifdef ENABLE_INTL_API
ICU_DEST := $(DIST)/bin ICU_DEST := $(DIST)/bin
INSTALL_TARGETS += ICU INSTALL_TARGETS += ICU
$(ICU_FILES): buildicu $(ICU_FILES): buildicu
ICU_TARGET := default ICU_TARGET := target
endif endif
else # !MOZ_SHARED_ICU else # !MOZ_SHARED_ICU
ifeq ($(OS_ARCH),WINNT) ifeq ($(OS_ARCH),WINNT)
@ -44,7 +42,7 @@ include $(topsrcdir)/config/rules.mk
ifdef ENABLE_INTL_API ifdef ENABLE_INTL_API
ifndef MOZ_NATIVE_ICU ifndef MOZ_NATIVE_ICU
default:: buildicu target:: buildicu
# - Force ICU to use the standard suffix for object files because expandlibs # - Force ICU to use the standard suffix for object files because expandlibs
# will discard all files with a non-standard suffix (bug 857450). # will discard all files with a non-standard suffix (bug 857450).
@ -54,16 +52,16 @@ buildicu::
# Msys screws up GENRBOPTS when it contains spaces, so all genrb flags need # Msys screws up GENRBOPTS when it contains spaces, so all genrb flags need
# to be stuck together. See https://bugzilla.mozilla.org/show_bug.cgi?id=1034594#c34 # to be stuck together. See https://bugzilla.mozilla.org/show_bug.cgi?id=1034594#c34
ifdef CROSS_COMPILE ifdef CROSS_COMPILE
+$(MAKE) -j1 -C host STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kRC' +$(MAKE) -j1 -C $(DEPTH)/intl/icu/host STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kRC'
endif endif
+$(MAKE) -j1 -C target STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kR' +$(MAKE) -j1 -C $(DEPTH)/intl/icu/target STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kR'
$(ICU_LIB_RENAME) $(ICU_LIB_RENAME)
distclean clean:: distclean clean::
ifdef CROSS_COMPILE ifdef CROSS_COMPILE
+$(MAKE) -C host $@ STATIC_O=$(OBJ_SUFFIX) +$(MAKE) -C $(DEPTH)/intl/icu/host $@ STATIC_O=$(OBJ_SUFFIX)
endif endif
+$(MAKE) -C target $@ STATIC_O=$(OBJ_SUFFIX) +$(MAKE) -C $(DEPTH)/intl/icu/target $@ STATIC_O=$(OBJ_SUFFIX)
endif endif
endif endif

5
config/external/icu/moz.build vendored Normal file
View File

@ -0,0 +1,5 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

View File

@ -6,10 +6,10 @@
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
ifdef LIBXUL_SDK ifdef LIBXUL_SDK
$(error config/nspr/Makefile.in is not compatible with --enable-libxul-sdk=) $(error config/external/nspr/Makefile.in is not compatible with --enable-libxul-sdk=)
endif endif
ifdef MOZ_NATIVE_NSPR ifdef MOZ_NATIVE_NSPR
$(error config/nspr/Makefile.in is not compatible with MOZ_NATIVE_NSPR) $(error config/external/nspr/Makefile.in is not compatible with MOZ_NATIVE_NSPR)
endif endif
# Copy NSPR to the SDK # Copy NSPR to the SDK

View File

@ -332,7 +332,7 @@ EXTRA_LIBS += $(DEPTH)/nsprpub/lib/ds/$(LIB_PREFIX)plds4$(SUFFIX)
EXTRA_LIBS += $(DEPTH)/nsprpub/lib/libc/src/$(LIB_PREFIX)plc4$(SUFFIX) EXTRA_LIBS += $(DEPTH)/nsprpub/lib/libc/src/$(LIB_PREFIX)plc4$(SUFFIX)
# Add all static libraries for nss, smime, ssl and nssutil # Add all static libraries for nss, smime, ssl and nssutil
EXTRA_LIBS += $(addprefix ../,$(NSS_STATIC_LIBS)) EXTRA_LIBS += $(addprefix $(DEPTH)/security/,$(NSS_STATIC_LIBS))
nss_def_file := $(srcdir)/nss.def nss_def_file := $(srcdir)/nss.def
@ -368,7 +368,7 @@ ifdef MOZ_FOLD_LIBS
# Force the linker to include everything from the static libraries. # Force the linker to include everything from the static libraries.
EXPAND_LIBS_EXEC += --extract EXPAND_LIBS_EXEC += --extract
$(SHARED_LIBRARY): $(addprefix ../,$(NSS_STATIC_LIBS)) $(SHARED_LIBRARY): $(addprefix $(DEPTH)/security/,$(NSS_STATIC_LIBS))
ifdef IMPORT_LIB_SUFFIX ifdef IMPORT_LIB_SUFFIX
IMPORT_PREFIX = $(LIB_PREFIX) IMPORT_PREFIX = $(LIB_PREFIX)
@ -389,7 +389,7 @@ $(DIST)/lib/$(DLL_PREFIX)freebl3$(DLL_SUFFIX): libs-nss/lib/freebl
$(DIST)/lib/$(DLL_PREFIX)nssckbi$(DLL_SUFFIX): libs-nss/lib/ckfw $(DIST)/lib/$(DLL_PREFIX)nssckbi$(DLL_SUFFIX): libs-nss/lib/ckfw
$(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX): libs-nss/lib/softoken $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX): libs-nss/lib/softoken
$(DIST)/lib/$(DLL_PREFIX)nssdbm3$(DLL_SUFFIX): libs-nss/lib/softoken $(DIST)/lib/$(DLL_PREFIX)nssdbm3$(DLL_SUFFIX): libs-nss/lib/softoken
$(foreach lib,$(NSS_STATIC_LIBS),$(eval ../$(lib): libs-$(patsubst %/,%,$(dir $(lib))))) $(foreach lib,$(NSS_STATIC_LIBS),$(eval $(DEPTH)/security/$(lib): libs-$(patsubst %/,%,$(dir $(lib)))))
# Create fake import libraries for the folded libraries, so that linking # Create fake import libraries for the folded libraries, so that linking
# against them works both for the NSS build system (see dependencies below) # against them works both for the NSS build system (see dependencies below)
@ -468,4 +468,4 @@ endif # MOZ_FOLD_LIBS
# Work around NSS build system race condition creating certdata.c in # Work around NSS build system race condition creating certdata.c in
# security/nss/lib/ckfw/builtins. See bug #836220. # security/nss/lib/ckfw/builtins. See bug #836220.
libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,../nss/lib/ckfw/builtins) libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,$(DEPTH)/security/nss/lib/ckfw/builtins)

View File

@ -42,7 +42,7 @@ if not CONFIG['JS_STANDALONE']:
if CONFIG['COMPILE_ENVIRONMENT'] and not CONFIG['LIBXUL_SDK']: if CONFIG['COMPILE_ENVIRONMENT'] and not CONFIG['LIBXUL_SDK']:
if CONFIG['MOZ_BUILD_NSPR']: if CONFIG['MOZ_BUILD_NSPR']:
add_tier_dir('nspr', 'config/nspr', trigger='NSPR_LIBS') add_tier_dir('nspr', 'config/external/nspr', trigger='NSPR_LIBS')
if not CONFIG['JS_STANDALONE']: if not CONFIG['JS_STANDALONE']:
add_tier_dir('external', 'config/external') add_tier_dir('external', 'config/external')
@ -51,15 +51,13 @@ if CONFIG['COMPILE_ENVIRONMENT'] and not CONFIG['LIBXUL_SDK']:
# NSPR_LIBS when MOZ_FOLD_LIBS is set, because that's where NSPR # NSPR_LIBS when MOZ_FOLD_LIBS is set, because that's where NSPR
# actually ends up being linked. All places using NSS_LIBS also # actually ends up being linked. All places using NSS_LIBS also
# use NSPR_LIBS so it's safe to use the latter. # use NSPR_LIBS so it's safe to use the latter.
add_tier_dir('nss', 'security/build', add_tier_dir('nss', 'config/external/nss',
trigger='NSPR_LIBS' if CONFIG['MOZ_FOLD_LIBS'] else 'NSS_LIBS') trigger='NSPR_LIBS' if CONFIG['MOZ_FOLD_LIBS'] else 'NSS_LIBS')
if CONFIG['BUILD_CTYPES'] and not CONFIG['MOZ_NATIVE_FFI']: if CONFIG['BUILD_CTYPES'] and not CONFIG['MOZ_NATIVE_FFI']:
add_tier_dir('js', ['js/src/ctypes/libffi'], static=True, add_tier_dir('js', ['config/external/ffi'], trigger='MOZ_FFI_LIBS')
trigger='MOZ_FFI_LIBS')
if CONFIG['ENABLE_INTL_API'] and not CONFIG['MOZ_NATIVE_ICU']: if CONFIG['ENABLE_INTL_API'] and not CONFIG['MOZ_NATIVE_ICU']:
add_tier_dir('js', ['intl/icu'], static=True, trigger='MOZ_ICU_LIBS') add_tier_dir('js', ['config/external/icu'], trigger='MOZ_ICU_LIBS')
CONFIGURE_SUBST_FILES += ['intl/icu/Makefile']
add_tier_dir('js', ['js/src']) add_tier_dir('js', ['js/src'])
if not CONFIG['JS_STANDALONE']: if not CONFIG['JS_STANDALONE']:

View File

@ -27,8 +27,7 @@ if CONFIG['MOZ_DMD']:
add_tier_dir('platform', 'memory/replace/dmd') add_tier_dir('platform', 'memory/replace/dmd')
if CONFIG['MOZ_TREE_FREETYPE']: if CONFIG['MOZ_TREE_FREETYPE']:
add_tier_dir('platform', 'modules/freetype2', static=True, add_tier_dir('platform', 'config/external/freetype2', trigger='FT2_LIBS')
trigger='FT2_LIBS')
add_tier_dir('platform', 'xpcom') add_tier_dir('platform', 'xpcom')