Bug 784262 - Use generic install/copy rule in rules.mk. r=ted

This commit is contained in:
Mike Hommey 2012-08-29 08:55:57 +02:00
Родитель 50dbad64d5
Коммит 9f50415300
14 изменённых файлов: 186 добавлений и 334 удалений

Просмотреть файл

@ -20,15 +20,13 @@ VISIBILITY_FLAGS =
STDCXX_COMPAT = STDCXX_COMPAT =
ifneq (WINNT,$(HOST_OS_ARCH)) ifneq (WINNT,$(HOST_OS_ARCH))
HOST_PROGRAM = nsinstall$(HOST_BIN_SUFFIX) HOST_PROGRAM = nsinstall_real$(HOST_BIN_SUFFIX)
HOST_CSRCS = nsinstall.c pathsub.c HOST_CSRCS = nsinstall.c pathsub.c
endif endif
TARGETS = $(HOST_PROGRAM) $(SIMPLE_PROGRAMS)
ifndef CROSS_COMPILE ifndef CROSS_COMPILE
ifdef USE_ELF_DYNSTR_GC ifdef USE_ELF_DYNSTR_GC
TARGETS += elf-dynstr-gc export:: elf-dynstr-gc
# Compiling the above will create dependency files. # Compiling the above will create dependency files.
NEED_MDDEPDIR = 1 NEED_MDDEPDIR = 1
endif endif
@ -49,6 +47,26 @@ include $(topsrcdir)/config/config.mk
# Do not install util programs # Do not install util programs
NO_INSTALL=1 NO_INSTALL=1
ifneq (WINNT,$(HOST_OS_ARCH))
# Ensure nsinstall is atomically created
nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
cp $^ $@.tmp
mv $@.tmp $@
NSINSTALL_FILES := nsinstall$(HOST_BIN_SUFFIX)
NSINSTALL_DEST := $(DIST)/bin
NSINSTALL_TARGET := export
INSTALL_TARGETS += NSINSTALL
endif
HEADERS_FILES = \
$(DEPTH)/mozilla-config.h \
$(srcdir)/nsStaticComponents.h \
$(NULL)
HEADERS_DEST := $(DIST)/include
HEADERS_TARGET := export
INSTALL_TARGETS += HEADERS
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
HOST_CFLAGS += -DUNICODE -D_UNICODE HOST_CFLAGS += -DUNICODE -D_UNICODE
@ -57,17 +75,8 @@ ifeq ($(OS_CONFIG),SunOS4.1)
NSPR_CFLAGS += -I$(srcdir)/../nsprpub/pr/include/md NSPR_CFLAGS += -I$(srcdir)/../nsprpub/pr/include/md
endif endif
HEADERS = \ export::
$(DEPTH)/mozilla-config.h \
$(srcdir)/nsStaticComponents.h \
$(NULL)
export:: $(TARGETS) $(HEADERS)
$(INSTALL) $(IFLAGS1) $(HEADERS) $(DIST)/include
-$(RM) $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) -$(RM) $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES)
ifdef HOST_PROGRAM
$(INSTALL) $(HOST_PROGRAM) $(DIST)/bin
endif
# Generate a new buildid every time we "export" in config... that's only # Generate a new buildid every time we "export" in config... that's only
# supposed to be once per-build! # supposed to be once per-build!

Просмотреть файл

@ -27,7 +27,7 @@ $(PARALLEL_DIRS_export): %_export: %/Makefile
+@$(call SUBMAKE,export,$*) +@$(call SUBMAKE,export,$*)
endif endif
export:: $(SUBMAKEFILES) $(MAKE_DIRS) $(if $(XPIDLSRCS),$(IDL_DIR)) export:: $(SUBMAKEFILES) $(MAKE_DIRS)
$(LOOP_OVER_DIRS) $(LOOP_OVER_DIRS)
$(LOOP_OVER_TOOL_DIRS) $(LOOP_OVER_TOOL_DIRS)

Просмотреть файл

@ -20,13 +20,11 @@ check-arglist = $(dir-ts)/arglist.ts
check-autotargets = $(dir-ts)/autotargets_mk.ts check-autotargets = $(dir-ts)/autotargets_mk.ts
check-export-targets = $(dir-ts)/export-targets-mk.ts check-export-targets = $(dir-ts)/export-targets-mk.ts
check-XinY = $(dir-ts)/check_XinY_mk.ts check-XinY = $(dir-ts)/check_XinY_mk.ts
check-xpidl = $(dir-ts)/xpidl-mk.ts
check-tests =\ check-tests =\
$(check-arglist) \ $(check-arglist) \
$(check-autotargets) \ $(check-autotargets) \
$(check-export-targets) \ $(check-export-targets) \
$(check-XinY) \ $(check-XinY) \
$(check-xpidl) \
$(NULL) $(NULL)
@ -37,7 +35,6 @@ all::
clean: clean:
$(RM) $(check-tests) $(RM) $(check-tests)
@$(MAKE) --no-print-directory -f $(srcdir)/check-xpidl.mk clean-xpidl topsrcdir=$(topsrcdir)
########################################################################### ###########################################################################
## Logic processed at compile time so be selective about when to test ## Logic processed at compile time so be selective about when to test
@ -124,23 +121,4 @@ $(check-export-targets): $(check-export-targets-preqs)
@$(TOUCH) $@ @$(TOUCH) $@
# </CHECK: export-targets.mk> # </CHECK: export-targets.mk>
###########################################################################
##{ <CHECK: xpidl.mk>
check-xpidl-preqs=\
$(call mkdir_deps,$(dir-ts)) \
$(topsrcdir)/config/config.mk \
$(topsrcdir)/config/makefiles/makeutils.mk \
$(topsrcdir)/config/makefiles/xpidl.mk \
$(srcdir)/check-xpidl.mk \
$(NULL)
check-xpidl-args =\
"topsrcdir=$(topsrcdir)" \
"srcdir=$(srcdir)" \
$(NULL)
$(check-xpidl): $(check-xpidl-preqs)
$(MAKE) -f $(srcdir)/check-xpidl.mk check-xpidl $(check-xpidl-args)
@$(TOUCH) $@
#} </check-xpidl.mk>
endif #} findstring MAKECMDGOAL endif #} findstring MAKECMDGOAL

Просмотреть файл

@ -1,43 +0,0 @@
# -*- makefile -*-
#
# 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/.
ifdef VERBOSE
$(warning loading test)
endif
# Limit scope, we only need install_cmd= for testing
INCLUDED_AUTOCONF_MK = 1
include $(topsrcdir)/config/config.mk
USE_AUTOTARGETS_MK = 1
include $(topsrcdir)/config/makefiles/makeutils.mk
basedir = blah
DIST = $(basedir)/dist
DI = $(DIST)/include
IDL_DIR = $(basedir)/idl
INSTALL := cp
XPIDLSRCS = $(srcdir)/check-xpidl.mk
include $(topsrcdir)/config/makefiles/xpidl.mk
$(call requiredfunction,topsrcdir)
$(call requiredfunction,XPIDL_GEN_DIR)
HIDE=@
check-xpidl: xpidl-install-src xpidl-install-headers
$(HIDE)test -d $(DIST) || exit 90
$(HIDE)test -f $(DI)/check-xpidl.mk || exit 91
$(HIDE)test -f $(IDL_DIR)/check-xpidl.mk || exit 92
# Declare targets to avoid including rules.mk
$(DI) $(IDL_DIR):
mkdir -p $@
clean-xpidl:
$(RM) -r $(basedir)

Просмотреть файл

@ -1,60 +0,0 @@
# -*- makefile -*-
# vim:set ts=8 sw=8 sts=8 noet:
#
# 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/.
#
# Always declared, general use by:
# js/xpconnect/tests/idl/Makefile.in:libs
# toolkit/crashreporter/test/Makefile.in
XPIDL_GEN_DIR ?= _xpidlgen
GARBAGE_DIRS += $(XPIDL_GEN_DIR)
###########################################################################
## Conditional logic
###########################################################################
ifndef INCLUDED_XPIDL_MK #{
INCLUDED_XPIDL_MK = 1
ifneq (,$(XPIDLSRCS)) #{
ifndef NO_DIST_INSTALL #{
_xpidl-todo_ += xpidl-install-src
_xpidl-todo_ += xpidl-install-headers
endif #}
endif #} XPIDLSRCS
export:: $(_xpidl-todo_)
$(call requiredfunction,mkdir_deps)
endif #} INCLUDED_XPIDL_MK
###########################################################################
## processing targets
###########################################################################
ifdef _xpidl-todo_ #{
$(call requiredfunction,install_cmd)
## Logic batch #1
xpidl-install-src-preqs=\
$(XPIDLSRCS) \
$(call mkdir_deps,$(IDL_DIR)) \
$(NULL)
xpidl-install-src: $(xpidl-install-src-preqs)
$(call install_cmd,$(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))))
xpidl-install-headers-preqs =\
$(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) \
$(call mkdir_deps,$(DIST)/include) \
$(NULL)
xpidl-install-headers: $(xpidl-install-headers-preqs)
$(call install_cmd,$(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))))
endif #} _xpidl-todo_

Просмотреть файл

@ -26,10 +26,12 @@ USE_AUTOTARGETS_MK = 1
include $(topsrcdir)/config/makefiles/makeutils.mk include $(topsrcdir)/config/makefiles/makeutils.mk
ifdef SDK_XPIDLSRCS ifdef SDK_XPIDLSRCS
XPIDLSRCS += $(SDK_XPIDLSRCS) _EXTRA_XPIDLSRCS := $(filter-out $(XPIDLSRCS),$(SDK_XPIDLSRCS))
XPIDLSRCS += $(_EXTRA_XPIDLSRCS)
endif endif
ifdef SDK_HEADERS ifdef SDK_HEADERS
EXPORTS += $(SDK_HEADERS) _EXTRA_EXPORTS := $(filter-out $(EXPORTS),$(SDK_HEADERS))
EXPORTS += $(_EXTRA_EXPORTS)
endif endif
REPORT_BUILD = $(info $(notdir $<)) REPORT_BUILD = $(info $(notdir $<))
@ -1159,15 +1161,19 @@ endif
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
ifneq (,$(EXPORTS)) ifneq (,$(EXPORTS))
export:: $(EXPORTS) EXPORTS_FILES := $(EXPORTS)
$(call install_cmd,$(IFLAGS1) $^ $(DIST)/include) EXPORTS_DEST := $(DIST)/include
EXPORTS_TARGET := export
INSTALL_TARGETS += EXPORTS
endif endif
endif # NO_DIST_INSTALL endif # NO_DIST_INSTALL
define EXPORT_NAMESPACE_RULE define EXPORT_NAMESPACE_RULE
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
export:: $(EXPORTS_$(namespace)) EXPORTS_$(namespace)_FILES := $$(EXPORTS_$(namespace))
$(call install_cmd,$(IFLAGS1) $$^ $(DIST)/include/$(namespace)) EXPORTS_$(namespace)_DEST := $$(DIST)/include/$(namespace)
EXPORTS_$(namespace)_TARGET := export
INSTALL_TARGETS += EXPORTS_$(namespace)
endif # NO_DIST_INSTALL endif # NO_DIST_INSTALL
endef endef
@ -1203,14 +1209,12 @@ endif
# Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig # Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
ifneq ($(AUTOCFG_JS_EXPORTS),) ifneq ($(AUTOCFG_JS_EXPORTS),)
$(FINAL_TARGET)/defaults/autoconfig::
$(NSINSTALL) -D $@
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
export:: $(AUTOCFG_JS_EXPORTS) $(FINAL_TARGET)/defaults/autoconfig AUTOCFG_JS_EXPORTS_FILES := $(AUTOCFG_JS_EXPORTS)
$(call install_cmd,$(IFLAGS1) $^) AUTOCFG_JS_EXPORTS_DEST := $(FINAL_TARGET)/defaults/autoconfig
AUTOCFG_JS_EXPORTS_TARGET := export
INSTALL_TARGETS += AUTOCFG_JS_EXPORTS
endif endif
endif endif
################################################################################ ################################################################################
@ -1271,9 +1275,11 @@ $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(
$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS)) $(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS))
endif # XPIDL_MODULE.xpt != XPIDLSRCS endif # XPIDL_MODULE.xpt != XPIDLSRCS
libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(FINAL_TARGET)/components) XPIDL_MODULE_FILES := $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
XPIDL_MODULE_DEST := $(FINAL_TARGET)/components
INSTALL_TARGETS += XPIDL_MODULE
ifndef NO_INTERFACES_MANIFEST ifndef NO_INTERFACES_MANIFEST
libs:: $(call mkdir_deps,$(FINAL_TARGET)/components) libs:: $(call mkdir_deps,$(FINAL_TARGET)/components)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt" @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt"
@ -1283,26 +1289,22 @@ endif
GARBAGE_DIRS += $(XPIDL_GEN_DIR) GARBAGE_DIRS += $(XPIDL_GEN_DIR)
ifndef NO_DIST_INSTALL
XPIDL_HEADERS_FILES := $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
XPIDL_HEADERS_DEST := $(DIST)/include
XPIDL_HEADERS_TARGET := export
INSTALL_TARGETS += XPIDL_HEADERS
XPIDLSRCS_FILES := $(XPIDLSRCS)
XPIDLSRCS_DEST := $(IDL_DIR)
XPIDLSRCS_TARGET := export-idl
INSTALL_TARGETS += XPIDLSRCS
export:: export-idl
endif
endif #} XPIDLSRCS endif #} XPIDLSRCS
ifndef INCLUDED_XPIDL_MK
include $(topsrcdir)/config/makefiles/xpidl.mk
endif
# General rules for exporting idl files.
$(IDL_DIR):
$(NSINSTALL) -D $@
export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS) export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS)
ifneq ($(XPIDLSRCS),)
ifndef NO_DIST_INSTALL
export-idl:: $(XPIDLSRCS) $(IDL_DIR)
$(call install_cmd,$(IFLAGS1) $^)
endif
endif
$(LOOP_OVER_PARALLEL_DIRS) $(LOOP_OVER_PARALLEL_DIRS)
$(LOOP_OVER_DIRS) $(LOOP_OVER_DIRS)
$(LOOP_OVER_TOOL_DIRS) $(LOOP_OVER_TOOL_DIRS)
@ -1320,7 +1322,9 @@ endif
ifdef EXTRA_COMPONENTS ifdef EXTRA_COMPONENTS
libs:: $(EXTRA_COMPONENTS) libs:: $(EXTRA_COMPONENTS)
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS1) $^ $(FINAL_TARGET)/components) EXTRA_COMPONENTS_FILES := $(EXTRA_COMPONENTS)
EXTRA_COMPONENTS_DEST := $(FINAL_TARGET)/components
INSTALL_TARGETS += EXTRA_COMPONENTS
endif endif
endif endif
@ -1344,11 +1348,11 @@ endif
JS_MODULES_PATH ?= $(FINAL_TARGET)/modules JS_MODULES_PATH ?= $(FINAL_TARGET)/modules
ifdef EXTRA_JS_MODULES ifdef EXTRA_JS_MODULES
libs:: $(EXTRA_JS_MODULES)
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS1) $^ $(JS_MODULES_PATH)) EXTRA_JS_MODULES_FILES := $(EXTRA_JS_MODULES)
EXTRA_JS_MODULES_DEST := $(JS_MODULES_PATH)
INSTALL_TARGETS += EXTRA_JS_MODULES
endif endif
endif endif
ifdef EXTRA_PP_JS_MODULES ifdef EXTRA_PP_JS_MODULES
@ -1370,9 +1374,10 @@ testmodulesdir = $(DEPTH)/_tests/modules/$(TESTING_JS_MODULE_DIR)
GENERATED_DIRS += $(testmodulesdir) GENERATED_DIRS += $(testmodulesdir)
libs:: $(TESTING_JS_MODULES)
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS) $^ $(testmodulesdir)) TESTING_JS_MODULES_FILES := $(TESTING_JS_MODULES)
TESTING_JS_MODULES_DEST := $(testmodulesdir)
INSTALL_TARGETS += TESTING_JS_MODULES
endif endif
endif endif
@ -1381,25 +1386,19 @@ endif
# SDK # SDK
ifneq (,$(SDK_LIBRARY)) ifneq (,$(SDK_LIBRARY))
$(SDK_LIB_DIR)::
$(NSINSTALL) -D $@
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
libs:: $(SDK_LIBRARY) $(SDK_LIB_DIR) SDK_LIBRARY_FILES := $(SDK_LIBRARY)
$(call install_cmd,$(IFLAGS2) $^) SDK_LIBRARY_DEST := $(SDK_LIB_DIR)
INSTALL_TARGETS += SDK_LIBRARY
endif endif
endif # SDK_LIBRARY endif # SDK_LIBRARY
ifneq (,$(strip $(SDK_BINARY))) ifneq (,$(strip $(SDK_BINARY)))
$(SDK_BIN_DIR)::
$(NSINSTALL) -D $@
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
libs:: $(SDK_BINARY) $(SDK_BIN_DIR) SDK_BINARY_FILES := $(SDK_BINARY)
$(call install_cmd,$(IFLAGS2) $^) SDK_BINARY_DEST := $(SDK_BIN_DIR)
INSTALL_TARGETS += SDK_BINARY
endif endif
endif # SDK_BINARY endif # SDK_BINARY
################################################################################ ################################################################################
@ -1535,25 +1534,39 @@ endif
# Install/copy rules # Install/copy rules
# #
# The INSTALL_TARGETS variable contains a list of all install target # The INSTALL_TARGETS variable contains a list of all install target
# categories. Each category defines a list of files, an install destination, # categories. Each category defines a list of files and executables, and an
# and whether the files are executables or not. # install destination,
# #
# FOO_FILES := foo bar # FOO_FILES := foo bar
# FOO_EXECUTABLES := baz # FOO_EXECUTABLES := baz
# FOO_DEST := target_path # FOO_DEST := target_path
# INSTALL_TARGETS += FOO # INSTALL_TARGETS += FOO
#
# Additionally, a FOO_TARGET variable may be added to indicate the target for
# which the files and executables are installed. Default is "libs".
# If we're using binary nsinstall and it's not built yet, fallback to python nsinstall.
ifneq (,$(filter $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX),$(install_cmd)))
nsinstall_is_usable = $(if $(wildcard $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX)),$(eval nsinstall_is_usable := yes)yes)
define install_cmd_override
$(1): install_cmd = $$(if $$(nsinstall_is_usable),$$(INSTALL),$$(NSINSTALL_PY)) $$(1)
endef
endif
define install_file_template define install_file_template
libs:: $(2)/$(notdir $(1)) $(or $(3),libs):: $(2)/$(notdir $(1))
$(call install_cmd_override,$(2)/$(notdir $(1)))
$(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2)) $(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2))
$(INSTALL) $(3) $$< $${@D} $$(call install_cmd,$(4) $$< $${@D})
endef endef
$(foreach category,$(INSTALL_TARGETS),\ $(foreach category,$(INSTALL_TARGETS),\
$(if $($(category)_DEST),,$(error Missing $(category)_DEST))\ $(if $($(category)_DEST),,$(error Missing $(category)_DEST))\
$(foreach file,$($(category)_FILES),\ $(foreach file,$($(category)_FILES),\
$(eval $(call install_file_template,$(file),$($(category)_DEST),$(IFLAGS1)))\ $(eval $(call install_file_template,$(file),$($(category)_DEST),$($(category)_TARGET),$(IFLAGS1)))\
)\ )\
$(foreach file,$($(category)_EXECUTABLES),\ $(foreach file,$($(category)_EXECUTABLES),\
$(eval $(call install_file_template,$(file),$($(category)_DEST),$(IFLAGS2)))\ $(eval $(call install_file_template,$(file),$($(category)_DEST),$($(category)_TARGET),$(IFLAGS2)))\
)\ )\
) )
@ -1567,19 +1580,22 @@ $(foreach category,$(INSTALL_TARGETS),\
# FOO_PATH := target_path # FOO_PATH := target_path
# FOO_FLAGS := -Dsome_flag # FOO_FLAGS := -Dsome_flag
# PP_TARGETS += FOO # PP_TARGETS += FOO
#
# Additionally, a FOO_TARGET variable may be added to indicate the target for
# which the files and executables are installed. Default is "libs".
# preprocess_file_template defines preprocessing rules. # preprocess_file_template defines preprocessing rules.
# $(call preprocess_file_template, source_file, target_path, extra_flags) # $(call preprocess_file_template, source_file, target_path, extra_flags)
define preprocess_file_template define preprocess_file_template
$(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2)) $$(GLOBAL_DEPS) $(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2)) $$(GLOBAL_DEPS)
$$(RM) $$@ $$(RM) $$@
$$(PYTHON) $$(topsrcdir)/config/Preprocessor.py $(3) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) $$< > $$@ $$(PYTHON) $$(topsrcdir)/config/Preprocessor.py $(4) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) $$< > $$@
libs:: $(2)/$(notdir $(1)) $(or $(3),libs):: $(2)/$(notdir $(1))
endef endef
$(foreach category,$(PP_TARGETS),\ $(foreach category,$(PP_TARGETS),\
$(foreach file,$($(category)),\ $(foreach file,$($(category)),\
$(eval $(call preprocess_file_template,$(file),$($(category)_PATH),$($(category)_FLAGS)))\ $(eval $(call preprocess_file_template,$(file),$($(category)_PATH),$($(category)_TARGET),$($(category)_FLAGS)))\
)\ )\
) )

Просмотреть файл

@ -41,16 +41,10 @@ EXPORTS_mozilla/plugins = \
PluginScriptableObjectParent.h \ PluginScriptableObjectParent.h \
PluginScriptableObjectUtils.h \ PluginScriptableObjectUtils.h \
PluginScriptableObjectUtils-inl.h \ PluginScriptableObjectUtils-inl.h \
PluginInstanceChild.h \
PluginInstanceParent.h \
PluginUtilsOSX.h \ PluginUtilsOSX.h \
AStream.h \ AStream.h \
BrowserStreamChild.h \
BrowserStreamParent.h \
PluginStreamChild.h \ PluginStreamChild.h \
PluginStreamParent.h \ PluginStreamParent.h \
PluginMessageUtils.h \
PluginProcessParent.h \
PluginProcessChild.h \ PluginProcessChild.h \
StreamNotifyChild.h \ StreamNotifyChild.h \
StreamNotifyParent.h \ StreamNotifyParent.h \

Просмотреть файл

@ -34,7 +34,6 @@ EXPORTS_mozilla/ipc = \
RPCChannel.h \ RPCChannel.h \
SharedMemory.h \ SharedMemory.h \
SharedMemoryBasic.h \ SharedMemoryBasic.h \
SharedMemoryBasic_chromium.h \
SharedMemorySysV.h \ SharedMemorySysV.h \
Shmem.h \ Shmem.h \
SyncChannel.h \ SyncChannel.h \

Просмотреть файл

@ -15,12 +15,10 @@ include $(DEPTH)/config/autoconf.mk
VISIBILITY_FLAGS = VISIBILITY_FLAGS =
ifneq (WINNT,$(HOST_OS_ARCH)) ifneq (WINNT,$(HOST_OS_ARCH))
HOST_PROGRAM = nsinstall$(HOST_BIN_SUFFIX) HOST_PROGRAM = nsinstall_real$(HOST_BIN_SUFFIX)
HOST_CSRCS = nsinstall.c pathsub.c HOST_CSRCS = nsinstall.c pathsub.c
endif endif
TARGETS = $(HOST_PROGRAM) $(SIMPLE_PROGRAMS)
# IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
# a recursive rule for finding nsinstall and the Perl scripts. # a recursive rule for finding nsinstall and the Perl scripts.
ifdef NSBUILDROOT ifdef NSBUILDROOT
@ -41,15 +39,22 @@ ifneq (,$(JS_SHARED_LIBRARY)$(MOZ_NATIVE_ZLIB))
DEFINES += -DMOZ_NATIVE_ZLIB=1 DEFINES += -DMOZ_NATIVE_ZLIB=1
endif endif
ifneq (WINNT,$(HOST_OS_ARCH))
# Ensure nsinstall is atomically created
nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
cp $^ $@.tmp
mv $@.tmp $@
NSINSTALL_FILES := nsinstall$(HOST_BIN_SUFFIX)
NSINSTALL_DEST := $(DIST)/bin
NSINSTALL_TARGET := export
INSTALL_TARGETS += NSINSTALL
endif
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
HOST_CFLAGS += -DUNICODE -D_UNICODE HOST_CFLAGS += -DUNICODE -D_UNICODE
export:: $(TARGETS)
ifdef HOST_PROGRAM
$(INSTALL) $(HOST_PROGRAM) $(DIST)/bin
endif
ifdef WRAP_SYSTEM_INCLUDES ifdef WRAP_SYSTEM_INCLUDES
export:: \ export:: \
$(call mkdir_deps,system_wrappers_js) \ $(call mkdir_deps,system_wrappers_js) \

Просмотреть файл

@ -27,7 +27,7 @@ $(PARALLEL_DIRS_export): %_export: %/Makefile
+@$(call SUBMAKE,export,$*) +@$(call SUBMAKE,export,$*)
endif endif
export:: $(SUBMAKEFILES) $(MAKE_DIRS) $(if $(XPIDLSRCS),$(IDL_DIR)) export:: $(SUBMAKEFILES) $(MAKE_DIRS)
$(LOOP_OVER_DIRS) $(LOOP_OVER_DIRS)
$(LOOP_OVER_TOOL_DIRS) $(LOOP_OVER_TOOL_DIRS)

Просмотреть файл

@ -1,60 +0,0 @@
# -*- makefile -*-
# vim:set ts=8 sw=8 sts=8 noet:
#
# 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/.
#
# Always declared, general use by:
# js/xpconnect/tests/idl/Makefile.in:libs
# toolkit/crashreporter/test/Makefile.in
XPIDL_GEN_DIR ?= _xpidlgen
GARBAGE_DIRS += $(XPIDL_GEN_DIR)
###########################################################################
## Conditional logic
###########################################################################
ifndef INCLUDED_XPIDL_MK #{
INCLUDED_XPIDL_MK = 1
ifneq (,$(XPIDLSRCS)) #{
ifndef NO_DIST_INSTALL #{
_xpidl-todo_ += xpidl-install-src
_xpidl-todo_ += xpidl-install-headers
endif #}
endif #} XPIDLSRCS
export:: $(_xpidl-todo_)
$(call requiredfunction,mkdir_deps)
endif #} INCLUDED_XPIDL_MK
###########################################################################
## processing targets
###########################################################################
ifdef _xpidl-todo_ #{
$(call requiredfunction,install_cmd)
## Logic batch #1
xpidl-install-src-preqs=\
$(XPIDLSRCS) \
$(call mkdir_deps,$(IDL_DIR)) \
$(NULL)
xpidl-install-src: $(xpidl-install-src-preqs)
$(call install_cmd,$(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))))
xpidl-install-headers-preqs =\
$(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) \
$(call mkdir_deps,$(DIST)/include) \
$(NULL)
xpidl-install-headers: $(xpidl-install-headers-preqs)
$(call install_cmd,$(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))))
endif #} _xpidl-todo_

Просмотреть файл

@ -26,10 +26,12 @@ USE_AUTOTARGETS_MK = 1
include $(topsrcdir)/config/makefiles/makeutils.mk include $(topsrcdir)/config/makefiles/makeutils.mk
ifdef SDK_XPIDLSRCS ifdef SDK_XPIDLSRCS
XPIDLSRCS += $(SDK_XPIDLSRCS) _EXTRA_XPIDLSRCS := $(filter-out $(XPIDLSRCS),$(SDK_XPIDLSRCS))
XPIDLSRCS += $(_EXTRA_XPIDLSRCS)
endif endif
ifdef SDK_HEADERS ifdef SDK_HEADERS
EXPORTS += $(SDK_HEADERS) _EXTRA_EXPORTS := $(filter-out $(EXPORTS),$(SDK_HEADERS))
EXPORTS += $(_EXTRA_EXPORTS)
endif endif
REPORT_BUILD = $(info $(notdir $<)) REPORT_BUILD = $(info $(notdir $<))
@ -1159,15 +1161,19 @@ endif
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
ifneq (,$(EXPORTS)) ifneq (,$(EXPORTS))
export:: $(EXPORTS) EXPORTS_FILES := $(EXPORTS)
$(call install_cmd,$(IFLAGS1) $^ $(DIST)/include) EXPORTS_DEST := $(DIST)/include
EXPORTS_TARGET := export
INSTALL_TARGETS += EXPORTS
endif endif
endif # NO_DIST_INSTALL endif # NO_DIST_INSTALL
define EXPORT_NAMESPACE_RULE define EXPORT_NAMESPACE_RULE
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
export:: $(EXPORTS_$(namespace)) EXPORTS_$(namespace)_FILES := $$(EXPORTS_$(namespace))
$(call install_cmd,$(IFLAGS1) $$^ $(DIST)/include/$(namespace)) EXPORTS_$(namespace)_DEST := $$(DIST)/include/$(namespace)
EXPORTS_$(namespace)_TARGET := export
INSTALL_TARGETS += EXPORTS_$(namespace)
endif # NO_DIST_INSTALL endif # NO_DIST_INSTALL
endef endef
@ -1203,14 +1209,12 @@ endif
# Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig # Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
ifneq ($(AUTOCFG_JS_EXPORTS),) ifneq ($(AUTOCFG_JS_EXPORTS),)
$(FINAL_TARGET)/defaults/autoconfig::
$(NSINSTALL) -D $@
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
export:: $(AUTOCFG_JS_EXPORTS) $(FINAL_TARGET)/defaults/autoconfig AUTOCFG_JS_EXPORTS_FILES := $(AUTOCFG_JS_EXPORTS)
$(call install_cmd,$(IFLAGS1) $^) AUTOCFG_JS_EXPORTS_DEST := $(FINAL_TARGET)/defaults/autoconfig
AUTOCFG_JS_EXPORTS_TARGET := export
INSTALL_TARGETS += AUTOCFG_JS_EXPORTS
endif endif
endif endif
################################################################################ ################################################################################
@ -1271,9 +1275,11 @@ $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(
$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS)) $(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS))
endif # XPIDL_MODULE.xpt != XPIDLSRCS endif # XPIDL_MODULE.xpt != XPIDLSRCS
libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(FINAL_TARGET)/components) XPIDL_MODULE_FILES := $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
XPIDL_MODULE_DEST := $(FINAL_TARGET)/components
INSTALL_TARGETS += XPIDL_MODULE
ifndef NO_INTERFACES_MANIFEST ifndef NO_INTERFACES_MANIFEST
libs:: $(call mkdir_deps,$(FINAL_TARGET)/components) libs:: $(call mkdir_deps,$(FINAL_TARGET)/components)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt" @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt"
@ -1283,26 +1289,22 @@ endif
GARBAGE_DIRS += $(XPIDL_GEN_DIR) GARBAGE_DIRS += $(XPIDL_GEN_DIR)
ifndef NO_DIST_INSTALL
XPIDL_HEADERS_FILES := $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
XPIDL_HEADERS_DEST := $(DIST)/include
XPIDL_HEADERS_TARGET := export
INSTALL_TARGETS += XPIDL_HEADERS
XPIDLSRCS_FILES := $(XPIDLSRCS)
XPIDLSRCS_DEST := $(IDL_DIR)
XPIDLSRCS_TARGET := export-idl
INSTALL_TARGETS += XPIDLSRCS
export:: export-idl
endif
endif #} XPIDLSRCS endif #} XPIDLSRCS
ifndef INCLUDED_XPIDL_MK
include $(topsrcdir)/config/makefiles/xpidl.mk
endif
# General rules for exporting idl files.
$(IDL_DIR):
$(NSINSTALL) -D $@
export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS) export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS)
ifneq ($(XPIDLSRCS),)
ifndef NO_DIST_INSTALL
export-idl:: $(XPIDLSRCS) $(IDL_DIR)
$(call install_cmd,$(IFLAGS1) $^)
endif
endif
$(LOOP_OVER_PARALLEL_DIRS) $(LOOP_OVER_PARALLEL_DIRS)
$(LOOP_OVER_DIRS) $(LOOP_OVER_DIRS)
$(LOOP_OVER_TOOL_DIRS) $(LOOP_OVER_TOOL_DIRS)
@ -1320,7 +1322,9 @@ endif
ifdef EXTRA_COMPONENTS ifdef EXTRA_COMPONENTS
libs:: $(EXTRA_COMPONENTS) libs:: $(EXTRA_COMPONENTS)
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS1) $^ $(FINAL_TARGET)/components) EXTRA_COMPONENTS_FILES := $(EXTRA_COMPONENTS)
EXTRA_COMPONENTS_DEST := $(FINAL_TARGET)/components
INSTALL_TARGETS += EXTRA_COMPONENTS
endif endif
endif endif
@ -1344,11 +1348,11 @@ endif
JS_MODULES_PATH ?= $(FINAL_TARGET)/modules JS_MODULES_PATH ?= $(FINAL_TARGET)/modules
ifdef EXTRA_JS_MODULES ifdef EXTRA_JS_MODULES
libs:: $(EXTRA_JS_MODULES)
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS1) $^ $(JS_MODULES_PATH)) EXTRA_JS_MODULES_FILES := $(EXTRA_JS_MODULES)
EXTRA_JS_MODULES_DEST := $(JS_MODULES_PATH)
INSTALL_TARGETS += EXTRA_JS_MODULES
endif endif
endif endif
ifdef EXTRA_PP_JS_MODULES ifdef EXTRA_PP_JS_MODULES
@ -1370,9 +1374,10 @@ testmodulesdir = $(DEPTH)/_tests/modules/$(TESTING_JS_MODULE_DIR)
GENERATED_DIRS += $(testmodulesdir) GENERATED_DIRS += $(testmodulesdir)
libs:: $(TESTING_JS_MODULES)
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
$(call install_cmd,$(IFLAGS) $^ $(testmodulesdir)) TESTING_JS_MODULES_FILES := $(TESTING_JS_MODULES)
TESTING_JS_MODULES_DEST := $(testmodulesdir)
INSTALL_TARGETS += TESTING_JS_MODULES
endif endif
endif endif
@ -1381,25 +1386,19 @@ endif
# SDK # SDK
ifneq (,$(SDK_LIBRARY)) ifneq (,$(SDK_LIBRARY))
$(SDK_LIB_DIR)::
$(NSINSTALL) -D $@
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
libs:: $(SDK_LIBRARY) $(SDK_LIB_DIR) SDK_LIBRARY_FILES := $(SDK_LIBRARY)
$(call install_cmd,$(IFLAGS2) $^) SDK_LIBRARY_DEST := $(SDK_LIB_DIR)
INSTALL_TARGETS += SDK_LIBRARY
endif endif
endif # SDK_LIBRARY endif # SDK_LIBRARY
ifneq (,$(strip $(SDK_BINARY))) ifneq (,$(strip $(SDK_BINARY)))
$(SDK_BIN_DIR)::
$(NSINSTALL) -D $@
ifndef NO_DIST_INSTALL ifndef NO_DIST_INSTALL
libs:: $(SDK_BINARY) $(SDK_BIN_DIR) SDK_BINARY_FILES := $(SDK_BINARY)
$(call install_cmd,$(IFLAGS2) $^) SDK_BINARY_DEST := $(SDK_BIN_DIR)
INSTALL_TARGETS += SDK_BINARY
endif endif
endif # SDK_BINARY endif # SDK_BINARY
################################################################################ ################################################################################
@ -1535,25 +1534,39 @@ endif
# Install/copy rules # Install/copy rules
# #
# The INSTALL_TARGETS variable contains a list of all install target # The INSTALL_TARGETS variable contains a list of all install target
# categories. Each category defines a list of files, an install destination, # categories. Each category defines a list of files and executables, and an
# and whether the files are executables or not. # install destination,
# #
# FOO_FILES := foo bar # FOO_FILES := foo bar
# FOO_EXECUTABLES := baz # FOO_EXECUTABLES := baz
# FOO_DEST := target_path # FOO_DEST := target_path
# INSTALL_TARGETS += FOO # INSTALL_TARGETS += FOO
#
# Additionally, a FOO_TARGET variable may be added to indicate the target for
# which the files and executables are installed. Default is "libs".
# If we're using binary nsinstall and it's not built yet, fallback to python nsinstall.
ifneq (,$(filter $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX),$(install_cmd)))
nsinstall_is_usable = $(if $(wildcard $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX)),$(eval nsinstall_is_usable := yes)yes)
define install_cmd_override
$(1): install_cmd = $$(if $$(nsinstall_is_usable),$$(INSTALL),$$(NSINSTALL_PY)) $$(1)
endef
endif
define install_file_template define install_file_template
libs:: $(2)/$(notdir $(1)) $(or $(3),libs):: $(2)/$(notdir $(1))
$(call install_cmd_override,$(2)/$(notdir $(1)))
$(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2)) $(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2))
$(INSTALL) $(3) $$< $${@D} $$(call install_cmd,$(4) $$< $${@D})
endef endef
$(foreach category,$(INSTALL_TARGETS),\ $(foreach category,$(INSTALL_TARGETS),\
$(if $($(category)_DEST),,$(error Missing $(category)_DEST))\ $(if $($(category)_DEST),,$(error Missing $(category)_DEST))\
$(foreach file,$($(category)_FILES),\ $(foreach file,$($(category)_FILES),\
$(eval $(call install_file_template,$(file),$($(category)_DEST),$(IFLAGS1)))\ $(eval $(call install_file_template,$(file),$($(category)_DEST),$($(category)_TARGET),$(IFLAGS1)))\
)\ )\
$(foreach file,$($(category)_EXECUTABLES),\ $(foreach file,$($(category)_EXECUTABLES),\
$(eval $(call install_file_template,$(file),$($(category)_DEST),$(IFLAGS2)))\ $(eval $(call install_file_template,$(file),$($(category)_DEST),$($(category)_TARGET),$(IFLAGS2)))\
)\ )\
) )
@ -1567,19 +1580,22 @@ $(foreach category,$(INSTALL_TARGETS),\
# FOO_PATH := target_path # FOO_PATH := target_path
# FOO_FLAGS := -Dsome_flag # FOO_FLAGS := -Dsome_flag
# PP_TARGETS += FOO # PP_TARGETS += FOO
#
# Additionally, a FOO_TARGET variable may be added to indicate the target for
# which the files and executables are installed. Default is "libs".
# preprocess_file_template defines preprocessing rules. # preprocess_file_template defines preprocessing rules.
# $(call preprocess_file_template, source_file, target_path, extra_flags) # $(call preprocess_file_template, source_file, target_path, extra_flags)
define preprocess_file_template define preprocess_file_template
$(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2)) $$(GLOBAL_DEPS) $(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2)) $$(GLOBAL_DEPS)
$$(RM) $$@ $$(RM) $$@
$$(PYTHON) $$(topsrcdir)/config/Preprocessor.py $(3) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) $$< > $$@ $$(PYTHON) $$(topsrcdir)/config/Preprocessor.py $(4) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) $$< > $$@
libs:: $(2)/$(notdir $(1)) $(or $(3),libs):: $(2)/$(notdir $(1))
endef endef
$(foreach category,$(PP_TARGETS),\ $(foreach category,$(PP_TARGETS),\
$(foreach file,$($(category)),\ $(foreach file,$($(category)),\
$(eval $(call preprocess_file_template,$(file),$($(category)_PATH),$($(category)_FLAGS)))\ $(eval $(call preprocess_file_template,$(file),$($(category)_PATH),$($(category)_TARGET),$($(category)_FLAGS)))\
)\ )\
) )

Просмотреть файл

@ -21,7 +21,6 @@ EXPORTS = \
$(NULL) $(NULL)
XPIDLSRCS= nsIBoxObject.idl \ XPIDLSRCS= nsIBoxObject.idl \
nsIScrollBoxObject.idl \
nsIScrollBoxObject.idl \ nsIScrollBoxObject.idl \
nsIPopupBoxObject.idl \ nsIPopupBoxObject.idl \
nsIMenuBoxObject.idl \ nsIMenuBoxObject.idl \

Просмотреть файл

@ -135,7 +135,6 @@ XPIDLSRCS += nsIPrintSettingsWin.idl \
nsITaskbarPreviewController.idl \ nsITaskbarPreviewController.idl \
nsITaskbarPreviewButton.idl \ nsITaskbarPreviewButton.idl \
nsITaskbarProgress.idl \ nsITaskbarProgress.idl \
nsITaskbarPreviewButton.idl \
nsITaskbarOverlayIconController.idl \ nsITaskbarOverlayIconController.idl \
nsIJumpListBuilder.idl \ nsIJumpListBuilder.idl \
nsIJumpListItem.idl \ nsIJumpListItem.idl \