Back out 6a386d638a1a (bug 746277) for packaged build bustage

This commit is contained in:
Phil Ringnalda 2012-06-27 08:31:38 -07:00
Родитель 0985f4e3ba
Коммит 794274aa42
12 изменённых файлов: 34 добавлений и 218 удалений

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

@ -8,8 +8,6 @@ srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
USE_RCS_MK=1
include $(topsrcdir)/config/makefiles/makeutils.mk
PREF_JS_EXPORTS = $(srcdir)/b2g.js
@ -57,9 +55,15 @@ DEFINES += \
-DMOZ_UPDATER=$(MOZ_UPDATER) \
$(NULL)
source_repo := $(call getSourceRepo,$(srcdir)/..)
ifneq (,$(filter http%,$(source_repo)))
DEFINES += -DMOZ_SOURCE_REPO="$(source_repo)"
# strip a trailing slash from the repo URL because it's not always present,
# and we want to construct a working URL in buildconfig.html
# make+shell+sed = awful
_dollar=$$
SOURCE_REPO := $(shell cd $(srcdir)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
# extra sanity check for old versions of hg
# that don't support showconfig
ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
endif
ifeq ($(OS_ARCH),WINNT)

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

@ -9,8 +9,6 @@ srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
USE_RCS_MK=1
include $(topsrcdir)/config/makefiles/makeutils.mk
MODULE = build
@ -68,9 +66,10 @@ ifdef MOZ_SOURCE_STAMP
DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
endif
source_repo := $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
ifneq (,$(source_repo))
DEFINES += -DMOZ_SOURCE_REPO="$(source_repo)"
_dollar=$$
SOURCE_REPO := $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
ifdef SOURCE_REPO
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
endif
DEFINES += \

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

@ -106,15 +106,9 @@ endif #}
###########################################################################
## Common makefile library loader
## USE_AUTOTARGETS_MK - mkdir_deps directory creation
## USE_RCS_MK - revision control functions
###########################################################################
topORerr =$(if $(topsrcdir),$(topsrcdir),$(error topsrcdir is not defined))
ifdef USE_AUTOTARGETS_MK # mkdir_deps
include $(topORerr)/config/makefiles/autotargets.mk
endif
ifdef USE_RCS_MK
include $(topORerr)/config/makefiles/rcs.mk
endif

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

@ -1,64 +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/.
#
###########################################################################
## Accessor functions:
## $(call getRcsType): .git, .hg
## $(call getSourceRepo) == http://hg.mozilla.org/mozilla-central
###########################################################################
ifdef USE_RCS_MK #{
ifndef INCLUDED_RCS_MK #{
# Determine revision control system in use: .hg, .git, etc
# Call getRcsType() at least once, $(RCS_TYPE) will be defined
#
define FUNC_rcstype =
MOZ_RCS_TYPE := $(notdir $(firstword \
$(wildcard \
$(or $(1),$(topsrcdir))/.hg\
$(or $(1),$(topsrcdir))/.git\
))
)
endef
getRcsType = $(or $(MOZ_RCS_TYPE),$(eval $(call FUNC_rcstype))$(MOZ_RCS_TYPE))
MOZ_RCS_TYPE := $(call getRcsType)
###########################################################################
# HAVE_MERCURIAL_RCS (todo: include rcs.$(MOZ_RCS_TYPE).mk git, hg)
###########################################################################
ifneq (,$(findstring .hg,$(MOZ_RCS_TYPE)))
# Intent: Retrieve the http:// repository path for a directory.
# Usage: $(call getSourceRepo[,repo_dir|args])
# Args:
# path (optional): repository to query. Defaults to $(topsrcdir)
getSourceRepo =$(call FUNC_getSourceRepo,$(if $(1),cd $(1) && hg,hg --repository $(topsrcdir)))
# http://hg.mozilla.org/mozilla-central
FUNC_getSourceRepo=\
$(patsubst %/,%,\
$(patsubst ssh://%,http://%,\
$(strip \
$(firstword $(shell $(getargv) showconfig paths.default))\
)))
endif #} HAVE_MERCURIAL_RCS
###########################################################################
# HAVE_GIT_RCS
###########################################################################
ifneq (,$(findstring .git,$(MOZ_RCS_TYPE)))
# git://github.com/mozilla/...
getSourceRepo = $(firstword $(shell $(getargv) git config --get remote.origin.url))
endif #} HAVE_GIT_RCS
INCLUDED_RCS_MK=1
endif #}
endif #}

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

@ -19,14 +19,12 @@ dir-ts = .deps/test
check-arglist = $(dir-ts)/arglist.ts
check-autotargets = $(dir-ts)/autotargets_mk.ts
check-export-targets = $(dir-ts)/export-targets-mk.ts
check-rcs-mk = $(dir-ts)/rcs-mk.ts
check-XinY = $(dir-ts)/check_XinY_mk.ts
check-xpidl = $(dir-ts)/xpidl-mk.ts
check-tests =\
$(check-arglist) \
$(check-autotargets) \
$(check-export-targets) \
$(check-rcs-mk) \
$(check-XinY) \
$(check-xpidl) \
$(NULL)
@ -126,21 +124,6 @@ $(check-export-targets): $(check-export-targets-preqs)
@$(TOUCH) $@
# </CHECK: export-targets.mk>
###########################################################################
# <CHECK: rcs.mk>
check-rcs-preqs=\
$(call mkdir_deps,$(dir-ts)) \
$(topsrcdir)/config/makefiles/rcs.mk \
$(srcdir)/check-rcs.mk \
$(NULL)
$(check-rcs-mk): $(check-rcs-preqs)
$(MAKE) --no-print-directory -f $(srcdir)/check-rcs.mk topsrcdir=$(topsrcdir)
$(TOUCH) $@
# </CHECK: rcs.mk>
###########################################################################
##{ <CHECK: xpidl.mk>
check-xpidl-preqs=\

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

@ -1,40 +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
include $(topsrcdir)/config/makefiles/makeutils.mk
USE_RCS_MK = 1
include $(topsrcdir)/config/makefiles/rcs.mk
$(call requiredfunction,getargv)
$(call requiredfunction,getRcsType)
$(call errorIfEmpty,INCLUDED_RCS_MK)
saved := $(MOZ_RCS_TYPE)
undefine MOZ_RCS_TYPE # Clear to force value gathering
type = $(call getRcsType)
ifneq ($(type),$(saved))
$(error getRcsType[$(type)] != MOZ_RCS_TYPE[$(saved)])
endif
# Limit testing to systems getSourceRepo() has been written for
ifneq (,$(MOZ_RCS_TYPE))
$(call requiredfunction,getSourceRepo)
repo := $(call getSourceRepo)
$(if $(eq $(repo),$(NULL)),$(error getSourceRepo() failed))
repo := $(call getSourceRepo,../..)
$(if $(eq $(repo),$(NULL)),$(error getSourceRepo(../..) failed))
endif
compile-time-tests:
@true

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

@ -1764,6 +1764,7 @@ default all::
#############################################################################
# Derived targets and dependencies
include $(topsrcdir)/config/makefiles/autotargets.mk
ifneq ($(NULL),$(AUTO_DEPS))
default all libs tools export:: $(AUTO_DEPS)
endif

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

@ -106,15 +106,9 @@ endif #}
###########################################################################
## Common makefile library loader
## USE_AUTOTARGETS_MK - mkdir_deps directory creation
## USE_RCS_MK - revision control functions
###########################################################################
topORerr =$(if $(topsrcdir),$(topsrcdir),$(error topsrcdir is not defined))
ifdef USE_AUTOTARGETS_MK # mkdir_deps
include $(topORerr)/config/makefiles/autotargets.mk
endif
ifdef USE_RCS_MK
include $(topORerr)/config/makefiles/rcs.mk
endif

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

@ -1,64 +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/.
#
###########################################################################
## Accessor functions:
## $(call getRcsType): .git, .hg
## $(call getSourceRepo) == http://hg.mozilla.org/mozilla-central
###########################################################################
ifdef USE_RCS_MK #{
ifndef INCLUDED_RCS_MK #{
# Determine revision control system in use: .hg, .git, etc
# Call getRcsType() at least once, $(RCS_TYPE) will be defined
#
define FUNC_rcstype =
MOZ_RCS_TYPE := $(notdir $(firstword \
$(wildcard \
$(or $(1),$(topsrcdir))/.hg\
$(or $(1),$(topsrcdir))/.git\
))
)
endef
getRcsType = $(or $(MOZ_RCS_TYPE),$(eval $(call FUNC_rcstype))$(MOZ_RCS_TYPE))
MOZ_RCS_TYPE := $(call getRcsType)
###########################################################################
# HAVE_MERCURIAL_RCS (todo: include rcs.$(MOZ_RCS_TYPE).mk git, hg)
###########################################################################
ifneq (,$(findstring .hg,$(MOZ_RCS_TYPE)))
# Intent: Retrieve the http:// repository path for a directory.
# Usage: $(call getSourceRepo[,repo_dir|args])
# Args:
# path (optional): repository to query. Defaults to $(topsrcdir)
getSourceRepo =$(call FUNC_getSourceRepo,$(if $(1),cd $(1) && hg,hg --repository $(topsrcdir)))
# http://hg.mozilla.org/mozilla-central
FUNC_getSourceRepo=\
$(patsubst %/,%,\
$(patsubst ssh://%,http://%,\
$(strip \
$(firstword $(shell $(getargv) showconfig paths.default))\
)))
endif #} HAVE_MERCURIAL_RCS
###########################################################################
# HAVE_GIT_RCS
###########################################################################
ifneq (,$(findstring .git,$(MOZ_RCS_TYPE)))
# git://github.com/mozilla/...
getSourceRepo = $(firstword $(shell $(getargv) git config --get remote.origin.url))
endif #} HAVE_GIT_RCS
INCLUDED_RCS_MK=1
endif #}
endif #}

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

@ -1764,6 +1764,7 @@ default all::
#############################################################################
# Derived targets and dependencies
include $(topsrcdir)/config/makefiles/autotargets.mk
ifneq ($(NULL),$(AUTO_DEPS))
default all libs tools export:: $(AUTO_DEPS)
endif

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

@ -9,9 +9,6 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
USE_RCS_MK=1
include $(topsrcdir)/config/makefiles/makeutils.mk
CHROME_DEPS = buildconfig.html
include $(DEPTH)/config/autoconf.mk
@ -39,9 +36,15 @@ ifeq (Android,$(OS_TARGET))
DEFINES += -DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME)
endif
source_repo := $(call getSourceRepo)
ifneq (,$(filter http%,$(source_repo)))
DEFINES += -DSOURCE_REPO="$(source_repo)"
# strip a trailing slash from the repo URL because it's not always present,
# and we want to construct a working URL in buildconfig.html
# make+shell+sed = awful
_dollar=$$
SOURCE_REPO := $(shell cd $(topsrcdir) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
# extra sanity check for old versions of hg
# that don't support showconfig
ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
DEFINES += -DSOURCE_REPO="$(SOURCE_REPO)"
endif
BUILD_HOSTNAME = $(shell hostname -s || hostname)

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

@ -11,8 +11,6 @@ srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
USE_RCS_MK=1
include $(topsrcdir)/config/makefiles/makeutils.mk
milestone_txt = $(topsrcdir)/config/milestone.txt
@ -224,13 +222,20 @@ ifdef MOZ_SOURCE_STAMP
INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP)
# strip a trailing slash from the repo URL because it's not always present,
# and we want to construct a working URL in buildconfig.html
SOURCE_REPO := $(firstword $(shell hg --repository $(topsrcdir) showconfig paths.default 2>/dev/null))
SOURCE_REPO := $(strip $(SOURCE_REPO))
SOURCE_REPO := $(patsubst ssh://%,http://%,$(SOURCE_REPO))
SOURCE_REPO := $(patsubst %/,%,$(SOURCE_REPO))
# command set should change based on revision control use.
# warn for now in case (git, bzr, ...) is in use.
source_repo := $(call getSourceRepo)
$(call warnIfEmpty,SOURCE_REPO)
# extra sanity check for old versions of hg, no showconfig support
ifneq (,$(filter http%,$(source_repo)))
INIARGS += --sourcerepo=$(source_repo)
ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
INIARGS += --sourcerepo=$(SOURCE_REPO)
endif
endif # MOZ_SOURCE_STAMP