On Tue, May 24, 2011 at 11:11:58AM -0400, Jon Ringle wrote:
> Use lndir for local external projects referenced by lndir:// URL
>
> lndir will create a shadow directory tree of the source tree populated with
> symlinks of all the files contained in the source tree. Building from the
> lndir created shadow tree will result in all files created by the build to
> be created in the shadow tree and leaving the source tree prestine. This is
> useful when building for multiple archs.
>
> Signed-off-by: Jon Ringle <[email protected]>
> ---
> scripts/lib/ptxd_lib_dgen.awk | 9 +++++++++
> scripts/lib/ptxd_make_world_extract.sh | 14 ++++++++++++++
> 2 files changed, 23 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
> index 27b6ce2..af29b01 100644
> --- a/scripts/lib/ptxd_lib_dgen.awk
> +++ b/scripts/lib/ptxd_lib_dgen.awk
> @@ -331,6 +331,15 @@ END {
> print "endif"
> > DGEN_DEPS_POST;
>
> #
> + # conditional dependency on lndir
> + #
> + print "ifneq ($(" this_PKG "),)"
> > DGEN_DEPS_POST;
The block above generaged the same "ifneq ($(" this_PKG "),)". Please
combine the two block. We're generating a lot of checks here, and if we're
not careful we can slow things down considerably.
Michael
> + print "ifneq ($(findstring lndir://,$(" this_PKG "_URL)),)"
> > DGEN_DEPS_POST;
> + print "$(STATEDIR)/" this_pkg ".extract:
> $(STATEDIR)/host-lndir.install.post" > DGEN_DEPS_POST;
> + print "endif"
> > DGEN_DEPS_POST;
> + print "endif"
> > DGEN_DEPS_POST;
> +
> + #
> # add dep to pkgs we depend on
> #
> this_PKG_DEPS = PKG_to_DEP[this_PKG];
> diff --git a/scripts/lib/ptxd_make_world_extract.sh
> b/scripts/lib/ptxd_make_world_extract.sh
> index d3e401e..1eb260a 100644
> --- a/scripts/lib/ptxd_make_world_extract.sh
> +++ b/scripts/lib/ptxd_make_world_extract.sh
> @@ -21,6 +21,20 @@ ptxd_make_world_extract() {
> pkg_extract_dir="${pkg_deprecated_extract_dir:-${pkg_extract_dir}}"
>
> case "${pkg_url}" in
> + lndir://*)
> + local url="${pkg_url//lndir:\/\//}"
> + if [ -n "${pkg_src}" ]; then
> + ptxd_bailout "<PKG>_SOURCE must not be defined when using a
> lndir:// URL!"
> + fi
> + if [ -d "${url}" ]; then
> + echo "local directory using lndir"
> + mkdir -p "${pkg_dir}"
> + lndir "$(ptxd_abspath "${url}")" "${pkg_dir}"
> + return
> + else
> + ptxd_bailout "the URL '${pkg_url}' points to non existing
> directory."
> + fi
> + ;;
> file://*)
> local url="${pkg_url//file:\/\//}"
> if [ -n "${pkg_src}" ]; then
> --
> 1.7.0.4
>
>
> --
> ptxdist mailing list
> [email protected]
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
[email protected]