From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC] Override source directories
Date: Wed, 18 May 2011 23:48:09 +0200 [thread overview]
Message-ID: <cover.1305755245.git.thomas.petazzoni@free-electrons.com> (raw)
Hello,
Here is a set of RFC patches that implement the basic mechanism I have
been referring to since a couple of weeks/months about allowing users
to override the source directory for packages.
From an user perspective, it allows ones to create a "local.mk" file
in the Buildroot main source directory, with variable definitions such
as :
ZLIB_OVERRIDE_SRCDIR = /tmp/zlib
MYAPP_OVERRIDE_SRCDIR = /home/foobar/project/myapp
LIBGLIB2_OVERRIDE_SRCDIR = /home/foobar/git/libglib2
At build time, Buildroot would use those directories at the source for
the packages, instead of downloading, extracing and patching them in
the usual way.
Internally, this is implemented inside our package infrastructure, so
this mechanism should work for all packages that rely on the
infrastructure. The GENTARGETS macro makes sure that the package build
process bypasses the download, extract and patch step when
<pkg>_OVERRIDE_SRCDIR is defined, and instead a symlinking step is
added. It's very simple.
This series of patches also add the <pkg>-reconfigure and
<pkg>-rebuild targets, which makes it easy for users to restart the
package build process at the compilation step or at the configuration
step, without having to mess up with stamp file details.
There are still a few issues to solve and discuss, though :
* Is local.mk inside the main source directory the good solution?
Should we instead provide a configuration option to set the path to
the override file? Or another solution?
* As the mechanism is implemented today, "make clean" removes the
symbolic link $(O)/build/<pkg>-<version>, but not the stamp files
created inside this source directory. So next time the build is
started, things will go wrong. To solve this, the only solution I
see is to separate the directory with the stamp files from the
source directory, at least in the case of overriden source
directories.
* Other things?
Feedback, comments and ideas welcome.
Regards,
Thomas
The following changes since commit 7234c23967fa70b760c64700e56bb1778019fbeb:
CHANGES: update with recent changes (2011-05-18 21:02:30 +0200)
are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git for-2011.08/sourcedir
Thomas Petazzoni (4):
package: enhance infrastructure to support source dir override
package: remove stamp files in <pkg>-dirclean
package: add <pkg>-rebuild and <pkg>-reconfigure
Include a local.mk for package overrides
Makefile | 1 +
package/Makefile.package.in | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)
Thanks,
--
Thomas Petazzoni
next reply other threads:[~2011-05-18 21:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 21:48 Thomas Petazzoni [this message]
2011-05-18 21:48 ` [Buildroot] [PATCH 1/4] package: enhance infrastructure to support source dir override Thomas Petazzoni
2011-06-24 12:04 ` Alper YILDIRIM
2011-06-24 12:44 ` Thomas Petazzoni
2011-05-18 21:48 ` [Buildroot] [PATCH 2/4] package: remove stamp files in <pkg>-dirclean Thomas Petazzoni
2011-05-18 21:48 ` [Buildroot] [PATCH 3/4] package: add <pkg>-rebuild and <pkg>-reconfigure Thomas Petazzoni
2011-05-18 21:48 ` [Buildroot] [PATCH 4/4] Include a local.mk for package overrides Thomas Petazzoni
2011-05-19 8:50 ` [Buildroot] [RFC] Override source directories Benoît Mauduit
2011-06-08 20:22 ` Alper Yıldırım
2011-06-09 6:38 ` Patryk Benderz
2011-06-10 21:21 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1305755245.git.thomas.petazzoni@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox