Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/pkg-generic.mk: add --delete to rsync
Date: Fri, 10 Oct 2014 15:33:42 +0200	[thread overview]
Message-ID: <20141010153342.2794ef55@free-electrons.com> (raw)
In-Reply-To: <CAM+bi4tggsVGy7w9eRKRF_zy_o2dFU7CEJu6nx2Nv1=vVrVtig@mail.gmail.com>

Dear Alvaro Gamez,

On Fri, 10 Oct 2014 12:45:59 +0200, Alvaro Gamez wrote:

> You would like for the object files to remain there in case nothing or
> little has changed and its compilation can be omitted by the build
> tool (make or whatever).

Absolutely. That's the whole point of the OVERRIDE_SRCDIR mechanism:
you make a change in your external source directory, you run "make
<pkg>-rebuild", and it triggers a rsync of the source and then starts
rebuilding. But it should not rebuild from scratch, only rebuild the
source files that have changed.

> But it is my understanding that the main idea is to make $(@D) a copy
> of the source to do the build there.
> I've faced a problem in the case of a build that basically does gcc *.c -o out.
> In this situation, if I remove one .c file on the source directory,
> this doesn't get removed from $(@D) and the next time I invoke
> package-rebuild this removed file is still compiled, even though it
> doesn't exist now on the source.

Yes, I understand the issue. However, a quick test seems to suggest
that rsync --delete will also remove object files, which kind of
defeats the purpose of OVERRIDE_SRCDIR.

Not sure how to distinguish files that should be removed from files
that should be kept...

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-10-10 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10  9:14 [Buildroot] [PATCH 1/1] package/pkg-generic.mk: add --delete to rsync Alvaro G. M
2014-10-10 10:36 ` Thomas Petazzoni
2014-10-10 10:45   ` Alvaro Gamez
2014-10-10 13:33     ` Thomas Petazzoni [this message]
2014-10-12 16:26 ` Thomas Petazzoni
2014-10-12 16:37   ` Alvaro Gamez
2014-10-12 16:55     ` 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=20141010153342.2794ef55@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