[Buildroot] [git commit] package: implement a 'local' site method

Peter Korsgaard jacmet at sunsite.dk
Thu Sep 29 20:32:14 UTC 2011


commit: http://git.buildroot.net/buildroot/commit/?id=793a2ea5174e5352ec18ca32f7914c7071bf3108
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The new override source directory mechanism allows to tell Buildroot
to use a particular directory as the source directory for a
package. However, this mechanism works with a local override makefile
and not directly within the package recipe itself.

For some use cases, it might be desirable to write a package recipe
which always refers to a local source directory (and not a http, git,
svn or bazaar download). This commit makes this possible by adding the
'local' site method. It allows to write package recipes as follows:

MYPKG_SITE = /tmp/mypkg-source-code
MYPKG_SITE_METHOD = local

[...]

$(eval $(call GENTARGETS,package,mypkg))

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
---
 package/Makefile.package.in |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 53cc8eb..5987d38 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -439,6 +439,12 @@ ifndef $(2)_SITE_METHOD
  endif
 endif
 
+ifeq ($$($(2)_SITE_METHOD),local)
+ifeq ($$($(2)_OVERRIDE_SRCDIR),)
+$(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
+endif
+endif
+
 $(2)_DEPENDENCIES		?=
 $(2)_INSTALL_STAGING		?= NO
 $(2)_INSTALL_IMAGES		?= NO


More information about the buildroot mailing list