diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt index 521d6d50c7..9d1428ad40 100644 --- a/docs/manual/adding-packages-generic.txt +++ b/docs/manual/adding-packages-generic.txt @@ -347,6 +347,13 @@ information is (assuming the package name is +libfoo+) : a similar way, +HOST_LIBFOO_DEPENDENCIES+ lists the dependencies for the current host package. +* +LIBFOO_EXTRACT_DEPENDENCIES+ lists the dependencies (in terms of + package name) that are required for the current target package to be + extracted. These dependencies are guaranteed to be compiled and + installed before the extract step of the current package + starts. This is only used internally by the package infrastructure, + and should typically not be used directly by packages. + * +LIBFOO_PATCH_DEPENDENCIES+ lists the dependencies (in terms of package name) that are required for the current package to be patched. These dependencies are guaranteed to be extracted and diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 3cadb28595..0a404040b0 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -557,8 +557,13 @@ endif # Eliminate duplicates in dependencies $(2)_FINAL_DEPENDENCIES = $$(sort $$($(2)_DEPENDENCIES)) +$(2)_FINAL_EXTRACT_DEPENDENCIES = $$(sort $$($(2)_EXTRACT_DEPENDENCIES)) $(2)_FINAL_PATCH_DEPENDENCIES = $$(sort $$($(2)_PATCH_DEPENDENCIES)) -$(2)_FINAL_ALL_DEPENDENCIES = $$(sort $$($(2)_FINAL_DEPENDENCIES) $$($(2)_FINAL_PATCH_DEPENDENCIES)) +$(2)_FINAL_ALL_DEPENDENCIES = \ + $$(sort \ + $$($(2)_FINAL_DEPENDENCIES) \ + $$($(2)_FINAL_EXTRACT_DEPENDENCIES) \ + $$($(2)_FINAL_PATCH_DEPENDENCIES)) $(2)_INSTALL_STAGING ?= NO $(2)_INSTALL_IMAGES ?= NO @@ -681,6 +686,7 @@ $$($(2)_TARGET_PATCH): | $$(patsubst %,%-patch,$$($(2)_FINAL_PATCH_DEPENDENCIES $(1)-extract: $$($(2)_TARGET_EXTRACT) $$($(2)_TARGET_EXTRACT): $$($(2)_TARGET_SOURCE) +$$($(2)_TARGET_EXTRACT): | $$($(2)_FINAL_EXTRACT_DEPENDENCIES) $(1)-depends: $$($(2)_FINAL_DEPENDENCIES)