summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2016-12-01 22:22:06 +0100
committerPeter Korsgaard <peter@korsgaard.com>2016-12-01 22:29:56 +0100
commit8852f08eeda3c9ff4c5f9cc90a169338bda1bff9 (patch)
tree8b22aaa4e3c283a73fe2af2eccdfa3926a5430ef /Makefile
parent42dd856ca930f79a831361e337d25fb8dd6e0dd1 (diff)
parent4f29cc436b24a8007b065253babe27b9346a479e (diff)
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 23 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 119839c3d..00bcd0f49 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,9 @@
# You shouldn't need to mess with anything beyond this point...
#--------------------------------------------------------------
+# Delete default rules. We don't use them. This saves a bit of time.
+.SUFFIXES:
+
# we want bash as shell
SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -84,6 +87,8 @@ all:
# Set and export the version string
export BR2_VERSION := 2017.02-git
+# Actual time the release is cut (for reproducible builds)
+BR2_VERSION_EPOCH = 1478206447
# Save running make version since it's clobbered by the make package
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
@@ -123,7 +128,8 @@ export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlo
noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
randpackageconfig allyespackageconfig allnopackageconfig \
- print-version olddefconfig distclean
+ print-version olddefconfig distclean manual manual-html manual-split-html \
+ manual-pdf manual-text manual-epub
# Some global targets do not trigger a build, but are used to collect
# metadata, or do various checks. When such targets are triggered,
@@ -134,9 +140,12 @@ noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconf
# We're building in two situations: when MAKECMDGOALS is empty
# (default target is to build), or when MAKECMDGOALS contains
# something else than one of the nobuild_targets.
-nobuild_targets := source source-check \
- legal-info external-deps _external-deps \
- clean distclean help
+nobuild_targets := source %-source source-check \
+ legal-info %-legal-info external-deps _external-deps \
+ clean distclean help show-targets graph-depends \
+ %-graph-depends %-show-depends %-show-version \
+ graph-build graph-size list-defconfigs \
+ savedefconfig printvars
ifeq ($(MAKECMDGOALS),)
BR_BUILDING = y
else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
@@ -165,10 +174,10 @@ endif
# bash prints the name of the directory on 'cd <dir>' if CDPATH is
# set, so unset it here to not cause problems. Notice that the export
-# line doesn't affect the environment of $(shell ..) calls, so
-# explictly throw away any output from 'cd' here.
+# line doesn't affect the environment of $(shell ..) calls.
export CDPATH :=
-BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
+
+BASE_DIR := $(CANONICAL_O)
$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
@@ -239,9 +248,12 @@ endif
# timezone and locale may affect build output
ifeq ($(BR2_REPRODUCIBLE),y)
-export TZ=UTC
-export LANG=C
-export LC_ALL=C
+export TZ = UTC
+export LANG = C
+export LC_ALL = C
+export GZIP = -n
+BR2_VERSION_GIT_EPOCH = $(shell GIT_DIR=$(TOPDIR)/.git $(GIT) log -1 --format=%at)
+export SOURCE_DATE_EPOCH = $(if $(wildcard $(TOPDIR)/.git),$(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH))
endif
# To put more focus on warnings, be less verbose as default
@@ -656,7 +668,7 @@ endif
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
rm -rf $(TARGET_DIR)/usr/share/gtk-doc
- -rmdir $(TARGET_DIR)/usr/share 2>/dev/null
+ rmdir $(TARGET_DIR)/usr/share 2>/dev/null || true
$(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true
# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads