From: "Brüns, Stefan" <Stefan.Bruens@rwth-aachen.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] scripts/Makefile.lib: remove overridden target $(obj)/helloworld.so:
Date: Thu, 7 Sep 2017 18:32:36 +0000 [thread overview]
Message-ID: <2994282.mGfOXkTzPg@sbruens-linux> (raw)
In-Reply-To: <1fa35956-8911-b3b6-32b9-fa87c4af580a@gmx.de>
On Sonntag, 3. September 2017 17:26:43 CEST Heinrich Schuchardt wrote:
> On 09/03/2017 02:19 PM, Alexander Graf wrote:
> > On 03.09.17 08:17, Heinrich Schuchardt wrote:
> >> The target
> >> $(obj)/helloworld.so:
> >> exists twice in Makefile.lib.
> >>
> >> If you add an echo command to each of the two recipes you get
> >> warnings like:
> >>
> >> scripts/Makefile.lib:383: warning:
> >> overriding recipe for target 'drivers/power/battery/helloworld.so'
> >> scripts/Makefile.lib:379: warning:
> >> ignoring old recipe for target 'drivers/power/battery/helloworld.so'
> >>
> >> This patch removes the obsolete target.
> >>
> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> >> ---
> >> Hello Alex,
> >>
> >> could you, please, review the change as it relates to EFI.
> >
> > My Makefile foo isn't quite as good as it should be, but doesn't the
> > existing code simply add another dependency to the required build chain?
>
> The target is overridden so why should the dependency be executed?
>
> https://www.gnu.org/software/make/manual/html_node/Overriding-Makefiles.html
> says:
> "However, it is invalid for two makefiles to give different recipes for
> the same target. I guess this will be valid for a single makefile too."
>
> If you think the dependency is necessary, I can add it to the remaining
> target. Is this what you prefer?
Note there is a difference between prerequisite and recipe - specifying a
target multiple times without recipe adds the the prerequisite to the existing
set, see
https://www.gnu.org/software/make/manual/html_node/Multiple-Targets.html#Multiple-Targets
---
foo: a
foo: b c
a:
@echo "Creating prereq a"
%:
@echo "Creating $@"
----
This tries to create the default target foo (first specified target), which
has three prerequisites (a, b, c), which are run in parallel.
Kind regards,
Stefan
next prev parent reply other threads:[~2017-09-07 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-03 6:17 [U-Boot] [PATCH 1/1] scripts/Makefile.lib: remove overridden target $(obj)/helloworld.so: Heinrich Schuchardt
2017-09-03 12:19 ` Alexander Graf
2017-09-03 15:26 ` Heinrich Schuchardt
2017-09-07 18:32 ` Brüns, Stefan [this message]
2017-09-03 16:31 ` Heinrich Schuchardt
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=2994282.mGfOXkTzPg@sbruens-linux \
--to=stefan.bruens@rwth-aachen.de \
--cc=u-boot@lists.denx.de \
/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