]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blobdiff - Makefile
Update for 2018.02-rc3
[coffee/buildroot.git] / Makefile
index 6d4aeca39afb369e3fb860948d2fc976bfbe323d..5fe3a34c479d069111fbd108c38b68a47282f26b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 #
 # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
 # Copyright (C) 2006-2014 by the Buildroot developers <buildroot@uclibc.org>
-# Copyright (C) 2014-2017 by the Buildroot developers <buildroot@buildroot.org>
+# Copyright (C) 2014-2018 by the Buildroot developers <buildroot@buildroot.org>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -87,9 +87,9 @@ all:
 .PHONY: all
 
 # Set and export the version string
-export BR2_VERSION := 2017.08-rc1
+export BR2_VERSION := 2018.02-rc3
 # Actual time the release is cut (for reproducible builds)
-BR2_VERSION_EPOCH = 150170700
+BR2_VERSION_EPOCH = 1519768000
 
 # Save running make version since it's clobbered by the make package
 RUNNING_MAKE_VERSION := $(MAKE_VERSION)
@@ -141,7 +141,7 @@ 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 source-check \
+nobuild_targets := source %-source \
        legal-info %-legal-info external-deps _external-deps \
        clean distclean help show-targets graph-depends \
        %-graph-depends %-show-depends %-show-version \
@@ -254,7 +254,7 @@ 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))
+export SOURCE_DATE_EPOCH ?= $(if $(wildcard $(TOPDIR)/.git),$(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH))
 DEPENDENCIES_HOST_PREREQ += host-fakedate
 endif
 
@@ -483,11 +483,13 @@ include system/system.mk
 include package/Makefile.in
 # arch/arch.mk.* must be after package/Makefile.in because it may need to
 # complement variables defined therein, like BR_NO_CHECK_HASH_FOR.
--include $(wildcard arch/arch.mk.*)
+-include $(sort $(wildcard arch/arch.mk.*))
 include support/dependencies/dependencies.mk
 
-include toolchain/*.mk
-include toolchain/*/*.mk
+PACKAGES += $(DEPENDENCIES_HOST_PREREQ)
+
+include $(sort $(wildcard toolchain/*.mk))
+include $(sort $(wildcard toolchain/*/*.mk))
 
 # Include the package override file if one has been provided in the
 # configuration.
@@ -542,7 +544,7 @@ endif
 
 .PHONY: dirs
 dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
-       $(HOST_DIR) $(HOST_DIR)/usr $(BINARIES_DIR)
+       $(HOST_DIR) $(HOST_DIR)/usr $(HOST_DIR)/lib $(BINARIES_DIR)
 
 $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
        $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
@@ -565,6 +567,13 @@ sdk: world
 $(HOST_DIR)/usr: $(HOST_DIR)
        @ln -snf . $@
 
+$(HOST_DIR)/lib: $(HOST_DIR)
+       @mkdir -p $@
+       @case $(HOSTARCH) in \
+               (*64) ln -snf lib $(@D)/lib64;; \
+               (*)   ln -snf lib $(@D)/lib32;; \
+       esac
+
 # Populating the staging with the base directories is handled by the skeleton package
 $(STAGING_DIR):
        @mkdir -p $(STAGING_DIR)
@@ -670,6 +679,10 @@ $(TARGETS_ROOTFS): target-finalize
 .PHONY: target-finalize
 target-finalize: $(PACKAGES)
        @$(call MESSAGE,"Finalizing target directory")
+       # Check files that are touched by more than one package
+       ./support/scripts/check-uniq-files -t target $(BUILD_DIR)/packages-file-list.txt
+       ./support/scripts/check-uniq-files -t staging $(BUILD_DIR)/packages-file-list-staging.txt
+       ./support/scripts/check-uniq-files -t host $(BUILD_DIR)/packages-file-list-host.txt
        $(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
        rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
                $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
@@ -716,7 +729,8 @@ endif
                echo "ID=buildroot"; \
                echo "VERSION_ID=$(BR2_VERSION)"; \
                echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
-       ) >  $(TARGET_DIR)/etc/os-release
+       ) >  $(TARGET_DIR)/usr/lib/os-release
+       ln -sf ../usr/lib/os-release $(TARGET_DIR)/etc
 
        @$(call MESSAGE,"Sanitizing RPATH in target tree")
        $(TOPDIR)/support/scripts/fix-rpath target
@@ -745,10 +759,6 @@ _external-deps: $(foreach p,$(PACKAGES),$(p)-all-external-deps)
 external-deps:
        @$(MAKE1) -Bs $(EXTRAMAKEARGS) _external-deps | sort -u
 
-# check if download URLs are outdated
-.PHONY: source-check
-source-check: $(foreach p,$(PACKAGES),$(p)-all-source-check)
-
 .PHONY: legal-info-clean
 legal-info-clean:
        @rm -fr $(LEGAL_INFO_DIR)
@@ -780,7 +790,7 @@ legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p
 
 .PHONY: show-targets
 show-targets:
-       @echo $(PACKAGES) $(TARGETS_ROOTFS)
+       @echo $(sort $(PACKAGES)) $(sort $(TARGETS_ROOTFS))
 
 .PHONY: show-build-order
 show-build-order: $(patsubst %,%-show-build-order,$(PACKAGES))
@@ -1035,7 +1045,6 @@ help:
        @echo
        @echo 'Miscellaneous:'
        @echo '  source                 - download all sources needed for offline-build'
-       @echo '  source-check           - check selected packages for valid download URLs'
        @echo '  external-deps          - list external packages used'
        @echo '  legal-info             - generate info about license compliance'
        @echo '  printvars              - dump all the internal variables'
@@ -1100,7 +1109,7 @@ print-version:
        ./support/testing/run-tests -l 2>&1 | sed -r -e '/^test_run \((.*)\).*/!d; s//\1: *runtime_test/' | LC_ALL=C sort >> $@
 
 include docs/manual/manual.mk
--include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(dir)/docs/*/*.mk)
+-include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))
 
 .PHONY: $(noconfig_targets)