浏览代码

package/Makefile.in: add PARALLEL_JOBS to post-build/post-image scripts

Post-build, post-image, and other build scripts may run some commands in
parallel, for example to parallelize xargs, Makefiles, etc. Export
PARALLEL_JOBS to these scripts so they can enforce the same job limits
that other Buildroot packages use.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
Brandon Maier 1 年之前
父节点
当前提交
a320986c44

+ 2 - 2
docs/manual/customize-post-image.adoc

@@ -33,8 +33,8 @@ arguments that are only used for the post-image scripts you can use
 
 Again just like for the post-build scripts, the scripts have access to
 the environment variables +BR2_CONFIG+, +HOST_DIR+, +STAGING_DIR+,
-+TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+, +CONFIG_DIR+ and
-+BASE_DIR+.
++TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+, +CONFIG_DIR+, +BASE_DIR+,
+and +PARALLEL_JOBS+.
 
 The post-image scripts will be executed as the user that executes
 Buildroot, which should normally _not_ be the root user. Therefore, any

+ 1 - 0
docs/manual/customize-rootfs.adoc

@@ -75,6 +75,7 @@ In addition, you may also use these environment variables:
   - +BINARIES_DIR+: the place where all binary files (aka images) are
     stored
   - +BASE_DIR+: the base output directory
+  - +PARALLEL_JOBS+: the number of jobs to use when running parallel processes.
 
 Below three more methods of customizing the target filesystem are
 described, but they are not recommended.

+ 1 - 0
docs/manual/debugging-buildroot.adoc

@@ -41,3 +41,4 @@ The script has access to the following variables:
   - +BINARIES_DIR+: the place where all binary files (aka images) are
     stored
   - +BASE_DIR+: the base output directory
+  - +PARALLEL_JOBS+: the number of jobs to use when running parallel processes.

+ 2 - 1
package/Makefile.in

@@ -331,7 +331,8 @@ EXTRA_ENV = \
 	BR2_DL_DIR=$(BR2_DL_DIR) \
 	BUILD_DIR=$(BUILD_DIR) \
 	CONFIG_DIR=$(CONFIG_DIR) \
-	O=$(CANONICAL_O)
+	O=$(CANONICAL_O) \
+	PARALLEL_JOBS=$(PARALLEL_JOBS)
 
 ################################################################################
 # settings we need to pass to configure