package: add base dependency to every package
authorFabio Porcedda <fabio.porcedda@gmail.com>
Fri, 14 Feb 2014 09:55:03 +0000 (10:55 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 14 Feb 2014 20:08:19 +0000 (21:08 +0100)
Move "dependencies" "dirs" "prepare" dependencies from "toolchain" to
every package.
This way we can build correctly every package right after the clean
stage.
As example with this commit we can build successfully the glibc right
after the clean stage:
make clean glibc

This is also a step forward supporting top-level parallel make.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/pkg-generic.mk
toolchain/toolchain/toolchain.mk

index 555c3c2e26dd180839ccadfe6ab8d791fca811c9..e5b04ff643b8d3b20cc62e1359bbbba520a0c830 100644 (file)
@@ -427,6 +427,11 @@ $(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
 $(1)-build:            $(1)-configure \
                        $$($(2)_TARGET_BUILD)
 
+$$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dirs prepare
+ifeq ($(filter $(1),$(DEPENDENCIES_HOST_PREREQ)),)
+$$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dependencies
+endif
+
 ifeq ($$($(2)_OVERRIDE_SRCDIR),)
 # In the normal case (no package override), the sequence of steps is
 #  source, by downloading
index 1152e2508a858a55f02a2a7cee8f29bd231ee881..8559ac9df49dbfceced12cc897aa9784ba44377e 100644 (file)
@@ -14,4 +14,4 @@ endif
 
 $(eval $(generic-package))
 
-toolchain-source: prepare dirs dependencies $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
+toolchain: $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake