mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
[nlbuild-autotools] update to 1.6.5 (#3429)
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
1.5.2
|
||||
1.6.5
|
||||
|
||||
+63
@@ -1,3 +1,66 @@
|
||||
1.6.5 (2018-11-19)
|
||||
|
||||
* Addressed an issue in which the failure to make the 'repos-warning'
|
||||
target order-only caused dependent repo paths to be repeatedly
|
||||
and unnecessarily remade which, in turn, caused git operations
|
||||
and the configuration or build to fail.
|
||||
|
||||
1.6.4 (2018-11-14)
|
||||
|
||||
* Added support for pulling down remote package dependencies using
|
||||
git clone (default) or git submodule depending on the setting of
|
||||
pull.method in repos.conf.
|
||||
|
||||
1.6.3 (2018-10-19)
|
||||
|
||||
* Added support for coverage-local and check-local targets. Added
|
||||
documentation for all coverage-related targets.
|
||||
|
||||
1.6.2 (2018-10-09)
|
||||
|
||||
* Take a different approach to version flapping against 'make
|
||||
distcheck' by leaving VERSION_FILE as an immediate (:=) variable
|
||||
and instead creating a two-level <PACKAGE>_VERSION variable, the
|
||||
first of which is set from VERSION_FILE by default at make
|
||||
recursion level zero (0).
|
||||
|
||||
1.6.1 (2018-09-26)
|
||||
|
||||
* Address an issue with VERSION_FILE on clean source code control
|
||||
clones or unarchived distribution in which 'make dist' or
|
||||
'make distcheck' fail. VERSION_FILE should be and is
|
||||
intentionally a deferred (=) rather than an immediate (:=)
|
||||
variable to ensure late evaluation AFTER .local-version MAY
|
||||
be created rather than when the makefile containing it is
|
||||
parsed.
|
||||
|
||||
1.6.0 (2018-09-19)
|
||||
|
||||
* Added support to repos.conf for a 'commit' key such that a
|
||||
hash or tag other than HEAD for a given repository and
|
||||
branch may be synchronized and checked out.
|
||||
|
||||
* Made a minor change to the 'bootstrap' script such that it emits
|
||||
the actual action commands that will be executed when the verbose
|
||||
flag is asserted.
|
||||
|
||||
1.5.3 (2018-09-14)
|
||||
|
||||
* Address a number of issues with building the prepackaged GNU
|
||||
autotools subset included in nlbuild-autotools for Ubuntu
|
||||
Bionic.
|
||||
|
||||
- Fixed "Unescaped left brace in regex is deprecated" that
|
||||
was formerly a warning in Perl 5.22 and is now a hard error
|
||||
in Perl 5.26.
|
||||
|
||||
- Address new glibc glob interface changes by upgrading from
|
||||
make-3.82 to make-4.1 and applying relevant Ubuntu Bionic
|
||||
patches.
|
||||
|
||||
* Add support to the package 'build' script to find and apply
|
||||
patches for the above.
|
||||
|
||||
1.5.2 (2018-04-26)
|
||||
|
||||
* Since the '--name-only' option only appears in git-2.6 and later
|
||||
|
||||
+18
-2
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright 2017 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright (c) 2017-2018 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright (c) 2018 Google LLC. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -67,9 +68,24 @@ DISTFILES := $(shell $(CAT) MANIFEST)
|
||||
# .dist-version second, and the .default-version last.
|
||||
#
|
||||
|
||||
# VERSION_FILE should be and is intentionally an immediate (:=) rather
|
||||
# than a deferred (=) variable to ensure the value binds once and only once
|
||||
# for a given MAKELEVEL even as .local-version and .dist-version are created
|
||||
# during makefile execution.
|
||||
|
||||
VERSION_FILE := $(if $(wildcard $(builddir)/.local-version),$(builddir)/.local-version,$(if $(wildcard $(srcdir)/.dist-version),$(srcdir)/.dist-version,$(srcdir)/.default-version))
|
||||
|
||||
PACKAGE_VERSION ?= $(shell $(CAT) $(VERSION_FILE) 2> /dev/null)
|
||||
#
|
||||
# The two-level variables and the check against MAKELEVEL ensures that
|
||||
# not only can the package version be overridden from the command line
|
||||
# but also when the version is NOT overridden that we bind the version
|
||||
# once and only once across potential sub-makes to prevent the version
|
||||
# from flapping as VERSION_FILE changes.
|
||||
#
|
||||
|
||||
export MAYBE_PACKAGE_VERSION := $(if $(filter 0,$(MAKELEVEL)),$(shell cat $(VERSION_FILE) 2> /dev/null),$(MAYBE_PACKAGE_VERSION))
|
||||
|
||||
PACKAGE_VERSION ?= $(MAYBE_PACKAGE_VERSION)
|
||||
|
||||
VERSION = $(PACKAGE_VERSION)
|
||||
|
||||
|
||||
+17
-8
@@ -130,8 +130,8 @@ these dependencies into your own package.
|
||||
|
||||
nlbuild-autotools supports this by providing a means to pull down
|
||||
external git package repositories that your package depends on using
|
||||
git submodules when you use and support --with-<package>=internal as a
|
||||
location for your dependent packages.
|
||||
either git clone (default) or git submodules when you use and support
|
||||
--with-<package>=internal as a location for your dependent packages.
|
||||
|
||||
The example 'Makefile-bootstrap' has been provided as infrastructure to
|
||||
make this easy for you as a package maintainer and for your package
|
||||
@@ -202,9 +202,11 @@ depends.
|
||||
|
||||
In addition to the 'repos' target, the bootstrap makefile also
|
||||
supports the 'clean-repos' target that undoes the work of the 'repos'
|
||||
target. It will clean-up all of the synchronized repositories, all the
|
||||
while being careful to ensure it does not disturb existing git or git
|
||||
submodule state your project might be using.
|
||||
target. When using either the 'clone' or 'submodule' pull methods, it
|
||||
will clean-up all of the synchronized repositories. When using the
|
||||
'submodule' pull method, it also is careful to ensure it does not
|
||||
disturb existing git or git submodule state your project might be
|
||||
using.
|
||||
|
||||
The infrastructure all works, of course, whether you are working in or
|
||||
out of git and whether you have colocated or non-colocated source and
|
||||
@@ -219,9 +221,16 @@ to pull down, the location of their git server, the branch you want to
|
||||
pull, and the location in your project in which you want to place
|
||||
them.
|
||||
|
||||
The format of 'repos.conf' precisely follows that used by git
|
||||
submodules. More information is available in 'Makefile-bootstrap' or
|
||||
with `man gitmodules` or `git help gitmodules`.
|
||||
The format of 'repos.conf' _almost_ precisely follows that used by git
|
||||
submodules with two notable additions, the 'pull' section and the
|
||||
'commit' key. The 'pull' section allows you to optionally specify the
|
||||
'method' key as 'clone' or 'submodule' (defaulting to 'clone' when the
|
||||
key is not present). This selects whether 'git clone' or 'git
|
||||
submodule' is used to pull down repositories. The 'commit' key allows
|
||||
you to specify not only what branch to checkout but, more precisely,
|
||||
what commit or tag to checkout rather than just _HEAD_ of a
|
||||
branch. More information is available in 'Makefile-bootstrap' or with
|
||||
`man gitmodules` or `git help gitmodules`.
|
||||
|
||||
# FAQ {#FAQ}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#
|
||||
# Copyright 2018 Google LLC. All Rights Reserved.
|
||||
# Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -26,9 +27,40 @@
|
||||
# invocations. The 'check-am' and '$(BUILT_SOURCES)' are the key
|
||||
# automake-specific dependencies to ensure that happens.
|
||||
#
|
||||
# This defines the following make targets:
|
||||
#
|
||||
# coverage:
|
||||
# Execute local and recursive coverage targets across the
|
||||
# project sub-tree at the current invocation point.
|
||||
#
|
||||
# This target is intended to be user-visibile and -invoked.
|
||||
#
|
||||
# coverage-local:
|
||||
# Execute local coverage targets at the current invocation point.
|
||||
#
|
||||
# This target is intended to be user-visibile and -invoked.
|
||||
#
|
||||
# coverage-recursive:
|
||||
# Recursively execute the 'coverage' target across the
|
||||
# project sub-tree at the current invocation point.
|
||||
#
|
||||
# This target is NOT intended to be user-visibile and -invoked.
|
||||
#
|
||||
# check-local:
|
||||
# Alias for the 'check-am' target. Execute local check
|
||||
# targets at the current invocation point. Local coverage targets
|
||||
# may depend on this to ensure local tests are made before
|
||||
# coverage targets are made.
|
||||
#
|
||||
# This target is intended to be user-visibile and -invoked.
|
||||
#
|
||||
|
||||
.PHONY: coverage coverage-recursive coverage-local check-local
|
||||
|
||||
check-local: check-am
|
||||
|
||||
coverage: coverage-local
|
||||
|
||||
.PHONY: coverage coverage-recursive
|
||||
|
||||
coverage: coverage-recursive
|
||||
|
||||
coverage: check-am
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
# path = third_party/nlunit-test/repo
|
||||
# url = git@github.com:nestlabs/nlunit-test.git
|
||||
# branch = master
|
||||
# commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f
|
||||
# update = none
|
||||
#
|
||||
|
||||
|
||||
@@ -90,10 +90,10 @@ if @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE_REPORTS
|
||||
$(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE):
|
||||
$(call create-directory)
|
||||
|
||||
$(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO): check | $(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE)
|
||||
$(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO): check-local | $(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE)
|
||||
$(call generate-coverage-report,${top_builddir})
|
||||
|
||||
coverage: $(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO)
|
||||
coverage-local: $(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO)
|
||||
|
||||
clean-local: clean-local-coverage
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright 2016-2018 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright (c) 2016-2018 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright (c) 2018 Google LLC. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -69,6 +70,11 @@ DISTCLEANFILES = \
|
||||
# .dist-version second, and the .default-version last.
|
||||
#
|
||||
|
||||
# VERSION_FILE should be and is intentionally an immediate (:=) rather
|
||||
# than a deferred (=) variable to ensure the value binds once and only once
|
||||
# for a given MAKELEVEL even as .local-version and .dist-version are created
|
||||
# during makefile execution.
|
||||
|
||||
VERSION_FILE := $(if $(wildcard $(builddir)/.local-version),$(builddir)/.local-version,$(if $(wildcard $(srcdir)/.dist-version),$(srcdir)/.dist-version,$(srcdir)/.default-version))
|
||||
|
||||
#
|
||||
@@ -77,8 +83,16 @@ VERSION_FILE := $(if $(wildcard $(builddir)/.local-version)
|
||||
# version is always the current version, not the package bootstrap
|
||||
# version.
|
||||
#
|
||||
# The two-level variables and the check against MAKELEVEL ensures that
|
||||
# not only can the package version be overridden from the command line
|
||||
# but also when the version is NOT overridden that we bind the version
|
||||
# once and only once across potential sub-makes to prevent the version
|
||||
# from flapping as VERSION_FILE changes.
|
||||
#
|
||||
|
||||
@PACKAGE_SHORT_UPPER@_VERSION ?= $(shell cat $(VERSION_FILE) 2> /dev/null)
|
||||
export MAYBE_@PACKAGE_SHORT_UPPER@_VERSION := $(if $(filter 0,$(MAKELEVEL)),$(shell cat $(VERSION_FILE) 2> /dev/null),$(MAYBE_@PACKAGE_SHORT_UPPER@_VERSION))
|
||||
|
||||
@PACKAGE_SHORT_UPPER@_VERSION ?= $(MAYBE_@PACKAGE_SHORT_UPPER@_VERSION)
|
||||
|
||||
PACKAGE_VERSION = $(@PACKAGE_SHORT_UPPER@_VERSION)
|
||||
VERSION = $(PACKAGE_VERSION)
|
||||
@@ -150,7 +164,7 @@ $(distdir)/.dist-version $(builddir)/.local-version:
|
||||
# #
|
||||
# DISTCHECK_CONFIGURE_FLAGS=`chmod u+w .. ../third_party`
|
||||
|
||||
dist distcheck: $(BUILT_SOURCES)
|
||||
dist distcheck distdir install-headers: $(BUILT_SOURCES)
|
||||
|
||||
dist-hook: $(distdir)/.dist-version
|
||||
|
||||
|
||||
+15
-1
@@ -1,7 +1,7 @@
|
||||
# You can synchronize a remote package on which yours depends with git
|
||||
# to 'third_party' (or another directory).
|
||||
#
|
||||
# Here is an example using nlunit-test. Uncomment and adapter or
|
||||
# Here is an example using nlunit-test. Uncomment and adapt or
|
||||
# delete this, as needed. If you do not have any packages to
|
||||
# sychronize, then this file is unneeded and may be deleted from your
|
||||
# project.
|
||||
@@ -9,9 +9,23 @@
|
||||
# If you choose to use this, please also take a look at configure.ac,
|
||||
# Makefile.am, and third_party/Makefile.am and uncomment the appropriate
|
||||
# sections there.
|
||||
#
|
||||
# The 'pull' section is optional. The 'pull' section allows you to
|
||||
# optionally specify the 'method' key as 'clone' or 'submodule'
|
||||
# (defaulting to 'clone' when the key is not present). This selects
|
||||
# whether 'git clone' or 'git submodule' is used to pull down
|
||||
# repositories.
|
||||
#
|
||||
# While the 'branch' key is required, the 'commit' key is
|
||||
# optional. The 'commit' key allows you to specify a particular commit
|
||||
# hash or tag if you do not want HEAD of the specified branch.
|
||||
|
||||
# [pull]
|
||||
# method = clone
|
||||
#
|
||||
# [submodule "nlunit-test"]
|
||||
# path = third_party/nlunit-test/repo
|
||||
# url = https://github.com/nestlabs/nlunit-test.git
|
||||
# branch = master
|
||||
# commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f
|
||||
# update = none
|
||||
|
||||
+71
-33
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright 2018 Google LLC. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,31 +18,52 @@
|
||||
#
|
||||
# Description:
|
||||
# This file is a make "footer" or post make header that defines make
|
||||
# convenience targets and templates for interacting with and managing git
|
||||
# submodules in the context of managing project dependencies.
|
||||
# convenience targets and templates for interacting with and managing
|
||||
# "foreign" (e.g., those outside of this project) git projects in the
|
||||
# context of managing project dependencies.
|
||||
#
|
||||
|
||||
ifneq ($(REPOS),)
|
||||
# Stem for git clones and submodules
|
||||
|
||||
__REPOS_GIT_STEM := /.git
|
||||
|
||||
# Stem for the git configuration file for a git repository.
|
||||
|
||||
__REPOS_GIT_CONFIG_STEM := /.git/config
|
||||
__REPOS_GIT_CONFIG_STEM := $(__REPOS_GIT_STEM)/config
|
||||
|
||||
# Stem for the git cache directory for a git submodule
|
||||
|
||||
__REPOS_GIT_MODULE_CACHE_STEM := /.git/modules
|
||||
__REPOS_GIT_MODULE_CACHE_STEM := $(__REPOS_GIT_STEM)/modules
|
||||
|
||||
# git submodule configuration file and path
|
||||
|
||||
__REPOS_GIT_MODULES_FILE := .gitmodules
|
||||
__REPOS_GIT_MODULES_PATH := $(top_srcdir)/$(__REPOS_GIT_MODULES_FILE)
|
||||
|
||||
# Stem for the git configuration file for a git submodule.
|
||||
# Stem for the git configuration file for a git clone or submodule.
|
||||
|
||||
__REPOS_GIT_SUBMODULE_STEM := /.git
|
||||
__REPOS_GIT_CLONE_STEM := $(__REPOS_GIT_STEM)
|
||||
__REPOS_GIT_SUBMODULE_STEM := $(__REPOS_GIT_STEM)
|
||||
|
||||
# Git "pull" method to use for retrieving repositories on which this
|
||||
# package may depend.
|
||||
#
|
||||
# This defaults to 'clone' if no configuration value is present.
|
||||
|
||||
__REPOS_MAYBE_PULL_METHOD := $(call nlGitGetMethodForPullFromFile,$(REPOS_CONFIG))
|
||||
__REPOS_DEFAULT_PULL_METHOD := clone
|
||||
REPOS_PULL_METHOD := $(if $(__REPOS_MAYBE_PULL_METHOD),$(__REPOS_MAYBE_PULL_METHOD),$(__REPOS_DEFAULT_PULL_METHOD))
|
||||
|
||||
# Git repository configuration for this package, if it exists.
|
||||
#
|
||||
# This value is only relevant when the pull method is 'submodule'.
|
||||
|
||||
ifeq ($(REPOS_PULL_METHOD),submodule)
|
||||
REPOS_PACKAGE_GIT_PATH := $(top_srcdir)$(__REPOS_GIT_CONFIG_STEM)
|
||||
else
|
||||
REPOS_PACKAGE_GIT_PATH :=
|
||||
endif
|
||||
|
||||
# Sentinel Files
|
||||
|
||||
@@ -52,21 +74,22 @@ REPOS_WARNING_SENTINEL := $(top_builddir)/.repos-warning-stamp
|
||||
#
|
||||
# REPOS_template <repo file> <repo name>
|
||||
#
|
||||
# This template defines variables and targets used for inlining optional and required
|
||||
# third-party packages as package-internal copies.
|
||||
# This template defines variables and targets used for inlining optional and
|
||||
# required third-party packages as package-internal copies.
|
||||
#
|
||||
# <repo file> - Path to the repo configuration file from which to get values for
|
||||
# named repo.
|
||||
# <repo name> - Name of the repository in <repo file> for which to get values for
|
||||
# branch, local path, and URL.
|
||||
# <repo file> - Path to the repo configuration file from which to get
|
||||
# values for named repo.
|
||||
# <repo name> - Name of the repository in <repo file> for which to get
|
||||
# values for branch, local path, and URL.
|
||||
#
|
||||
define REPOS_template
|
||||
$(2)_repo_NAME := $(2)
|
||||
$(2)_repo_BRANCH := $$(call nlGitGetBranchForRepoFromNameFromFile,$(1),$(2))
|
||||
$(2)_repo_COMMIT := $$(call nlGitGetCommitForRepoFromNameFromFile,$(1),$(2))
|
||||
$(2)_repo_PATH := $$(call nlGitGetPathForRepoFromNameFromFile,$(1),$(2))
|
||||
$(2)_repo_URL := $$(call nlGitGetURLForRepoFromNameFromFile,$(1),$(2))
|
||||
|
||||
$(2)_repo_GIT := $$(addsuffix $(__REPOS_GIT_SUBMODULE_STEM),$$($(2)_repo_PATH))
|
||||
$(2)_repo_GIT := $$(addsuffix $(__REPOS_GIT_STEM),$$($(2)_repo_PATH))
|
||||
$(2)_repo_CACHE := $(top_srcdir)$(__REPOS_GIT_MODULE_CACHE_STEM)/$$($(2)_repo_PATH)
|
||||
|
||||
REPO_NAMES += $$($(2)_repo_NAME)
|
||||
@@ -78,14 +101,22 @@ REPO_CACHES += $$($(2)_repo_CACHE)
|
||||
# Allow a repo to be made with a path target (e.g., third_party/foo/repo) or
|
||||
# with its actual git target (e.g., third_party/foo/repo/.git).
|
||||
|
||||
$$($(2)_repo_PATH): $$($(2)_repo_GIT)
|
||||
$$($(2)_repo_PATH): | $$($(2)_repo_GIT)
|
||||
|
||||
$$($(2)_repo_GIT): $(REPOS_PACKAGE_GIT_PATH) repos-warning
|
||||
@echo " SUBMODULE $$(subst $(__REPOS_GIT_SUBMODULE_STEM),,$$(@))"
|
||||
$(NL_V_AT)if ! test -f $(__REPOS_GIT_MODULES_PATH); then \
|
||||
touch $(REPOS_GIT_MODULES_SENTINEL); \
|
||||
$$($(2)_repo_GIT): $(REPOS_PACKAGE_GIT_PATH) | repos-warning
|
||||
$(NL_V_AT)case "$(REPOS_PULL_METHOD)" in \
|
||||
submodule) echo " SUBMODULE $$(subst $(__REPOS_GIT_SUBMODULE_STEM),,$$(@))"; \
|
||||
if ! test -f $(__REPOS_GIT_MODULES_PATH); then \
|
||||
touch $(REPOS_GIT_MODULES_SENTINEL); \
|
||||
fi; \
|
||||
$(GIT) -C $(top_srcdir) submodule -q add -f -b $$($(2)_repo_BRANCH) -- $$($(2)_repo_URL) $$($(2)_repo_PATH);; \
|
||||
clone) echo " CLONE $$(subst $(__REPOS_GIT_CLONE_STEM),,$$(@))"; \
|
||||
$(GIT) -C $(top_srcdir) clone -q -b $$($(2)_repo_BRANCH) -- $$($(2)_repo_URL) $$($(2)_repo_PATH);; \
|
||||
*) echo "$(REPOS_CONFIG): Unknown or unsupported pull method '$(REPOS_PULL_METHOD)'.";; \
|
||||
esac
|
||||
$(NL_V_AT)if ! test -z "$$($(2)_repo_COMMIT)"; then \
|
||||
$(GIT) -C $$($(2)_repo_PATH) checkout -q $$($(2)_repo_COMMIT); \
|
||||
fi
|
||||
$(NL_V_AT)$(GIT) -C $(top_srcdir) submodule -q add -f -b $$($(2)_repo_BRANCH) -- $$($(2)_repo_URL) $$($(2)_repo_PATH)
|
||||
endef # REPOS_template
|
||||
|
||||
$(REPOS_PACKAGE_GIT_PATH):
|
||||
@@ -128,20 +159,27 @@ clean-repos-hook:
|
||||
.PHONY: clean-repos-local
|
||||
clean-repos-local: clean-repos-hook
|
||||
@echo " CLEAN"
|
||||
$(NL_V_AT)$(GIT) -C $(top_srcdir) submodule -q deinit -f -- $(REPO_PATHS) 2> /dev/null || true
|
||||
$(NL_V_AT)if test -f $(REPOS_GIT_MODULES_SENTINEL); then \
|
||||
$(RM) $(REPOS_GIT_MODULES_SENTINEL); \
|
||||
$(GIT) -C $(top_srcdir) rm -f -q $(__REPOS_GIT_MODULES_PATH) 2> /dev/null; \
|
||||
fi
|
||||
$(NL_V_AT)if test -f $(REPOS_GIT_INIT_SENTINEL); then \
|
||||
$(RM) -r $(dir $(REPOS_PACKAGE_GIT_PATH)); \
|
||||
$(RM) $(REPOS_GIT_INIT_SENTINEL); \
|
||||
fi
|
||||
$(NL_V_AT)$(RM) $(REPOS_WARNING_SENTINEL)
|
||||
$(NL_V_AT)$(GIT) -C $(top_srcdir) rm -rf -q --cached $(REPO_PATHS) 2> /dev/null || true
|
||||
$(NL_V_AT)$(RM) -r $(addprefix $(top_srcdir)/,$(REPO_PATHS))
|
||||
$(NL_V_AT)$(RMDIR) -p $(addprefix $(top_srcdir),$(dir $(REPO_PATHS))) 2> /dev/null || true
|
||||
$(NL_V_AT)$(RM) -r $(REPO_CACHES) 2> /dev/null
|
||||
$(NL_V_AT)case "$(REPOS_PULL_METHOD)" in \
|
||||
submodule) $(GIT) -C $(top_srcdir) submodule -q deinit -f -- $(REPO_PATHS) 2> /dev/null || true; \
|
||||
if test -f $(REPOS_GIT_MODULES_SENTINEL); then \
|
||||
$(RM) $(REPOS_GIT_MODULES_SENTINEL); \
|
||||
$(GIT) -C $(top_srcdir) rm -f -q $(__REPOS_GIT_MODULES_PATH) 2> /dev/null; \
|
||||
fi ; \
|
||||
if test -f $(REPOS_GIT_INIT_SENTINEL); then \
|
||||
$(RM) -r $(dir $(REPOS_PACKAGE_GIT_PATH)); \
|
||||
$(RM) $(REPOS_GIT_INIT_SENTINEL); \
|
||||
fi; \
|
||||
$(RM) $(REPOS_WARNING_SENTINEL); \
|
||||
$(GIT) -C $(top_srcdir) rm -rf -q --cached $(REPO_PATHS) 2> /dev/null || true; \
|
||||
$(RM) -r $(addprefix $(top_srcdir)/,$(REPO_PATHS)); \
|
||||
$(RMDIR) -p $(addprefix $(top_srcdir),$(dir $(REPO_PATHS))) 2> /dev/null || true; \
|
||||
$(RM) -r $(REPO_CACHES) 2> /dev/null;; \
|
||||
clone) $(GIT) -C $(top_srcdir) rm -rf -q --cached $(REPO_PATHS) 2> /dev/null || true; \
|
||||
$(RM) $(REPOS_WARNING_SENTINEL); \
|
||||
$(RM) -r $(addprefix $(top_srcdir)/,$(REPO_PATHS)); \
|
||||
$(RMDIR) -p $(addprefix $(top_srcdir),$(dir $(REPO_PATHS))) 2> /dev/null || true;; \
|
||||
*) echo "$(REPOS_CONFIG): Unknown or unsupported pull method '$(REPOS_PULL_METHOD)'.";; \
|
||||
esac
|
||||
|
||||
.PHONY: clean-repos
|
||||
clean-repos: clean-repos-local
|
||||
|
||||
+17
-3
@@ -1,4 +1,5 @@
|
||||
#
|
||||
# Copyright 2018 Google LLC. All Rights Reserved.
|
||||
# Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -52,18 +53,31 @@ nlGitGetValueForRepoFromNameFromFile = $(shell $(call nlGitGetConfigFromFileCom
|
||||
|
||||
# nlGitGetBranchForRepoFromNameFromFile <file> <repo name>
|
||||
#
|
||||
# Get a the remote branch for a repo / submodule variable set in specified git config file <file>.
|
||||
# Get the remote branch for a repo / submodule variable set in specified git config file <file>.
|
||||
|
||||
nlGitGetBranchForRepoFromNameFromFile = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),branch)
|
||||
|
||||
# nlGitGetCommitForRepoFromNameFromFile <file> <repo name>
|
||||
#
|
||||
# Get the commit for a repo / submodule variable set in specified git config file <file>.
|
||||
|
||||
nlGitGetCommitForRepoFromNameFromFile = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),commit)
|
||||
|
||||
# nlGitGetURLForRepoFromNameFromFile <file> <repo name>
|
||||
#
|
||||
# Get a the remote URL for a repo / submodule variable set in specified git config file <file>.
|
||||
# Get the remote URL for a repo / submodule variable set in specified git config file <file>.
|
||||
|
||||
nlGitGetURLForRepoFromNameFromFile = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),url)
|
||||
|
||||
# nlGitGetPathForRepoFromNameFromFile <file> <repo name>
|
||||
#
|
||||
# Get a the local path for a repo / submodule variable set in specified git config file <file>.
|
||||
# Get the local path for a repo / submodule variable set in specified git config file <file>.
|
||||
|
||||
nlGitGetPathForRepoFromNameFromFile = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),path)
|
||||
|
||||
# nlGitGetMethodForPullFromFile <file>
|
||||
#
|
||||
# Get the pull method set in specified git config file <file>.
|
||||
|
||||
nlGitGetMethodForPullFromFile = $(shell $(call nlGitGetConfigFromFileCommand,$(1)) 'pull.method')
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#
|
||||
# Copyright 2018 Google LLC. All Rights Reserved.
|
||||
# Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -16,9 +17,10 @@
|
||||
|
||||
#
|
||||
# Description:
|
||||
# This file is a make "header" or pre make header that defines make
|
||||
# convenience macros for interacting with and managing git submodules
|
||||
# in the context of managing project dependencies.
|
||||
# This file is a make "header" or pre make header that defines
|
||||
# make convenience macros for interacting with and managing "foreign"
|
||||
# (e.g., those outside of this project) git projects in the context of
|
||||
# managing project dependencies.
|
||||
#
|
||||
|
||||
# Third-party package repository configuration, if it exists, listing all
|
||||
|
||||
@@ -277,6 +277,10 @@ esac
|
||||
|
||||
# Bootstrap the package.
|
||||
|
||||
if [ -n "${verbose}" ]; then
|
||||
echo "${local_action} && ${tool_action} && ${header_action} && ${make_action} && ${config_action}"
|
||||
fi
|
||||
|
||||
${local_action} && ${tool_action} && ${header_action} && ${make_action} && ${config_action}
|
||||
|
||||
# Clean up any temporary files created.
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
2016-04-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
automake: port to Perl 5.22 and later
|
||||
|
||||
Without this change, Perl 5.22 complains "Unescaped left brace in
|
||||
regex is deprecated" and this is planned to become a hard error in
|
||||
Perl 5.26. See:
|
||||
http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
|
||||
* bin/automake.in (substitute_ac_subst_variables): Escape left brace.
|
||||
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
diff -aruN a/bin/automake.in b/bin/automake.in
|
||||
--- a/bin/automake.in 2013-11-02 17:48:13.000000000 -0700
|
||||
+++ b/bin/automake.in 2018-09-14 10:21:04.000000000 -0700
|
||||
@@ -3872,7 +3872,7 @@
|
||||
sub substitute_ac_subst_variables
|
||||
{
|
||||
my ($text) = @_;
|
||||
- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
|
||||
+ $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
|
||||
return $text;
|
||||
}
|
||||
|
||||
+75
-9
@@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2014-2017 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright 2014-2018 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright 2018 Google LLC. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -264,26 +265,84 @@ fetch_package() {
|
||||
# script.
|
||||
#
|
||||
removetmp() {
|
||||
rm -f "${LIBTOOLIZE}"
|
||||
if [ -O "${LIBTOOLIZE}" ]; then
|
||||
rm -f "${LIBTOOLIZE}"
|
||||
fi
|
||||
if [ -n "${AUTOM4TE_CFG}" ]; then
|
||||
rm -f "${AUTOM4TE_CFG}"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# build_package <package> <version> <host> <archivedir> <builddir> <destdir>
|
||||
# patch_directory <directory> <patch arguments> <patch file> [ ... ]
|
||||
#
|
||||
# Patch the specified directory by applying the provided patched files
|
||||
# using the specified patch arguments. The specified patch files may
|
||||
# be uncompressed or compressed with any of bz2, gz, xz, compress, or
|
||||
# zip.
|
||||
#
|
||||
patch_directory() {
|
||||
local directory="${1}"
|
||||
local patchargs="${2}"
|
||||
|
||||
shift 2
|
||||
|
||||
verbose " PATCH ${directory}"
|
||||
|
||||
for patch in "${*}"; do
|
||||
verbose " PATCH ${patch}"
|
||||
|
||||
extension=`echo "${patch}" | awk -F . '{if (NF > 1) {print $$NF}}'`;
|
||||
|
||||
case "${extension}" in
|
||||
|
||||
bz2)
|
||||
uncompressor="bunzip2 -c"
|
||||
;;
|
||||
|
||||
gz)
|
||||
uncompressor="gunzip -c"
|
||||
;;
|
||||
|
||||
xz)
|
||||
uncompressor="xz -d -c"
|
||||
;;
|
||||
|
||||
Z)
|
||||
uncompressor="uncompress -c"
|
||||
;;
|
||||
|
||||
zip)
|
||||
uncompressor="unzip -p"
|
||||
;;
|
||||
|
||||
*)
|
||||
uncompressor="cat"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
${uncompressor} "${patch}" | patch ${patchargs} -d "${directory}" || exit 1;
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# build_package <package> <version> <host> <patchdir> <archivedir> <builddir> <destdir>
|
||||
#
|
||||
# Build the specified package version for <host> in <builddir> from
|
||||
# the archive found in <archivedir> and install it into the specified
|
||||
# destination directory, <destdir>.
|
||||
# the archive found in <archivedir>, after applying the patches in
|
||||
# <patchdir> (if any), and install it into the specified destination
|
||||
# directory, <destdir>.
|
||||
#
|
||||
build_package() {
|
||||
local package="${1}"
|
||||
local version="${2}"
|
||||
local host="${3}"
|
||||
local archivedir="${4}"
|
||||
local builddir="${5}"
|
||||
local destdir="${6}"
|
||||
local patchdir="${4}"
|
||||
local archivedir="${5}"
|
||||
local builddir="${6}"
|
||||
local destdir="${7}"
|
||||
local fqpackage="${package}-${version}"
|
||||
local curdir=`pwd`
|
||||
local archive
|
||||
@@ -302,6 +361,12 @@ build_package() {
|
||||
tar --directory "${archivedir}" -xf "${archive}" || exit ${?}
|
||||
fi
|
||||
|
||||
# If necessary, patch the expanded package.
|
||||
|
||||
if [ -d "${patchdir}" ]; then
|
||||
patch_directory "${archivedir}/${fqpackage}" "-s -p1" ${patchdir}/*.patch*
|
||||
fi
|
||||
|
||||
# If possible, attempt to be self-sufficient, relying on GNU autotools
|
||||
# executables installed along with the SDK itself.
|
||||
|
||||
@@ -481,6 +546,7 @@ banner "Building GNU autotools for ${ARCH}..."
|
||||
for package in ${PACKAGES}; do
|
||||
url="`cat ${SRCDIR}/${package}/${package}.url`"
|
||||
version="`cat ${SRCDIR}/${package}/${package}.version`"
|
||||
patchdir="${SRCDIR}/${package}/${package}.patches"
|
||||
|
||||
# Fetch, if necessary, the package from the canonical source location.
|
||||
|
||||
@@ -494,7 +560,7 @@ for package in ${PACKAGES}; do
|
||||
|
||||
mkdir -p "${BUILDDIR}/build/${ARCH}/${package}-${version}" || exit ${?}
|
||||
|
||||
build_package "${package}" "${version}" "${ARCH}" "${BUILDDIR}" "${BUILDDIR}/build/${ARCH}/${package}-${version}" "${DESTDIR}"
|
||||
build_package "${package}" "${version}" "${ARCH}" "${patchdir}" "${BUILDDIR}" "${BUILDDIR}/build/${ARCH}/${package}-${version}" "${DESTDIR}"
|
||||
done
|
||||
|
||||
trailer
|
||||
|
||||
+442
@@ -0,0 +1,442 @@
|
||||
--- make-dfsg-4.1.orig/ar.c
|
||||
+++ make-dfsg-4.1/ar.c
|
||||
@@ -68,25 +68,39 @@
|
||||
|
||||
/* This function is called by 'ar_scan' to find which member to look at. */
|
||||
|
||||
+struct member_date_lookup
|
||||
+{
|
||||
+ const char *name;
|
||||
+ time_t *member_date;
|
||||
+};
|
||||
+
|
||||
/* ARGSUSED */
|
||||
static long int
|
||||
ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
|
||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||
long int size UNUSED, long int date,
|
||||
int uid UNUSED, int gid UNUSED, int mode UNUSED,
|
||||
- const void *name)
|
||||
+ const void *data)
|
||||
{
|
||||
- return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||
+ const struct member_date_lookup *lookup_data = data;
|
||||
+ if (ar_name_equal (lookup_data->name, mem, truncated))
|
||||
+ {
|
||||
+ *lookup_data->member_date = date;
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
-/* Return the modtime of NAME. */
|
||||
+/* Read the modtime of NAME in MEMBER_DATE.
|
||||
+ Returns 1 if NAME exists, 0 otherwise. */
|
||||
|
||||
-time_t
|
||||
-ar_member_date (const char *name)
|
||||
+int
|
||||
+ar_member_date (const char *name, time_t *member_date)
|
||||
{
|
||||
char *arname;
|
||||
char *memname;
|
||||
- long int val;
|
||||
+ int found;
|
||||
+ struct member_date_lookup lookup_data;
|
||||
|
||||
ar_parse_name (name, &arname, &memname);
|
||||
|
||||
@@ -107,11 +121,14 @@
|
||||
(void) f_mtime (arfile, 0);
|
||||
}
|
||||
|
||||
- val = ar_scan (arname, ar_member_date_1, memname);
|
||||
+ lookup_data.name = memname;
|
||||
+ lookup_data.member_date = member_date;
|
||||
+ found = ar_scan (arname, ar_member_date_1, &lookup_data);
|
||||
|
||||
free (arname);
|
||||
|
||||
- return (val <= 0 ? (time_t) -1 : (time_t) val);
|
||||
+ /* return 0 (not found) if the archive does not exist or has invalid format. */
|
||||
+ return (found == 1) ? 1 : 0;
|
||||
}
|
||||
|
||||
/* Set the archive-member NAME's modtime to now. */
|
||||
--- make-dfsg-4.1.orig/commands.c
|
||||
+++ make-dfsg-4.1/commands.c
|
||||
@@ -622,7 +622,10 @@
|
||||
time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
|
||||
? (time_t) -1
|
||||
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
||||
- if (ar_member_date (file->name) != file_date)
|
||||
+ time_t member_date = NONEXISTENT_MTIME;
|
||||
+ int found;
|
||||
+ found = ar_member_date (file->name, &member_date);
|
||||
+ if (found && member_date != file_date)
|
||||
{
|
||||
if (on_behalf_of)
|
||||
OSS (error, NILF,
|
||||
--- make-dfsg-4.1.orig/configure
|
||||
+++ make-dfsg-4.1/configure
|
||||
@@ -11060,10 +11061,9 @@
|
||||
#include <glob.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
-#define GLOB_INTERFACE_VERSION 1
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
||||
+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
|
||||
gnu glob
|
||||
# endif
|
||||
#endif],
|
||||
--- make-dfsg-4.1.orig/dir.c
|
||||
+++ make-dfsg-4.1/dir.c
|
||||
@@ -748,8 +748,11 @@
|
||||
const char *slash;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
- if (ar_name (name))
|
||||
- return ar_member_date (name) != (time_t) -1;
|
||||
+ {
|
||||
+ time_t member_date;
|
||||
+ if (ar_name (name))
|
||||
+ return ar_member_date (name, &member_date);
|
||||
+ }
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
@@ -1212,15 +1215,40 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+/* Similarly for lstat. */
|
||||
+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
|
||||
+# ifndef VMS
|
||||
+# ifndef HAVE_SYS_STAT_H
|
||||
+int lstat (const char *path, struct stat *sbuf);
|
||||
+# endif
|
||||
+# else
|
||||
+ /* We are done with the fake lstat. Go back to the real lstat */
|
||||
+# ifdef lstat
|
||||
+# undef lstat
|
||||
+# endif
|
||||
+# endif
|
||||
+# define local_lstat lstat
|
||||
+#elif defined(WINDOWS32)
|
||||
+/* Windows doesn't support lstat(). */
|
||||
+# define local_lstat local_stat
|
||||
+#else
|
||||
+static int
|
||||
+local_lstat (const char *path, struct stat *buf)
|
||||
+{
|
||||
+ int e;
|
||||
+ EINTRLOOP (e, lstat (path, buf));
|
||||
+ return e;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
void
|
||||
dir_setup_glob (glob_t *gl)
|
||||
{
|
||||
gl->gl_opendir = open_dirstream;
|
||||
gl->gl_readdir = read_dirstream;
|
||||
gl->gl_closedir = free;
|
||||
+ gl->gl_lstat = local_lstat;
|
||||
gl->gl_stat = local_stat;
|
||||
- /* We don't bother setting gl_lstat, since glob never calls it.
|
||||
- The slot is only there for compatibility with 4.4 BSD. */
|
||||
}
|
||||
|
||||
void
|
||||
--- make-dfsg-4.1.orig/job.c
|
||||
+++ make-dfsg-4.1/job.c
|
||||
@@ -27,6 +27,14 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
+#if defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H)
|
||||
+#include <sys/user.h>
|
||||
+#include <linux/binfmts.h>
|
||||
+#endif
|
||||
+#ifndef PAGE_SIZE
|
||||
+# define PAGE_SIZE (sysconf(_SC_PAGESIZE))
|
||||
+#endif
|
||||
+
|
||||
/* Default shell to use. */
|
||||
#ifdef WINDOWS32
|
||||
#include <windows.h>
|
||||
@@ -824,8 +832,6 @@
|
||||
break;
|
||||
}
|
||||
|
||||
- child_failed = exit_sig != 0 || exit_code != 0;
|
||||
-
|
||||
/* Search for a child matching the deceased one. */
|
||||
lastc = 0;
|
||||
for (c = children; c != 0; lastc = c, c = c->next)
|
||||
@@ -837,6 +843,15 @@
|
||||
Ignore it; it was inherited from our invoker. */
|
||||
continue;
|
||||
|
||||
+ /* Determine the failure status: 0 for success, 1 for updating target in
|
||||
+ question mode, 2 for anything else. */
|
||||
+ if (exit_sig == 0 && exit_code == 0)
|
||||
+ child_failed = MAKE_SUCCESS;
|
||||
+ else if (exit_sig == 0 && exit_code == 1 && question_flag && c->recursive)
|
||||
+ child_failed = MAKE_TROUBLE;
|
||||
+ else
|
||||
+ child_failed = MAKE_FAILURE;
|
||||
+
|
||||
DB (DB_JOBS, (child_failed
|
||||
? _("Reaping losing child %p PID %s %s\n")
|
||||
: _("Reaping winning child %p PID %s %s\n"),
|
||||
@@ -872,10 +887,10 @@
|
||||
delete non-precious targets, and abort. */
|
||||
static int delete_on_error = -1;
|
||||
|
||||
- if (!dontcare)
|
||||
+ if (!dontcare && child_failed == MAKE_FAILURE)
|
||||
child_error (c, exit_code, exit_sig, coredump, 0);
|
||||
|
||||
- c->file->update_status = us_failed;
|
||||
+ c->file->update_status = child_failed == MAKE_FAILURE ? us_failed : us_question;
|
||||
if (delete_on_error == -1)
|
||||
{
|
||||
struct file *f = lookup_file (".DELETE_ON_ERROR");
|
||||
@@ -987,7 +1002,7 @@
|
||||
if (!err && child_failed && !dontcare && !keep_going_flag &&
|
||||
/* fatal_error_signal will die with the right signal. */
|
||||
!handling_fatal_signal)
|
||||
- die (MAKE_FAILURE);
|
||||
+ die (child_failed);
|
||||
|
||||
/* Only block for one child. */
|
||||
block = 0;
|
||||
@@ -1189,14 +1204,15 @@
|
||||
++p;
|
||||
}
|
||||
|
||||
+ child->recursive = ((flags & COMMANDS_RECURSE) != 0);
|
||||
+
|
||||
/* Update the file's command flags with any new ones we found. We only
|
||||
keep the COMMANDS_RECURSE setting. Even this isn't 100% correct; we are
|
||||
now marking more commands recursive than should be in the case of
|
||||
multiline define/endef scripts where only one line is marked "+". In
|
||||
order to really fix this, we'll have to keep a lines_flags for every
|
||||
actual line, after expansion. */
|
||||
- child->file->cmds->lines_flags[child->command_line - 1]
|
||||
- |= flags & COMMANDS_RECURSE;
|
||||
+ child->file->cmds->lines_flags[child->command_line - 1] |= flags & COMMANDS_RECURSE;
|
||||
|
||||
/* POSIX requires that a recipe prefix after a backslash-newline should
|
||||
be ignored. Remove it now so the output is correct. */
|
||||
@@ -3115,6 +3131,7 @@
|
||||
#ifdef WINDOWS32
|
||||
char *command_ptr = NULL; /* used for batch_mode_shell mode */
|
||||
#endif
|
||||
+ char *args_ptr;
|
||||
|
||||
# ifdef __EMX__ /* is this necessary? */
|
||||
if (!unixy_shell && shellflags)
|
||||
@@ -3280,8 +3297,17 @@
|
||||
return new_argv;
|
||||
}
|
||||
|
||||
+#ifdef MAX_ARG_STRLEN
|
||||
+ static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ ";
|
||||
+#define ARG_NUMBER_DIGITS 5
|
||||
+#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4 \
|
||||
+ + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2))
|
||||
+#else
|
||||
+#define EVAL_LEN 0
|
||||
+#endif
|
||||
+
|
||||
new_line = xmalloc ((shell_len*2) + 1 + sflags_len + 1
|
||||
- + (line_len*2) + 1);
|
||||
+ + (line_len*2) + 1 + EVAL_LEN);
|
||||
ap = new_line;
|
||||
/* Copy SHELL, escaping any characters special to the shell. If
|
||||
we don't escape them, construct_command_argv_internal will
|
||||
@@ -3301,6 +3327,30 @@
|
||||
#ifdef WINDOWS32
|
||||
command_ptr = ap;
|
||||
#endif
|
||||
+
|
||||
+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
|
||||
+ if (unixy_shell && line_len > MAX_ARG_STRLEN)
|
||||
+ {
|
||||
+ unsigned j;
|
||||
+ memcpy (ap, eval_line, sizeof (eval_line) - 1);
|
||||
+ ap += sizeof (eval_line) - 1;
|
||||
+ for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++)
|
||||
+ ap += sprintf (ap, "\\$\\{%u\\}", j);
|
||||
+ *ap++ = '\\';
|
||||
+ *ap++ = '"';
|
||||
+ *ap++ = ' ';
|
||||
+ /* Copy only the first word of SHELL to $0. */
|
||||
+ for (p = shell; *p != '\0'; ++p)
|
||||
+ {
|
||||
+ if (isspace ((unsigned char)*p))
|
||||
+ break;
|
||||
+ *ap++ = *p;
|
||||
+ }
|
||||
+ *ap++ = ' ';
|
||||
+ }
|
||||
+#endif
|
||||
+ args_ptr = ap;
|
||||
+
|
||||
for (p = line; *p != '\0'; ++p)
|
||||
{
|
||||
if (restp != NULL && *p == '\n')
|
||||
@@ -3348,6 +3398,13 @@
|
||||
}
|
||||
#endif
|
||||
*ap++ = *p;
|
||||
+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
|
||||
+ if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2))
|
||||
+ {
|
||||
+ *ap++ = ' ';
|
||||
+ args_ptr = ap;
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
if (ap == new_line + shell_len + sflags_len + 2)
|
||||
{
|
||||
--- make-dfsg-4.1.orig/job.h
|
||||
+++ make-dfsg-4.1/job.h
|
||||
@@ -108,6 +108,7 @@
|
||||
unsigned int noerror:1; /* Nonzero if commands contained a '-'. */
|
||||
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
||||
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
||||
+ unsigned int recursive:1; /* Nonzero for recursive command ('+' etc.) */
|
||||
unsigned int dontcare:1; /* Saved dontcare flag. */
|
||||
};
|
||||
|
||||
--- make-dfsg-4.1.orig/main.c
|
||||
+++ make-dfsg-4.1/main.c
|
||||
@@ -1401,13 +1401,18 @@
|
||||
#ifdef HAVE_ISATTY
|
||||
if (isatty (fileno (stdout)))
|
||||
if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
|
||||
- define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
|
||||
- o_default, 0)->export = v_export;
|
||||
-
|
||||
+ {
|
||||
+ const char *tty = TTYNAME (fileno (stdout));
|
||||
+ define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
|
||||
+ o_default, 0)->export = v_export;
|
||||
+ }
|
||||
if (isatty (fileno (stderr)))
|
||||
if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
|
||||
- define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
|
||||
- o_default, 0)->export = v_export;
|
||||
+ {
|
||||
+ const char *tty = TTYNAME (fileno (stderr));
|
||||
+ define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
|
||||
+ o_default, 0)->export = v_export;
|
||||
+ }
|
||||
#endif
|
||||
|
||||
/* Reset in case the switches changed our minds. */
|
||||
@@ -2418,6 +2423,11 @@
|
||||
exit (WIFEXITED(r) ? WEXITSTATUS(r) : EXIT_FAILURE);
|
||||
}
|
||||
#else
|
||||
+#ifdef SET_STACK_SIZE
|
||||
+ /* Reset limits, if necessary. */
|
||||
+ if (stack_limit.rlim_cur)
|
||||
+ setrlimit (RLIMIT_STACK, &stack_limit);
|
||||
+#endif
|
||||
exec_command ((char **)nargv, environ);
|
||||
#endif
|
||||
free (aargv);
|
||||
--- make-dfsg-4.1.orig/makeint.h
|
||||
+++ make-dfsg-4.1/makeint.h
|
||||
@@ -424,10 +424,11 @@
|
||||
/* The number of bytes needed to represent the largest integer as a string. */
|
||||
#define INTSTR_LENGTH CSTRLEN ("18446744073709551616")
|
||||
|
||||
+#define DEFAULT_TTYNAME "true"
|
||||
#ifdef HAVE_TTYNAME
|
||||
# define TTYNAME(_f) ttyname (_f)
|
||||
#else
|
||||
-# define TTYNAME(_f) "true"
|
||||
+# define TTYNAME(_f) DEFAULT_TTYNAME
|
||||
#endif
|
||||
|
||||
|
||||
@@ -478,7 +479,7 @@
|
||||
int ar_name (const char *);
|
||||
void ar_parse_name (const char *, char **, char **);
|
||||
int ar_touch (const char *);
|
||||
-time_t ar_member_date (const char *);
|
||||
+int ar_member_date (const char *, time_t *);
|
||||
|
||||
typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
|
||||
long int hdrpos, long int datapos,
|
||||
--- make-dfsg-4.1.orig/remake.c
|
||||
+++ make-dfsg-4.1/remake.c
|
||||
@@ -1259,6 +1259,7 @@
|
||||
|
||||
char *arname, *memname;
|
||||
struct file *arfile;
|
||||
+ int found;
|
||||
time_t member_date;
|
||||
|
||||
/* Find the archive's name. */
|
||||
@@ -1306,10 +1307,15 @@
|
||||
/* The archive doesn't exist, so its members don't exist either. */
|
||||
return NONEXISTENT_MTIME;
|
||||
|
||||
- member_date = ar_member_date (file->hname);
|
||||
- mtime = (member_date == (time_t) -1
|
||||
- ? NONEXISTENT_MTIME
|
||||
- : file_timestamp_cons (file->hname, member_date, 0));
|
||||
+ found = ar_member_date (file->hname, &member_date);
|
||||
+ if (found && member_date == (time_t) 0)
|
||||
+ {
|
||||
+ OSS (error, NILF,
|
||||
+ _("Warning: Archive '%s' seems to have been created in deterministic mode. '%s' will always be updated. Please consider passing the U flag to ar to avoid the problem."),
|
||||
+ arfile->name, memname);
|
||||
+
|
||||
+ }
|
||||
+ mtime = found ? file_timestamp_cons (file->hname, member_date, 0) : NONEXISTENT_MTIME;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -1548,9 +1554,11 @@
|
||||
{
|
||||
static const char *dirs[] =
|
||||
{
|
||||
+#ifdef MULTIARCH_DIRS
|
||||
+ MULTIARCH_DIRS
|
||||
+#endif
|
||||
#ifndef _AMIGA
|
||||
"/lib",
|
||||
- "/usr/lib",
|
||||
#endif
|
||||
#if defined(WINDOWS32) && !defined(LIBDIR)
|
||||
/*
|
||||
@@ -1559,7 +1567,19 @@
|
||||
*/
|
||||
#define LIBDIR "."
|
||||
#endif
|
||||
- LIBDIR, /* Defined by configuration. */
|
||||
+ LIBDIR, /* Defined by configuration. */
|
||||
+#ifndef _AMIGA
|
||||
+/*
|
||||
+ * In the Debian binaries, PREFIX is /usr and thus this searches /lib,
|
||||
+ * /usr/lib and /usr/lib again and therefore misses any libraries that
|
||||
+ * are not packaged and were installed by the site admin. The ideal
|
||||
+ * behaviour would be to have the search path set by a Makefile
|
||||
+ * variable (other than the VPATH blunt object) but even absent that,
|
||||
+ * it would be more useful if it looked in /usr/local/lib even though
|
||||
+ * make itself hasn't been installed in the /usr/local tree -- manoj
|
||||
+ */
|
||||
+ "/usr/local/lib",
|
||||
+#endif
|
||||
0
|
||||
};
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
http://archive.ubuntu.com/ubuntu/pool/main/m/make-dfsg/make-dfsg_4.1-9.1ubuntu1.diff.gz
|
||||
@@ -1 +1 @@
|
||||
ftp://ftp.gnu.org/pub/gnu/make/make-3.82.tar.gz
|
||||
ftp://ftp.gnu.org/pub/gnu/make/make-4.1.tar.gz
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.82
|
||||
4.1
|
||||
|
||||
Reference in New Issue
Block a user