All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Fontana <cfontana@suse.de>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Philippe Mathieu-Daude <philmd@redhat.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Alex Bennee <alex.bennee@linaro.org>,
	Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH RESEND v3 0/2] Makefile: libfdt: build only the strict necessary
Date: Wed, 15 Apr 2020 10:16:52 +0200	[thread overview]
Message-ID: <47c51117-133c-9b88-4dec-b56d883f5e8b@suse.de> (raw)
In-Reply-To: <20200414020303.GC48061@umbus.fritz.box>

On 4/14/20 4:03 AM, David Gibson wrote:
> On Sat, Apr 11, 2020 at 11:31:48AM +0200, Claudio Fontana wrote:
>> v2 -> v3:
>>
>> * changed into a 2 patch series; in the second patch we remove the old
>>   compatibility gunks that were meant for removal some time after 4.1.
>>
>> * renamed the libfdt PHONY rule to dtc/all, with the intent to make
>>   existing working trees forward and backward compatible across the change.
>>
>> v1 -> v2:
>>
>> * fix error generated when running UNCHECKED_GOALS without prior configure,
>>   for example during make docker-image-fedora. Without configure, DSOSUF is
>>   empty, and the module pattern rule in rules.mak that uses this variable
>>   can match too much; provide a default in the Makefile to avoid it.
>>
>> * only attempt to build the archive when there is a non-empty list of objects.
>>   This could be done in general for the %.a: pattern in rules.mak, but maybe
>>   there are valid reasons to build an empty .a?
>>
>> * removed some intermediate variables that did not add much value
>>   (LIBFDT_srcdir, LIBFDT_archive)
>>
>> Tested locally with 3 VPATH configurations (no-, VPATH, VPATH in src subdir),
>> and with docker-image-fedora, docker-test-debug@fedora that failed
>> before.
> 
> Seems reasonable to me.  It's a bit of a shame that we can't use the
> dtc makefiles more simply for this.  But I don't quickly know how to
> fix them upstream to allow that.


Hi David,

I tried to look at dtc upstream makefiles, I don't see a perfect solution at the moment.

I came up with this idea though (not fully tested..) that _could_ work, ie special casing the libfdt target when it is the only goal in MAKECMDGOALS.

Any thoughts?

Ciao,

Claudio


diff --git a/Makefile b/Makefile
index f02aa19..cb256e8 100644
--- a/Makefile
+++ b/Makefile
@@ -176,6 +176,7 @@ endif
 
 
 ifneq ($(DEPTARGETS),)
+ifneq ($(MAKECMDGOALS),libfdt)
 -include $(DTC_OBJS:%.o=%.d)
 -include $(CONVERT_OBJS:%.o=%.d)
 -include $(FDTDUMP_OBJS:%.o=%.d)
@@ -183,6 +184,7 @@ ifneq ($(DEPTARGETS),)
 -include $(FDTPUT_OBJS:%.o=%.d)
 -include $(FDTOVERLAY_OBJS:%.o=%.d)
 endif
+endif
 
 
 
@@ -318,7 +320,9 @@ ifeq ($(NO_PYTHON),0)
 TESTS_PYLIBFDT += maybe_pylibfdt
 endif
 
+ifneq ($(MAKECMDGOALS),libfdt)
 include tests/Makefile.tests
+endif
 
 #
 # Clean rules


> 
>>
>> Claudio Fontana (2):
>>   Makefile: libfdt: build only the strict necessary
>>   Makefile: remove old compatibility gunks
>>
>>  Makefile  | 32 ++++++++++++++++----------------
>>  configure |  6 +-----
>>  rules.mak |  2 ++
>>  3 files changed, 19 insertions(+), 21 deletions(-)
>>
> 



  reply	other threads:[~2020-04-15  8:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11  9:31 [PATCH RESEND v3 0/2] Makefile: libfdt: build only the strict necessary Claudio Fontana
2020-04-11  9:31 ` [PATCH RESEND v3 1/2] " Claudio Fontana
2020-04-29 11:47   ` Claudio Fontana
2020-05-04  8:24     ` David Gibson
2020-04-11  9:31 ` [PATCH RESEND v3 2/2] Makefile: remove old compatibility gunks Claudio Fontana
2020-04-14  9:40   ` Philippe Mathieu-Daudé
2020-04-14  2:03 ` [PATCH RESEND v3 0/2] Makefile: libfdt: build only the strict necessary David Gibson
2020-04-15  8:16   ` Claudio Fontana [this message]
2020-05-11  6:33     ` David Gibson
2020-05-12 10:27       ` Claudio Fontana

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=47c51117-133c-9b88-4dec-b56d883f5e8b@suse.de \
    --to=cfontana@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.