]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
package: add configuration option to specify a local override file
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 29 Sep 2011 19:57:38 +0000 (21:57 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 29 Sep 2011 20:19:08 +0000 (22:19 +0200)
The user can now create a custom local override file to override the
source directory for various packages.

An example override file:

 ZLIB_OVERRIDE_SRCDIR = /tmp/zlib
 STRACE_OVERRIDE_SRCDIR = /opt/strace-4.5.20

would tell Buildroot to use the zlib and strace source code from the
specified directories, instead of download, extracting and patching
the code has done usually by Buildroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Config.in
Makefile

index 2fce9d790066d5c09bd11ccb8e4d4f595cc59033..3aa3ad8cead8fe60f6920a487171f7aa287de30e 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -334,6 +334,16 @@ config BR2_HAVE_DEVFILES
          Install headers and static libraries in the
          target filesystem
 
+config BR2_PACKAGE_OVERRIDE_FILE
+       string "location of a package override file"
+       default "$(TOPDIR)/local.mk"
+       help
+         A package override file is a short makefile that contains
+         variable definitions of the form <pkg>_OVERRIDE_SRCDIR,
+         which allows to tell Buildroot to use an existing directory
+         as the source directory for a particular package. See the
+         Buildroot documentation for more details on this feature.
+
 endmenu
 
 source "toolchain/Config.in"
index a20d3e2a8969f1ca66ed5fb518d0efd8a3c81b5d..8525b7ddd8722999f1c188a6dae270e5619b8748 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -309,6 +309,13 @@ else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
 include toolchain/toolchain-crosstool-ng.mk
 endif
 
+# Include the package override file if one has been provided in the
+# configuration.
+PACKAGE_OVERRIDE_FILE=$(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE))
+ifneq ($(PACKAGE_OVERRIDE_FILE),)
+-include $(PACKAGE_OVERRIDE_FILE)
+endif
+
 include package/*/*.mk
 
 include boot/common.mk