From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v1 03/14] generic infrastructure: out of tree build support
Date: Thu, 24 Jan 2013 22:41:55 +0100 [thread overview]
Message-ID: <5101AAA3.4030507@mind.be> (raw)
In-Reply-To: <1358725943-31485-4-git-send-email-thomas.petazzoni@free-electrons.com>
On 01/21/13 00:52, Thomas Petazzoni wrote:
[snip]
> # Patch
> #
> # The RAWNAME variable is the lowercased package name, which allows to
> # find the package directory (typically package/<pkgname>) and the
> # prefix of the patches
> -$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
> -$(BUILD_DIR)/%/.stamp_patched:
> +$(SRC_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
> +$(SRC_DIR)/%/.stamp_patched:
> @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
> $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
> $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(p)$(sep))
> @@ -100,9 +81,15 @@ $(BUILD_DIR)/%/.stamp_patched:
> )
> $(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep))
Ouch, we forgot something: there may be a HOST_FOO_PRE_PATCH_HOOKS,
HOST_FOO_PATCH or HOST_FOO_POST_PATCH_HOOKS that is different from its
non-host equivalent... Perhaps there should be a check that they are the
same (or the host version is not defined).
> $(Q)touch $@
> + chmod a-w -R $(@D)
I would do this before touching the stamp file.
[snip]
> +# Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for overriden
> +# packages
> +$(BUILD_DIR)/%/.stamp_override_sourced:
> +ifeq ($(DL_MODE),SOURCE_CHECK)
> + test -d $($(PKG)_SRCDIR)
> +else ifeq ($(DL_MODE),SHOW_EXTERNAL_DEPS)
> + echo "file://$($(PKG)_SRCDIR)"
> +else
> + @true # Nothing to do to source a local package
> +endif
Why did you move this down? It was better when it was close to the rest
of the source stuff.
> +
> ################################################################################
> # inner-generic-package -- generates the make targets needed to build a
> # generic package
> @@ -215,11 +218,10 @@ else
> $(2)_VERSION = $(subst /,_,$($(2)_VERSION))
> endif
>
> -$(2)_BASE_NAME = $(1)-$$($(2)_VERSION)
> +$(2)_BASE_NAME = $$($(2)_NAME)-$$($(2)_VERSION)
> +$(2)_RAW_BASE_NAME = $$($(2)_RAWNAME)-$$($(2)_VERSION)
Whitespace seems to be a bit messed up here. Or it could just be the
mixing of tabs and spaces.
> $(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME)
> -$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME)
Err, $(PKG)_DIR is used in a lot of places: barebox, uboot, linux,
ocf-linux, rtai, xenomai, bash, busybox, host-dbus, dhcp, dmalloc,
dnsmasq, fbv, file, hostapd, ... OK I'm tired of typing all this, just do
git grep '[A-Z0-9]_DIR\b' -- \*.mk | sed
's/\(TARGET\|HOST\|STAGING\|DL\)_DIR//g' | grep '[A-Z0-9]_DIR\b'
I think these should be fixed up first in separate patches (as far as
possible). It's not always clear whether they should be changed into the
SRCDIR or BUILDDIR.
Regards,
Arnout
> -$(2)_SRCDIR = $$($(2)_DIR)
> -$(2)_BUILDDIR ?= $$($(2)_SRCDIR)
> +$(2)_BUILDDIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME)
>
> ifneq ($$($(2)_OVERRIDE_SRCDIR),)
> $(2)_VERSION = custom
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2013-01-24 21:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-20 23:52 [Buildroot] [RFC v1] Prototype implementation of per-package out of tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 01/14] Add a new "src" directory in the output directory Thomas Petazzoni
2013-01-21 13:47 ` Jérôme Pouiller
2013-01-21 17:16 ` Thomas Petazzoni
2013-01-22 10:15 ` Jérôme Pouiller
2013-01-22 16:49 ` Thomas Petazzoni
2013-01-22 17:12 ` Jérôme Pouiller
2013-01-23 15:45 ` Thomas Petazzoni
2013-01-24 10:34 ` Jérôme Pouiller
2013-01-20 23:52 ` [Buildroot] [RFC v1 02/14] package infrastructure: move subdir support to autotools Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 03/14] generic infrastructure: out of tree build support Thomas Petazzoni
2013-01-24 21:41 ` Arnout Vandecappelle [this message]
2013-01-20 23:52 ` [Buildroot] [RFC v1 04/14] autotools infrastructure: support out of tree build Thomas Petazzoni
2013-01-24 21:57 ` Arnout Vandecappelle
2013-01-20 23:52 ` [Buildroot] [RFC v1 05/14] autotools infrastructure: do the autoreconf as a post patch step Thomas Petazzoni
2013-01-26 22:03 ` Arnout Vandecappelle
2013-01-27 16:27 ` Thomas Petazzoni
2013-01-27 22:18 ` Arnout Vandecappelle
2013-01-28 8:13 ` Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 06/14] cmake infrastructure: support out of tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 07/14] busybox: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 08/14] mtd: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 09/14] barebox: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 10/14] uboot: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 11/14] linux: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 12/14] autoconf: fix out-of-tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 13/14] cmake: support out of tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 14/14] makedevs: " Thomas Petazzoni
2013-01-21 4:24 ` [Buildroot] [RFC v1] Prototype implementation of per-package out oftree build Przemyslaw Wrzos
2013-01-21 17:26 ` Thomas Petazzoni
2013-01-21 18:51 ` Stephan Hoffmann
2013-01-24 20:12 ` [Buildroot] [RFC v1] Prototype implementation of per-package out of tree build Arnout Vandecappelle
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=5101AAA3.4030507@mind.be \
--to=arnout@mind.be \
--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