|
@@ -25,7 +25,7 @@
|
|
|
#--------------------------------------------------------------
|
|
|
|
|
|
# Set and export the version string
|
|
|
-export BR2_VERSION:=2014.02
|
|
|
+export BR2_VERSION:=2014.05-git
|
|
|
|
|
|
# Check for minimal make version (note: this check will break at make 10.x)
|
|
|
MIN_MAKE_VERSION=3.81
|
|
@@ -43,7 +43,20 @@ export HOSTARCH := $(shell uname -m | \
|
|
|
-e s/macppc/powerpc/\
|
|
|
-e s/sh.*/sh/)
|
|
|
|
|
|
-# This top-level Makefile can *not* be executed in parallel
|
|
|
+# Parallel execution of this Makefile is disabled because it changes
|
|
|
+# the packages building order, that can be a problem for two reasons:
|
|
|
+# - If a package has an unspecified optional dependency and that
|
|
|
+# dependency is present when the package is built, it is used,
|
|
|
+# otherwise it isn't (but compilation happily proceeds) so the end
|
|
|
+# result will differ if the order is swapped due to parallel
|
|
|
+# building.
|
|
|
+# - Also changing the building order can be a problem if two packages
|
|
|
+# manipulate the same file in the target directory.
|
|
|
+#
|
|
|
+# Taking into account the above considerations, if you still want to execute
|
|
|
+# this top-level Makefile in parallel comment the ".NOTPARALLEL" line and
|
|
|
+# build using the following command:
|
|
|
+# make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1))
|
|
|
.NOTPARALLEL:
|
|
|
|
|
|
# absolute path
|
|
@@ -383,8 +396,6 @@ include system/system.mk
|
|
|
|
|
|
include $(BR2_EXTERNAL)/external.mk
|
|
|
|
|
|
-TARGETS+=target-finalize
|
|
|
-
|
|
|
ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
|
|
|
TARGETS+=target-purgelocales
|
|
|
endif
|
|
@@ -401,11 +412,8 @@ endif
|
|
|
|
|
|
include fs/common.mk
|
|
|
|
|
|
-TARGETS+=target-post-image
|
|
|
-
|
|
|
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
|
|
|
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
|
|
|
-TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS))
|
|
|
|
|
|
# host-* dependencies have to be handled specially, as those aren't
|
|
|
# visible in Kconfig and hence not added to a variable like TARGETS.
|
|
@@ -428,9 +436,6 @@ HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
|
|
|
TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\
|
|
|
$(TARGETS) $(BASE_TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))
|
|
|
|
|
|
-# all targets depend on the crosscompiler and it's prerequisites
|
|
|
-$(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
|
|
|
-
|
|
|
dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
|
|
|
$(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
|
|
|
|
|
@@ -439,11 +444,16 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
|
|
|
|
|
|
prepare: $(BUILD_DIR)/buildroot-config/auto.conf
|
|
|
|
|
|
-world: $(BASE_TARGETS) $(TARGETS_ALL)
|
|
|
+# Add base dependencies to all targets even on those not based on the
|
|
|
+# package framework.
|
|
|
+$(TARGETS): dirs prepare dependencies
|
|
|
+
|
|
|
+world: target-post-image
|
|
|
|
|
|
.PHONY: all world toolchain dirs clean distclean source outputmakefile \
|
|
|
legal-info legal-info-prepare legal-info-clean printvars \
|
|
|
- $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
|
|
|
+ target-finalize target-post-image \
|
|
|
+ $(BASE_TARGETS) $(TARGETS) $(TARGETS_ROOTFS) \
|
|
|
$(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \
|
|
|
$(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
|
|
|
$(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
|
|
@@ -503,7 +513,9 @@ endif
|
|
|
STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \)
|
|
|
STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
|
|
|
|
|
|
-target-finalize:
|
|
|
+$(TARGETS_ROOTFS): target-finalize
|
|
|
+
|
|
|
+target-finalize: $(TARGETS)
|
|
|
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
|
|
|
$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
|
|
|
$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
|
|
@@ -518,10 +530,10 @@ endif
|
|
|
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
|
|
|
-ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
|
|
|
+ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY)$(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
|
|
|
find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -print0 | xargs -0 rm -f
|
|
|
endif
|
|
|
-ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
|
|
|
+ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
|
|
|
find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
|
|
|
endif
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/luarocks
|
|
@@ -608,7 +620,7 @@ target-generatelocales: host-localedef
|
|
|
done
|
|
|
endif
|
|
|
|
|
|
-target-post-image:
|
|
|
+target-post-image: $(TARGETS_ROOTFS)
|
|
|
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
|
|
|
$(call MESSAGE,"Executing post-image script $(s)"); \
|
|
|
$(USER_HOOKS_EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
|
|
@@ -645,7 +657,7 @@ legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
|
|
|
@rm -f $(LEGAL_WARNINGS)
|
|
|
|
|
|
show-targets:
|
|
|
- @echo $(TARGETS)
|
|
|
+ @echo $(TARGETS) $(TARGETS_ROOTFS)
|
|
|
|
|
|
graph-build: $(O)/build/build-time.log
|
|
|
@install -d $(O)/graphs
|